[virt-tools-list] [libosinfo 1/2] Add utility app that detects OS given a media

Daniel P. Berrange berrange at redhat.com
Tue Aug 30 15:44:52 UTC 2011


On Mon, Aug 29, 2011 at 11:30:13PM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> Given a path to a ISO9660 image/device, detects if media is bootable and
> the relavent OS if media is an installer for it.

> diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
> new file mode 100644
> index 0000000..029b6b6
> --- /dev/null
> +++ b/tools/osinfo-detect.c
> +
> +static GOptionEntry entries[] =
> +{
> +    { "print-env", 'e', 0,
> +      G_OPTION_ARG_NONE, &print_env,
> +      "Print information in the form of environment variables.", NULL },
> +    { NULL }
> +};

I could well imagine we might want other types of output format
in the future (CSV, YAML, XML, etc). So instead of --print-env,
I think we should go for  '--output [plain|env|...]' which allows
for future expansion. Default to plain text output if omitted
of course. Or perhaps name it '--output-format' or just '--format'

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list