Skip to contentSkip to conversation

version command line option

Qemu-devel Pascal Erb 2 participants 3 messages Sep 16, 2009 – Sep 17, 2009

lore
Share & tools
lore

Pascal Erb

author
#0 lore raw

hi,

actually I'm getting closer to qemu. And I like it ;-) . As I want to deliver some cd with a virtual machine on it, there's the need to check for an existing installation of qemu on the target host. I managed to check this by simply invoking qemu -h which returns 0 for success. But it seems to be impossible to do something like

qemu --version

to find out some version information. Since this should be easy to implement, I'd do this. Any informations how to proceed?

Greetings,

Pascal

#1 lore raw
Quoted 7 lines · Pascal Erb

But it seems to be
impossible to do something like

qemu --version

to find out some version information. Since this should be easy to implement, I'd do this. Any informations how to proceed?

I came up with this but that looks overly complex and fragile :-)

qemu-x86_64 -h | head -1 | awk '{ print $3 }' | sed 's/,$//'

Laurent

author
#2 lore raw
Quoted 5 lines

I came up with this but that looks overly complex and fragile :-)

qemu-x86_64 -h | head -1 | awk '{ print $3 }' | sed 's/,$//'

Hmmm. I agree with you. This looks really fragile since it is impossible to know in advance, head, awk or sed to be installed on the target host (having some ugly commercial OS with very low abilities in mind...). But thank you anyway that you strived for a quick solution :-)

My question tended more into the way: Where is the repository and where could I find the coding guidelines, etc? And how should I proceed to add the corresponding source code? About the repository I found already out how to make an anonymous checkout (git clone git://git.savannah.nongnu.org/qemu.git).
Is there a howto document somewhere how to submit my code? Are there any public accessible documents about qemu's architecture or structure?

Greetings,

Pascal