From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> --- libosinfo.spec.in | 1 + mingw32-libosinfo.spec.in | 1 + tools/Makefile.am | 2 +- tools/osinfo-detect.c | 62 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletions(-) diff --git a/libosinfo.spec.in b/libosinfo.spec.in index 00c6741..28f4804 100644 --- a/libosinfo.spec.in +++ b/libosinfo.spec.in @@ -110,6 +110,7 @@ rm -fr %{buildroot} %{_datadir}/libosinfo/data/hypervisors %{_datadir}/libosinfo/schemas/libosinfo.rng %{_mandir}/man1/osinfo-db-validate.1* +%{_mandir}/man1/osinfo-detect.1* %{_libdir}/%{name}-1.0.so.* /lib/udev/rules.d/95-osinfo.rules %if %{with_gir} diff --git a/mingw32-libosinfo.spec.in b/mingw32-libosinfo.spec.in index ca9a20d..28d51a4 100644 --- a/mingw32-libosinfo.spec.in +++ b/mingw32-libosinfo.spec.in @@ -79,6 +79,7 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/libosinfo/data/oses %{_mingw32_datadir}/libosinfo/data/hypervisors %{_mingw32_mandir}/man1/osinfo-db-validate.1* +%{_mingw32_mandir}/man1/osinfo-detect.1* %changelog diff --git a/tools/Makefile.am b/tools/Makefile.am index 7ffc60a..c88d148 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -8,7 +8,7 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \ bin_PROGRAMS = osinfo-detect osinfo-db-validate -man1_MANS = osinfo-db-validate.1 +man1_MANS = osinfo-db-validate.1 osinfo-detect.1 POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c index b9ce7ba..41766d3 100644 --- a/tools/osinfo-detect.c +++ b/tools/osinfo-detect.c @@ -255,6 +255,68 @@ EXIT: } /* +=pod + +=head1 NAME + +osinfo-detect - Detect the operating system on installable media or trees + +=head1 SYNOPSIS + +osinfo-detect [OPTIONS...] PATH|URI + +=head1 DESCRIPTION + +Examine the C<PATH> or C<URI> to determine what (if any) operating +system it is for, and whether it is installable or is a Live image. +By default C<PATH> or C<URI> will be interpreted as pointing to +ISO media. To request examination of an install tree instead, the +option C<--type=tree> should be given. + +The output information is formatted for humans; to obtain machine +readable output, the option C<--format=env> should be given to +produce shell-like key/value pairs. + +=head1 OPTIONS + +=over 8 + +=item B<--format=plain|env> + +Switch between human readable output (B<plain>, the default) or machine +readable output (B<env>). + +=item B<--type=media|tree> + +Switch between looking for CD/DVD ISO media (B<media>, the default) or +install trees (B<tree>) + +=back + +=head1 EXIT STATUS + +The exit status will be 0 if an operating system was detected, +or 1 if none was found. + +=head1 AUTHORS + +Zeeshan Ali (Khattak) <zeeshanak@xxxxxxxxx>, Daniel P. Berrange <berrange@xxxxxxxxxx> + +=head1 COPYRIGHT + +Copyright (C) 2011-2012 Red Hat, Inc. + +=head1 LICENSE + +C<osinfo-detect> is distributed under the termsof the GNU LGPL v2 +license. This is free software; see the source for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE + +=cut +*/ + +/* * Local variables: * indent-tabs-mode: nil * c-indent-level: 4 -- 1.7.7.6