[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
by Richard W.M. Jones
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67 ++++++++++++++++++-------------------
edit/edit.c | 43 ++++++++++++------------
fish/fish.c | 93 +++++++++++++++++++++++++--------------------------
format/format.c | 45 ++++++++++++-------------
fuse/guestmount.c | 61 +++++++++++++++++----------------
fuse/guestunmount.c | 27 +++++++--------
inspector/inspector.c | 37 ++++++++++----------
make-fs/make-fs.c | 37 ++++++++++----------
p2v/main.c | 21 ++++++------
rescue/rescue.c | 49 +++++++++++++--------------
16 files changed, 373 insertions(+), 389 deletions(-)
diff --git a/align/scan.c b/align/scan.c
index 188450c..ef92f42 100644
--- a/align/scan.c
+++ b/align/scan.c
@@ -73,24 +73,23 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: check alignment of virtual machine partitions\n"
- "Copyright (C) 2011 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " -P nr_threads Use at most nr_threads\n"
- " -q|--quiet No output, just exit code\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: check alignment of virtual machine partitions\n"
+ "Copyright (C) 2011 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " -P nr_threads Use at most nr_threads\n"
+ " -q|--quiet No output, just exit code\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/cat/cat.c b/cat/cat.c
index 82f0055..222cfa9 100644
--- a/cat/cat.c
+++ b/cat/cat.c
@@ -53,26 +53,25 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: display files in a virtual machine\n"
- "Copyright (C) 2010 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname file [file ...]\n"
- " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
- " Mount dev on mnt (if omitted, /)\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: display files in a virtual machine\n"
+ "Copyright (C) 2010 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname file [file ...]\n"
+ " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
+ " Mount dev on mnt (if omitted, /)\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/cat/filesystems.c b/cat/filesystems.c
index 0e64e00..ef4f6ba 100644
--- a/cat/filesystems.c
+++ b/cat/filesystems.c
@@ -87,41 +87,40 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: list filesystems, partitions, block devices, LVM in a VM\n"
- "Copyright (C) 2010 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " --all Display everything\n"
- " --blkdevs|--block-devices\n"
- " Display block devices\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --csv Output as Comma-Separated Values\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --extra Display swap and data filesystems\n"
- " --filesystems Display mountable filesystems\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " -h|--human-readable Human-readable sizes in --long output\n"
- " --help Display brief help\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -l|--long Long output\n"
- " --lvs|--logvols|--logical-volumes\n"
- " Display LVM logical volumes\n"
- " --no-title No title in --long output\n"
- " --parts|--partitions Display partitions\n"
- " --pvs|--physvols|--physical-volumes\n"
- " Display LVM physical volumes\n"
- " --uuid|--uuids Add UUIDs to --long output\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " --vgs|--volgroups|--volume-groups\n"
- " Display LVM volume groups\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: list filesystems, partitions, block devices, LVM in a VM\n"
+ "Copyright (C) 2010 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " --all Display everything\n"
+ " --blkdevs|--block-devices\n"
+ " Display block devices\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --csv Output as Comma-Separated Values\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --extra Display swap and data filesystems\n"
+ " --filesystems Display mountable filesystems\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " -h|--human-readable Human-readable sizes in --long output\n"
+ " --help Display brief help\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -l|--long Long output\n"
+ " --lvs|--logvols|--logical-volumes\n"
+ " Display LVM logical volumes\n"
+ " --no-title No title in --long output\n"
+ " --parts|--partitions Display partitions\n"
+ " --pvs|--physvols|--physical-volumes\n"
+ " Display LVM physical volumes\n"
+ " --uuid|--uuids Add UUIDs to --long output\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " --vgs|--volgroups|--volume-groups\n"
+ " Display LVM volume groups\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/cat/log.c b/cat/log.c
index 616baed..a8e55d8 100644
--- a/cat/log.c
+++ b/cat/log.c
@@ -62,24 +62,23 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: display log files in a virtual machine\n"
- "Copyright (C) 2010-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: display log files in a virtual machine\n"
+ "Copyright (C) 2010-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/cat/ls.c b/cat/ls.c
index 987dcef..b8f901d 100644
--- a/cat/ls.c
+++ b/cat/ls.c
@@ -83,37 +83,36 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: list files in a virtual machine\n"
- "Copyright (C) 2010-2012 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname dir [dir ...]\n"
- " %s [--options] -a disk.img [-a disk.img ...] dir [dir ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " --checksum[=...] Display file checksums\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --csv Comma-Separated Values output\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --extra-stats Display extra stats\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " -h|--human-readable Human-readable sizes in output\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -l|--long Long listing\n"
- " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
- " Mount dev on mnt (if omitted, /)\n"
- " -R|--recursive Recursive listing\n"
- " --times Display file times\n"
- " --time-days Display file times as days before now\n"
- " --time-relative Display file times as seconds before now\n"
- " --time-t Display file times as time_t's\n"
- " --uids Display UID, GID\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: list files in a virtual machine\n"
+ "Copyright (C) 2010-2012 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname dir [dir ...]\n"
+ " %s [--options] -a disk.img [-a disk.img ...] dir [dir ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " --checksum[=...] Display file checksums\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --csv Comma-Separated Values output\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --extra-stats Display extra stats\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " -h|--human-readable Human-readable sizes in output\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -l|--long Long listing\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
+ " Mount dev on mnt (if omitted, /)\n"
+ " -R|--recursive Recursive listing\n"
+ " --times Display file times\n"
+ " --time-days Display file times as days before now\n"
+ " --time-relative Display file times as seconds before now\n"
+ " --time-t Display file times as time_t's\n"
+ " --uids Display UID, GID\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/df/main.c b/df/main.c
index 517bd45..ae5f250 100644
--- a/df/main.c
+++ b/df/main.c
@@ -66,28 +66,27 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: display free space on virtual filesystems\n"
- "Copyright (C) 2010 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --csv Output as Comma-Separated Values\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " -h|--human-readable Human-readable sizes in --long output\n"
- " --help Display brief help\n"
- " -i|--inodes Display inodes\n"
- " --one-per-guest Separate appliance per guest\n"
- " -P nr_threads Use at most nr_threads\n"
- " --uuid Add UUIDs to --long output\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: display free space on virtual filesystems\n"
+ "Copyright (C) 2010 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --csv Output as Comma-Separated Values\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " -h|--human-readable Human-readable sizes in --long output\n"
+ " --help Display brief help\n"
+ " -i|--inodes Display inodes\n"
+ " --one-per-guest Separate appliance per guest\n"
+ " -P nr_threads Use at most nr_threads\n"
+ " --uuid Add UUIDs to --long output\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/diff/diff.c b/diff/diff.c
index 1261439..52c29ea 100644
--- a/diff/diff.c
+++ b/diff/diff.c
@@ -92,40 +92,39 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: list differences between virtual machines\n"
- "Copyright (C) 2010-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domain1 -D domain2\n"
- " %s [--options] -a disk1.img -A disk2.img [-a|-A ...]\n"
- "Options:\n"
- " -a|--add image Add image from first guest\n"
- " --all Same as: --extra-stats --times --uids --xattrs\n"
- " --atime Don't ignore access time changes\n"
- " -A image Add image from second guest\n"
- " --checksum[=...] Use checksum of file content\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --csv Comma-Separated Values output\n"
- " --dir-links Don't ignore directory nlink changes\n"
- " --dir-times Don't ignore directory time changes\n"
- " -d|--domain guest Add disks from first libvirt guest\n"
- " -D guest Add disks from second libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --extra-stats Display extra stats\n"
- " --format[=raw|..] Force disk format for -a or -A option\n"
- " --help Display brief help\n"
- " -h|--human-readable Human-readable sizes in output\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " --times Display file times\n"
- " --time-days Display file times as days before now\n"
- " --time-relative Display file times as seconds before now\n"
- " --time-t Display file times as time_t's\n"
- " --uids Display UID, GID\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- " --xattrs Display extended attributes\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: list differences between virtual machines\n"
+ "Copyright (C) 2010-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domain1 -D domain2\n"
+ " %s [--options] -a disk1.img -A disk2.img [-a|-A ...]\n"
+ "Options:\n"
+ " -a|--add image Add image from first guest\n"
+ " --all Same as: --extra-stats --times --uids --xattrs\n"
+ " --atime Don't ignore access time changes\n"
+ " -A image Add image from second guest\n"
+ " --checksum[=...] Use checksum of file content\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --csv Comma-Separated Values output\n"
+ " --dir-links Don't ignore directory nlink changes\n"
+ " --dir-times Don't ignore directory time changes\n"
+ " -d|--domain guest Add disks from first libvirt guest\n"
+ " -D guest Add disks from second libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --extra-stats Display extra stats\n"
+ " --format[=raw|..] Force disk format for -a or -A option\n"
+ " --help Display brief help\n"
+ " -h|--human-readable Human-readable sizes in output\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " --times Display file times\n"
+ " --time-days Display file times as days before now\n"
+ " --time-relative Display file times as seconds before now\n"
+ " --time-t Display file times as time_t's\n"
+ " --uids Display UID, GID\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ " --xattrs Display extended attributes\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/edit/edit.c b/edit/edit.c
index b874492..9df99c3 100644
--- a/edit/edit.c
+++ b/edit/edit.c
@@ -63,28 +63,27 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: Edit a file in a virtual machine\n"
- "Copyright (C) 2009-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname file [file ...]\n"
- " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -b|--backup .ext Backup original as original.ext\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " -e|--expr expr Non-interactive editing using Perl expr\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
- " Mount dev on mnt (if omitted, /)\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: Edit a file in a virtual machine\n"
+ "Copyright (C) 2009-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname file [file ...]\n"
+ " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -b|--backup .ext Backup original as original.ext\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " -e|--expr expr Non-interactive editing using Perl expr\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
+ " Mount dev on mnt (if omitted, /)\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/fish/fish.c b/fish/fish.c
index c37368e..12a62a1 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -105,53 +105,52 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: guest filesystem shell\n"
- "%s lets you edit virtual machine filesystems\n"
- "Copyright (C) 2009-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] cmd [: cmd : cmd ...]\n"
- "Options:\n"
- " -h|--cmd-help List available commands\n"
- " -h|--cmd-help cmd Display detailed help on 'cmd'\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --csh Make --listen csh-compatible\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " -f|--file file Read commands from file\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " -i|--inspector Automatically mount filesystems\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " --listen Listen for remote commands\n"
- " --live Connect to a live virtual machine\n"
- " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
- " Mount dev on mnt (if omitted, /)\n"
- " --network Enable network\n"
- " -N|--new [filename=]type\n"
- " Create prepared disk (test<N>.img or filename)\n"
- " -n|--no-sync Don't autosync\n"
- " --no-dest-paths Don't tab-complete paths from guest fs\n"
- " --pipe-error Pipe commands can detect write errors\n"
- " --progress-bars Enable progress bars even when not interactive\n"
- " --no-progress-bars Disable progress bars\n"
- " --remote[=pid] Send commands to remote %s\n"
- " -r|--ro Mount read-only\n"
- " --selinux Enable SELinux support\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -w|--rw Mount read-write\n"
- " -x Echo each command before executing it\n"
- "\n"
- "To examine a disk image, ISO, hard disk, filesystem etc:\n"
- " %s [--ro|--rw] -i -a /path/to/disk.img\n"
- "or\n"
- " %s [--ro|--rw] -i -d name-of-libvirt-domain\n"
- "\n"
- "--ro recommended to avoid any writes to the disk image. If -i option fails\n"
- "run again without -i and use 'run' + 'list-filesystems' + 'mount' cmds.\n"
- "\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: guest filesystem shell\n"
+ "%s lets you edit virtual machine filesystems\n"
+ "Copyright (C) 2009-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] cmd [: cmd : cmd ...]\n"
+ "Options:\n"
+ " -h|--cmd-help List available commands\n"
+ " -h|--cmd-help cmd Display detailed help on 'cmd'\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --csh Make --listen csh-compatible\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " -f|--file file Read commands from file\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " -i|--inspector Automatically mount filesystems\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " --listen Listen for remote commands\n"
+ " --live Connect to a live virtual machine\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]]]\n"
+ " Mount dev on mnt (if omitted, /)\n"
+ " --network Enable network\n"
+ " -N|--new [filename=]type\n"
+ " Create prepared disk (test<N>.img or filename)\n"
+ " -n|--no-sync Don't autosync\n"
+ " --no-dest-paths Don't tab-complete paths from guest fs\n"
+ " --pipe-error Pipe commands can detect write errors\n"
+ " --progress-bars Enable progress bars even when not interactive\n"
+ " --no-progress-bars Disable progress bars\n"
+ " --remote[=pid] Send commands to remote %s\n"
+ " -r|--ro Mount read-only\n"
+ " --selinux Enable SELinux support\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -w|--rw Mount read-write\n"
+ " -x Echo each command before executing it\n"
+ "\n"
+ "To examine a disk image, ISO, hard disk, filesystem etc:\n"
+ " %s [--ro|--rw] -i -a /path/to/disk.img\n"
+ "or\n"
+ " %s [--ro|--rw] -i -d name-of-libvirt-domain\n"
+ "\n"
+ "--ro recommended to avoid any writes to the disk image. If -i option fails\n"
+ "run again without -i and use 'run' + 'list-filesystems' + 'mount' cmds.\n"
+ "\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
diff --git a/format/format.c b/format/format.c
index d7d531a..ba8fe8c 100644
--- a/format/format.c
+++ b/format/format.c
@@ -65,29 +65,28 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n%s\n"),
guestfs_int_program_name, warning);
else {
- fprintf (stdout,
- _("%s: erase and make a blank disk\n"
- "Copyright (C) 2012 Red Hat Inc.\n"
- "\n"
- "%s\n"
- "\n"
- "Usage:\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " --filesystem=.. Create empty filesystem\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " --label=.. Set filesystem label\n"
- " --lvm=.. Create Linux LVM2 logical volume\n"
- " --partition=.. Create / set partition type\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " --wipe Write zeroes over whole disk\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"
- "\n"
- "%s\n\n"),
+ printf (_("%s: erase and make a blank disk\n"
+ "Copyright (C) 2012 Red Hat Inc.\n"
+ "\n"
+ "%s\n"
+ "\n"
+ "Usage:\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " --filesystem=.. Create empty filesystem\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " --label=.. Set filesystem label\n"
+ " --lvm=.. Create Linux LVM2 logical volume\n"
+ " --partition=.. Create / set partition type\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " --wipe Write zeroes over whole disk\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"
+ "\n"
+ "%s\n\n"),
guestfs_int_program_name, warning, guestfs_int_program_name, guestfs_int_program_name,
warning);
}
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 9853490..661d0b4 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -100,37 +100,36 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: FUSE module for libguestfs\n"
- "%s lets you mount a virtual machine filesystem\n"
- "Copyright (C) 2009-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] mountpoint\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " --dir-cache-timeout Set readdir cache timeout (default 5 sec)\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --fd=FD Write to pipe FD when mountpoint is ready\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --fuse-help Display extra FUSE options\n"
- " -i|--inspector Automatically mount filesystems\n"
- " --help Display help message and exit\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " --live Connect to a live virtual machine\n"
- " -m|--mount dev[:mnt[:opts[:fstype]] Mount dev on mnt (if omitted, /)\n"
- " --no-fork Don't daemonize\n"
- " -n|--no-sync Don't autosync\n"
- " -o|--option opt Pass extra option to FUSE\n"
- " --pid-file filename Write PID to filename\n"
- " -r|--ro Mount read-only\n"
- " --selinux Enable SELinux support\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -w|--rw Mount read-write\n"
- " -x|--trace Trace guestfs API calls\n"
- ),
+ printf (_("%s: FUSE module for libguestfs\n"
+ "%s lets you mount a virtual machine filesystem\n"
+ "Copyright (C) 2009-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] mountpoint\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " --dir-cache-timeout Set readdir cache timeout (default 5 sec)\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --fd=FD Write to pipe FD when mountpoint is ready\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --fuse-help Display extra FUSE options\n"
+ " -i|--inspector Automatically mount filesystems\n"
+ " --help Display help message and exit\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " --live Connect to a live virtual machine\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]] Mount dev on mnt (if omitted, /)\n"
+ " --no-fork Don't daemonize\n"
+ " -n|--no-sync Don't autosync\n"
+ " -o|--option opt Pass extra option to FUSE\n"
+ " --pid-file filename Write PID to filename\n"
+ " -r|--ro Mount read-only\n"
+ " --selinux Enable SELinux support\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -w|--rw Mount read-write\n"
+ " -x|--trace Trace guestfs API calls\n"
+ ),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name);
}
exit (status);
diff --git a/fuse/guestunmount.c b/fuse/guestunmount.c
index 9687401..c04cfad 100644
--- a/fuse/guestunmount.c
+++ b/fuse/guestunmount.c
@@ -52,20 +52,19 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: clean up a mounted filesystem\n"
- "Copyright (C) 2013 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--fd=FD] mountpoint\n"
- "Options:\n"
- " --fd=FD Pipe file descriptor to monitor\n"
- " --help Display help message and exit\n"
- " -q|--quiet Don't print fusermount errors\n"
- " --no-retry Don't retry fusermount\n"
- " --retry=N Retry fusermount N times (default: 5)\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- ),
+ printf (_("%s: clean up a mounted filesystem\n"
+ "Copyright (C) 2013 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--fd=FD] mountpoint\n"
+ "Options:\n"
+ " --fd=FD Pipe file descriptor to monitor\n"
+ " --help Display help message and exit\n"
+ " -q|--quiet Don't print fusermount errors\n"
+ " --no-retry Don't retry fusermount\n"
+ " --retry=N Retry fusermount N times (default: 5)\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ ),
guestfs_int_program_name, guestfs_int_program_name);
}
exit (status);
diff --git a/inspector/inspector.c b/inspector/inspector.c
index 70b7cd3..fd596b5 100644
--- a/inspector/inspector.c
+++ b/inspector/inspector.c
@@ -67,25 +67,24 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: display information about a virtual machine\n"
- "Copyright (C) 2010 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname file [file ...]\n"
- " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --echo-keys Don't turn off echo for passphrases\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " --keys-from-stdin Read passphrases from stdin\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- " --xpath query Perform an XPath query\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: display information about a virtual machine\n"
+ "Copyright (C) 2010 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname file [file ...]\n"
+ " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --echo-keys Don't turn off echo for passphrases\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " --keys-from-stdin Read passphrases from stdin\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ " --xpath query Perform an XPath query\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 980bfeb..67b0456 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -74,25 +74,24 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: make a filesystem from a tar archive or files\n"
- "Copyright (C) 2010-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] input.tar output.img\n"
- " %s [--options] input.tar.gz output.img\n"
- " %s [--options] directory output.img\n"
- "Options:\n"
- " --floppy Make a virtual floppy disk\n"
- " --format=raw|qcow2|.. Set output format\n"
- " --help Display brief help\n"
- " --label=label Filesystem label\n"
- " --partition=mbr|gpt|.. Set partition type\n"
- " --size=size|+size Set size of output disk\n"
- " --type=ext4|.. Set filesystem type\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: make a filesystem from a tar archive or files\n"
+ "Copyright (C) 2010-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] input.tar output.img\n"
+ " %s [--options] input.tar.gz output.img\n"
+ " %s [--options] directory output.img\n"
+ "Options:\n"
+ " --floppy Make a virtual floppy disk\n"
+ " --format=raw|qcow2|.. Set output format\n"
+ " --help Display brief help\n"
+ " --label=label Filesystem label\n"
+ " --partition=mbr|gpt|.. Set partition type\n"
+ " --size=size|+size Set size of output disk\n"
+ " --type=ext4|.. Set filesystem type\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
diff --git a/p2v/main.c b/p2v/main.c
index d59465a..83fcd8c 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -65,17 +65,16 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: Convert a physical machine to use KVM\n"
- "Copyright (C) 2009-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options]\n"
- "Options:\n"
- " --help Display brief help\n"
- " --cmdline=CMDLINE Used to debug command line parsing\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: Convert a physical machine to use KVM\n"
+ "Copyright (C) 2009-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options]\n"
+ "Options:\n"
+ " --help Display brief help\n"
+ " --cmdline=CMDLINE Used to debug command line parsing\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name);
}
exit (status);
diff --git a/rescue/rescue.c b/rescue/rescue.c
index 9e0a516..f25a86b 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -56,31 +56,30 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
else {
- fprintf (stdout,
- _("%s: Run a rescue shell on a virtual machine\n"
- "Copyright (C) 2009-2015 Red Hat Inc.\n"
- "Usage:\n"
- " %s [--options] -d domname\n"
- " %s [--options] -a disk.img [-a disk.img ...]\n"
- "Options:\n"
- " -a|--add image Add image\n"
- " --append kernelopts Append kernel options\n"
- " -c|--connect uri Specify libvirt URI for -d option\n"
- " -d|--domain guest Add disks from libvirt guest\n"
- " --format[=raw|..] Force disk format for -a option\n"
- " --help Display brief help\n"
- " -m|--memsize MB Set memory size in megabytes\n"
- " --network Enable network\n"
- " -r|--ro Access read-only\n"
- " --scratch[=N] Add scratch disk(s)\n"
- " --selinux Enable SELinux\n"
- " --smp N Enable SMP with N >= 2 virtual CPUs\n"
- " --suggest Suggest mount commands for this guest\n"
- " -v|--verbose Verbose messages\n"
- " -V|--version Display version and exit\n"
- " -w|--rw Mount read-write\n"
- " -x Trace libguestfs API calls\n"
- "For more information, see the manpage %s(1).\n"),
+ printf (_("%s: Run a rescue shell on a virtual machine\n"
+ "Copyright (C) 2009-2015 Red Hat Inc.\n"
+ "Usage:\n"
+ " %s [--options] -d domname\n"
+ " %s [--options] -a disk.img [-a disk.img ...]\n"
+ "Options:\n"
+ " -a|--add image Add image\n"
+ " --append kernelopts Append kernel options\n"
+ " -c|--connect uri Specify libvirt URI for -d option\n"
+ " -d|--domain guest Add disks from libvirt guest\n"
+ " --format[=raw|..] Force disk format for -a option\n"
+ " --help Display brief help\n"
+ " -m|--memsize MB Set memory size in megabytes\n"
+ " --network Enable network\n"
+ " -r|--ro Access read-only\n"
+ " --scratch[=N] Add scratch disk(s)\n"
+ " --selinux Enable SELinux\n"
+ " --smp N Enable SMP with N >= 2 virtual CPUs\n"
+ " --suggest Suggest mount commands for this guest\n"
+ " -v|--verbose Verbose messages\n"
+ " -V|--version Display version and exit\n"
+ " -w|--rw Mount read-write\n"
+ " -x Trace libguestfs API calls\n"
+ "For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name);
}
--
2.5.0
9 years, 2 months
[PATCH] customize: remove zypper's gpg keys auto-import
by Cédric Bosdonnat
This option was considered unsecure, found a fix on the generated
opensuse images instead.
---
customize/customize_run.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index ad0ab7f..6cb2328 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
@@ -116,7 +116,7 @@ exec >>%s 2>&1
| "yum" ->
sprintf "yum -y install %s" quoted_args
| "zypper" ->
- sprintf "zypper -n --gpg-auto-import-keys in -l %s" quoted_args
+ sprintf "zypper -n in -l %s" quoted_args
| "unknown" ->
error (f_"--install is not supported for this guest operating system")
| pm ->
@@ -143,7 +143,7 @@ exec >>%s 2>&1
| "yum" ->
sprintf "yum -y update"
| "zypper" ->
- sprintf "zypper -n --gpg-auto-import-keys update -l"
+ sprintf "zypper -n update -l"
| "unknown" ->
error (f_"--update is not supported for this guest operating system")
| pm ->
--
2.1.4
9 years, 2 months
[PATCH 1/2] launch: direct: Use a single -machine [type, ]accel=... option.
by Richard W.M. Jones
Previously we used (on arm): -M virt -machine accel=...
After this change, we use: -machine virt,accel=...
On x86 there is no change.
The -M option is an abbreviation for -machine, and we can combine the
two options together. (Qemu combines the two options internally, but
it's more predictable if we do it ourselves).
Upstream qemu has supported the -machine option for over 5 years, and
in fact we implicitly relied on it (despite what the comment in the
code said).
---
src/launch-direct.c | 52 +++++++++++++++++++---------------------------------
1 file changed, 19 insertions(+), 33 deletions(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 44ae9d0..2ffbff1 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -376,11 +376,6 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
ADD_CMDLINE ("-display");
ADD_CMDLINE ("none");
-#ifdef MACHINE_TYPE
- ADD_CMDLINE ("-M");
- ADD_CMDLINE (MACHINE_TYPE);
-#endif
-
/* See guestfs.pod / gdb */
if (guestfs_int_get_backend_setting_bool (g, "gdb") > 0) {
ADD_CMDLINE ("-S");
@@ -388,35 +383,26 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
warning (g, "qemu debugging is enabled, connect gdb to tcp::1234 to begin");
}
+ ADD_CMDLINE ("-machine");
+ if (!force_tcg)
+ ADD_CMDLINE (
+#ifdef MACHINE_TYPE
+ MACHINE_TYPE ","
+#endif
+ "accel=kvm:tcg");
+ else
+ ADD_CMDLINE (
+#ifdef MACHINE_TYPE
+ MACHINE_TYPE ","
+#endif
+ "accel=tcg");
+
cpu_model = guestfs_int_get_cpu_model (has_kvm && !force_tcg);
if (cpu_model) {
ADD_CMDLINE ("-cpu");
ADD_CMDLINE (cpu_model);
}
- /* The qemu -machine option (added 2010-12) is a bit more sane
- * since it falls back through various different acceleration
- * modes, so try that first (thanks Markus Armbruster).
- */
- if (qemu_supports (g, data, "-machine")) {
- ADD_CMDLINE ("-machine");
- if (!force_tcg)
- ADD_CMDLINE ("accel=kvm:tcg");
- else
- ADD_CMDLINE ("accel=tcg");
- } else {
- /* qemu sometimes needs this option to enable hardware
- * virtualization, but some versions of 'qemu-kvm' will use KVM
- * regardless (even where this option appears in the help text).
- * It is rumoured that there are versions of qemu where
- * supplying this option when hardware virtualization is not
- * available will cause qemu to fail. A giant clusterfuck with
- * the qemu command line, again.
- */
- if (has_kvm && !force_tcg && qemu_supports (g, data, "-enable-kvm"))
- ADD_CMDLINE ("-enable-kvm");
- }
-
if (g->smp > 1) {
ADD_CMDLINE ("-smp");
ADD_CMDLINE_PRINTF ("%d", g->smp);
@@ -997,12 +983,12 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data)
guestfs_int_cmd_add_arg (cmd3, g->hv);
guestfs_int_cmd_add_arg (cmd3, "-display");
guestfs_int_cmd_add_arg (cmd3, "none");
-#ifdef MACHINE_TYPE
- guestfs_int_cmd_add_arg (cmd3, "-M");
- guestfs_int_cmd_add_arg (cmd3, MACHINE_TYPE);
-#endif
guestfs_int_cmd_add_arg (cmd3, "-machine");
- guestfs_int_cmd_add_arg (cmd3, "accel=kvm:tcg");
+ guestfs_int_cmd_add_arg (cmd3,
+#ifdef MACHINE_TYPE
+ MACHINE_TYPE ","
+#endif
+ "accel=kvm:tcg");
guestfs_int_cmd_add_arg (cmd3, "-device");
guestfs_int_cmd_add_arg (cmd3, "?");
guestfs_int_cmd_clear_capture_errors (cmd3);
--
2.5.2
9 years, 2 months
[PATCH] build: ensure .pot and .pod files for docs are up-to-date
by Pino Toscano
Traverse the po-docs directory before the subdirectories with translated
documentations, so we can make sure that libguestfs-docs.pot and the
translated .pod files have been generated. As a consequence of that,
when generating the translated manpages for documentations, all the
needed .pod files should be already there.
---
po-docs/Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am
index a274898..bf10558 100644
--- a/po-docs/Makefile.am
+++ b/po-docs/Makefile.am
@@ -41,7 +41,9 @@ CLEANFILES = po4a.conf
# language directory contains a Makefile.am that we need to keep up to
# date (note each $lang/Makefile.am should be identical).
# XXX Is there a better way?
-SUBDIRS = $(linguas)
+# The current directory is traversed first, to make sure that .pot and .pod
+# files are up-to-date and generated before applying translations in subdirs.
+SUBDIRS = . $(linguas)
update-po: libguestfs-docs.pot
@@ -88,3 +90,5 @@ podfiles: Makefile
for f in `cat $(top_srcdir)/po/POTFILES-pl`; do echo $(top_srcdir)/$$f; done >> $@-t
LC_ALL=C sort -o $@-t $@-t
mv $@-t $@
+
+all-local: update-po
--
2.1.0
9 years, 2 months
[PATCH] ruby: improve rdoc markup
by Pino Toscano
- fix the syntax of hyperlinks
- replace the deprecation text with a simplier named list item, so it's
more visible
- use a named list item for the pointer to the C documentation of each
API
- add a named list item for the version of each API
---
generator/ruby.ml | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/generator/ruby.ml b/generator/ruby.ml
index cd6678d..87bb34a 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -178,7 +178,7 @@ parse_flags (int argc, VALUE *argv)
* Guestfs::Guestfs.new([{:environment => false, :close_on_exit => false}]) -> Guestfs::Guestfs
*
* Call
- * +guestfs_create_flags+[http://libguestfs.org/guestfs.3.html#guestfs_create_flags]
+ * {guestfs_create_flags}[http://libguestfs.org/guestfs.3.html#guestfs_create_flags]
* to create a new libguestfs handle. The handle is represented in
* Ruby as an instance of the Guestfs::Guestfs class.
*/
@@ -235,7 +235,7 @@ ruby_guestfs_create (int argc, VALUE *argv, VALUE module)
* g.close() -> nil
*
* Call
- * +guestfs_close+[http://libguestfs.org/guestfs.3.html#guestfs_close]
+ * {guestfs_close}[http://libguestfs.org/guestfs.3.html#guestfs_close]
* to close the libguestfs handle.
*/
static VALUE
@@ -258,7 +258,7 @@ ruby_guestfs_close (VALUE gv)
* g.set_event_callback(cb, event_bitmask) -> event_handle
*
* Call
- * +guestfs_set_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback]
+ * {guestfs_set_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback]
* to register an event callback. This returns an event handle.
*/
static VALUE
@@ -297,7 +297,7 @@ ruby_set_event_callback (VALUE gv, VALUE cbv, VALUE event_bitmaskv)
* g.delete_event_callback(event_handle) -> nil
*
* Call
- * +guestfs_delete_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback]
+ * {guestfs_delete_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback]
* to delete an event callback.
*/
static VALUE
@@ -328,7 +328,7 @@ ruby_delete_event_callback (VALUE gv, VALUE event_handlev)
* Guestfs::Guestfs.event_to_string(events) -> string
*
* Call
- * +guestfs_event_to_string+[http://libguestfs.org/guestfs.3.html#guestfs_event_to_string]
+ * {guestfs_event_to_string}[http://libguestfs.org/guestfs.3.html#guestfs_event_to_string]
* to convert an event or event bitmask into a printable string.
*/
static VALUE
@@ -477,13 +477,18 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
if f.protocol_limit_warning then
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
- let doc =
- match deprecation_notice f with
- | None -> doc
- | Some txt -> doc ^ "\n\n" ^ txt in
let doc = pod2text ~width:60 f.name doc in
let doc = String.concat "\n * " doc in
let doc = trim doc in
+ let doc =
+ match version_added f with
+ | None -> doc
+ | Some version -> doc ^ (sprintf "\n *\n * [Since] Added in version %s." version) in
+ let doc =
+ match f with
+ | { deprecated_by = None } -> doc
+ | { deprecated_by = Some alt } ->
+ doc ^ (sprintf "\n *\n * [Deprecated] In new code, use rdoc-ref:%s instead." alt) in
(* Because Ruby documentation appears as C comments, we must
* replace any instance of "/*".
@@ -518,8 +523,8 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
*
* %s
*
- * (For the C API documentation for this function, see
- * +guestfs_%s+[http://libguestfs.org/guestfs.3.html#guestfs_%s]).
+ * [C API] For the C API documentation for this function, see
+ * {guestfs_%s}[http://libguestfs.org/guestfs.3.html#guestfs_%s].
*/
" f.name args ret f.shortdesc doc f.name f.name
) else (
--
2.1.0
9 years, 2 months
[PATCH] customize: sles password defaults.
by Cédric Bosdonnat
---
customize/password.ml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/customize/password.ml b/customize/password.ml
index 258d726..1f9b8fe 100644
--- a/customize/password.ml
+++ b/customize/password.ml
@@ -165,6 +165,9 @@ and default_crypto g root =
| "opensuse", v when v >= 11 -> `SHA512
| "opensuse", _ -> `MD5
+ | "sles", v when v >= 11 -> `SHA512
+ | "sles", _ -> `MD5
+
| _, _ ->
let minor = g#inspect_get_minor_version root in
warning (f_"password: using insecure md5 password encryption for guest of type %s version %d.%d.
--
2.1.4
9 years, 2 months
Re: [Libguestfs] grub-install with guestfish
by Richard W.M. Jones
[Sending the question to the proper mailing list]
On Thu, Oct 01, 2015 at 10:50:13AM +0100, slim tabka wrote:
> Hello Mr Richard Jones,
>
> First of all, thank you for the amazing tools that you are creating.
> I'm new to the virtualization and libguestfs ,so I'm hoping you can help me
> to at least understand what's the problem I'm having exactly or to know if
> there's a way to resolve it , and any suggestion or advice is much
> appreciated.
>
> I have a problem while trying to create a vm (the method I'm using is to
> copy the filesystem of a template in a newly created lvm device and I
> modify the fstab file and grub.conf with the uuid of the newely created
> device) but the vm get stuck in booting from hard disk , while using xen I
> switched the vm to a pv guest and used pygrub and now the vm is working
> properly , the problem is with kvm (installed on ubuntu 14.04) the vm
> (centos guest) is always stuck in the booting and didn't find a tool like
> pygrub on kvm , the only way to make the vm work is to manually install
> grub through a livecd, I thought of using guestfish and use grub-install /
> /dev/sda but when I try to start the vm it is stuck in grub2.0.2 shell.
> It seems that with grub-install with guestfish it installed grub2 but in
> the man page of guestfish it's said that it only install grub1.
>
> So is it because kvm is installed on ubuntu that's why grub-install
> installs grub2?? and if the host is centos , wil I have problems with
> ubuntu guests while tring to install grub ??? So why even if I modified the
> /boot/grub/grub.conf inside the guest it still don't want to boot?? if the
> host is kvm on ubuntu will I have problems with centos guest and if the
> host is centos will I have problems with ubuntu guest??
> I'm really confused wth all this , I don't know if I'm missing something.
>
> I'm not sure if I was clear enough , and if needed I can provide you more
> infos , but it's been a while that I'm stuck so any suggestion will be more
> than welcome , so thank you for your time and I hope I'm not bothering you.
>
> Slim TABKA
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
9 years, 2 months