difficulty using virt-v2v with OVA
by solarflow99
I have a Fedora 24 system I can already get this working for most OVA
files, just the BSD and atomic ones weren't recognized. Assuming my
version of virt-v2v is just old, I installed rawhide on a different system
and tried with virt-v2v-1.37.8-1.fc27.x86_64 and now its having another
problem. Is there a known version of virt-v2v I should be using? Here is
the output from the rawhide attempt happens for any OVA file I try:
# virt-v2v -v -x -i ova graylog.ova -o qemu -of qcow2 -os /var/tmp
--qemu-boot
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1e984e0, program = virt-v2v
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1e988d0, program = virt-v2v
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1e993e0, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
virt-v2v: libguestfs 1.37.8fedora=27,release=1.fc27,libvirt (x86_64)
libvirt version: 3.2.0
[ 0.0] Opening the source -i ova graylog.ova
qemu-img info json:'{ "file": { "driver": "raw", "offset": 512, "size":
512, "file": { "filename": "/tmp/v2vqemuimgtstee6f2b.img" } } }' >/dev/null
qemu-img supports "offset" and "size" in json URLs: true
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1e98ee0, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libvirt supports "raw" driver in json URL: true
tar -tf 'graylog.ova'
tar '-xf' 'graylog.ova' '-C' '/var/tmp/ova.bRNpvE' 'graylog.ovf'
'graylog.mf'
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1ebe250, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
virt-v2v: warning: making OVA directory public readable to work around
libvirt bug https://bugzilla.redhat.com/1045069
chmod '-R' 'go=u,go-w' '/var/tmp/ova.bRNpvE' 'graylog.ova'
processing manifest /var/tmp/ova.bRNpvE/graylog.mf
tar xOf 'graylog.ova' 'graylog.ovf' | sha1sum
tar xOf 'graylog.ova' 'graylog-disk1.vmdk' | sha1sum
tar tRvf 'graylog.ova'
json: json:{ "file": { "driver": "raw", "offset": 10240, "size":
1146813952, "file": { "driver": "file", "filename": "/root/graylog.ova" } }
}
source name: graylog
hypervisor type: vmware
memory: 2147483648 (bytes)
nr vCPUs: 1
CPU vendor:
CPU model:
CPU topology: sockets: - cores/socket: - threads/core: -
CPU features:
firmware: bios
display:
video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": 10240, "size": 1146813952,
"file": { "driver": "file", "filename": "/root/graylog.ova" } } } (vmdk)
[scsi]
removable media:
NICs:
Network "Ethernet 1"
check_host_free_space: overlay_dir=/var/tmp free_space=42292809728
[ 3.1] Creating an overlay to protect the source from being modified
qemu-img 'create' '-q' '-f' 'qcow2' '-b' 'json:{ "file": { "driver": "raw",
"offset": 10240, "size": 1146813952, "file": { "driver": "file",
"filename": "/root/graylog.ova" } } }' '-o' 'compat=1.1,backing_fmt=vmdk'
'/var/tmp/v2vovle91365.qcow2'
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1effb80, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: disk_has_backing_file "/var/tmp/v2vovle91365.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/3
libguestfs: parse_json: qemu-img info JSON output:\n{\n
"backing-filename-format": "vmdk",\n "virtual-size": 21474836480,\n
"filename": "/dev/fd/3",\n "cluster-size": 65536,\n "format":
"qcow2",\n "actual-size": 200704,\n "format-specific": {\n
"type": "qcow2",\n "data": {\n "compat":
"1.1",\n "lazy-refcounts": false,\n "refcount-bits":
16,\n "corrupt": false\n }\n },\n
"full-backing-filename": "json:{ \"file\": { \"driver\": \"raw\",
\"offset\": 10240, \"size\": 1146813952, \"file\": { \"driver\": \"file\",
\"filename\": \"/root/graylog.ova\" } } }",\n "backing-filename":
"json:{ \"file\": { \"driver\": \"raw\", \"offset\": 10240, \"size\":
1146813952, \"file\": { \"driver\": \"file\", \"filename\":
\"/root/graylog.ova\" } } }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_has_backing_file = 1
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1effed0, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: disk_virtual_size "/var/tmp/v2vovle91365.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/3
libguestfs: parse_json: qemu-img info JSON output:\n{\n
"backing-filename-format": "vmdk",\n "virtual-size": 21474836480,\n
"filename": "/dev/fd/3",\n "cluster-size": 65536,\n "format":
"qcow2",\n "actual-size": 200704,\n "format-specific": {\n
"type": "qcow2",\n "data": {\n "compat":
"1.1",\n "lazy-refcounts": false,\n "refcount-bits":
16,\n "corrupt": false\n }\n },\n
"full-backing-filename": "json:{ \"file\": { \"driver\": \"raw\",
\"offset\": 10240, \"size\": 1146813952, \"file\": { \"driver\": \"file\",
\"filename\": \"/root/graylog.ova\" } } }",\n "backing-filename":
"json:{ \"file\": { \"driver\": \"raw\", \"offset\": 10240, \"size\":
1146813952, \"file\": { \"driver\": \"file\", \"filename\":
\"/root/graylog.ova\" } } }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_virtual_size = 21474836480
[ 3.2] Initializing the target -o qemu -os /var/tmp --qemu-boot
[ 3.2] Opening the overlay
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x1f00280, program = virt-v2v
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_identifier "v2v"
libguestfs: trace: v2v: set_identifier = 0
libguestfs: trace: v2v: get_memsize
libguestfs: trace: v2v: get_memsize = 500
libguestfs: trace: v2v: set_memsize 2000
libguestfs: trace: v2v: set_memsize = 0
libguestfs: trace: v2v: set_network true
libguestfs: trace: v2v: set_network = 0
libguestfs: trace: v2v: add_drive "/var/tmp/v2vovle91365.qcow2"
"format:qcow2" "cachemode:unsafe" "discard:besteffort" "copyonread:true"
libguestfs: trace: v2v: add_drive = 0
libguestfs: trace: v2v: launch
libguestfs: trace: v2v: get_tmpdir
libguestfs: trace: v2v: get_tmpdir = "/tmp"
libguestfs: trace: v2v: version
libguestfs: trace: v2v: version = <struct guestfs_version = major: 1,
minor: 37, release: 8, extra: fedora=27,release=1.fc27,libvirt, >
libguestfs: trace: v2v: get_backend
libguestfs: trace: v2v: get_backend = "libvirt"
libguestfs: launch: program=virt-v2v
libguestfs: launch: identifier=v2v
libguestfs: launch: version=1.37.8fedora=27,release=1.fc27,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsu6lY8x
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 3002000 (3.2.0)
libguestfs: guest random name = guestfs-jf27nn19mslze1id
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth =
default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x1f00900
libguestfs: qemu version (reported by libvirt) = 2008093 (2.8.93)
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: trace: v2v: get_backend_setting "force_tcg"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "internal_libvirt_label"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting
"internal_libvirt_norelabel_disks"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "network_bridge"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: build appliance
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.17
supermin: rpm: detected RPM version 4.13
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: trace: v2v: disk_create "/tmp/libguestfsu6lY8x/overlay1"
"qcow2" -1 "backingfile:/var/tmp/.guestfs-0/appliance.d/root"
"backingformat:raw"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o
backing_file=/var/tmp/.guestfs-0/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsu6lY8x/overlay1
Formatting '/tmp/libguestfsu6lY8x/overlay1', fmt=qcow2 size=4294967296
backing_file=/var/tmp/.guestfs-0/appliance.d/root backing_fmt=raw
encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: trace: v2v: disk_create = 0
libguestfs: trace: v2v: get_sockdir
libguestfs: trace: v2v: get_sockdir = "/tmp"
libguestfs: set_socket_create_context: getcon failed: (none): Invalid
argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
Invalid argument [you can ignore this message if you are not using SELinux
+ sVirt]
libguestfs: create libvirt XML
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: libvirt XML:\n<?xml version="1.0"?>\n<domain type="kvm"
xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">\n
<name>guestfs-jf27nn19mslze1id</name>\n <memory
unit="MiB">2000</memory>\n <currentMemory
unit="MiB">2000</currentMemory>\n <cpu mode="host-passthrough">\n
<model fallback="allow"/>\n </cpu>\n <vcpu>1</vcpu>\n <clock
offset="utc">\n <timer name="rtc" tickpolicy="catchup"/>\n <timer
name="pit" tickpolicy="delay"/>\n <timer name="hpet" present="no"/>\n
</clock>\n <os>\n <type>hvm</type>\n
<kernel>/var/tmp/.guestfs-0/appliance.d/kernel</kernel>\n
<initrd>/var/tmp/.guestfs-0/appliance.d/initrd</initrd>\n
<cmdline>panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory
usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb
selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm
guestfs_identifier=v2v</cmdline>\n <bios useserial="yes"/>\n </os>\n
<on_reboot>destroy</on_reboot>\n <devices>\n <rng
model="virtio">\n <backend model="random">/dev/urandom</backend>\n
</rng>\n <controller type="scsi" index="0" model="virtio-scsi"/>\n
<disk device="disk" type="file">\n <source
file="/var/tmp/v2vovle91365.qcow2"/>\n <target dev="sda"
bus="scsi"/>\n <driver name="qemu" type="qcow2" cache="unsafe"
discard="unmap"/>\n <address type="drive" controller="0" bus="0"
target="0" unit="0"/>\n </disk>\n <disk type="file"
device="disk">\n <source
file="/tmp/libguestfsu6lY8x/overlay1"/>\n <target dev="sdb"
bus="scsi"/>\n <driver name="qemu" type="qcow2"
cache="unsafe"/>\n <address type="drive" controller="0" bus="0"
target="1" unit="0"/>\n <shareable/>\n </disk>\n <serial
type="unix">\n <source mode="connect"
path="/tmp/libguestfs7bRh8r/console.sock"/>\n <target port="0"/>\n
</serial>\n <channel type="unix">\n <source mode="connect"
path="/tmp/libguestfs7bRh8r/guestfsd.sock"/>\n <target type="virtio"
name="org.libguestfs.channel.0"/>\n </channel>\n <interface
type="bridge">\n <source bridge="virbr0"/>\n <model
type="virtio"/>\n </interface>\n <controller type="usb"
model="none"/>\n <memballoon model="none"/>\n </devices>\n
<qemu:commandline>\n <qemu:env name="TMPDIR" value="/var/tmp"/>\n
</qemu:commandline>\n</domain>\n
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -R
libguestfs: command: run: \ -Z /var/tmp/.guestfs-0
libguestfs: /var/tmp/.guestfs-0:
libguestfs: total 52
libguestfs: drwxr-xr-x 3 root root ? 4096 Apr 6
21:50 .
libguestfs: drwxrwxrwt. 8 root root system_u:object_r:tmp_t:s0 4096 Apr 6
21:50 ..
libguestfs: drwxr-xr-x 2 root root ? 4096 Apr 6
21:47 appliance.d
libguestfs: -rw-r--r-- 1 root root ? 0 Apr 6
21:32 lock
libguestfs: -rw-r--r-- 1 root root ? 10116 Apr 6
21:33 qemu.devices
libguestfs: -rw-r--r-- 1 root root ? 24500 Apr 6
21:33 qemu.help
libguestfs: -rw-r--r-- 1 root root ? 35 Apr 6
21:33 qemu.stat
libguestfs:
libguestfs: /var/tmp/.guestfs-0/appliance.d:
libguestfs: total 263516
libguestfs: drwxr-xr-x 2 root root ? 4096 Apr 6 21:47 .
libguestfs: drwxr-xr-x 3 root root ? 4096 Apr 6 21:50 ..
libguestfs: -rw-r--r-- 1 root root ? 567296 Apr 6 21:50 initrd
libguestfs: -rwxr-xr-x 1 root root ? 8024664 Apr 6 21:50 kernel
libguestfs: -rw-r--r-- 1 root root ? 4294967296 Apr 6 21:50 root
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -Z /tmp/libguestfs7bRh8r
libguestfs: total 0
libguestfs: drwxr-xr-x 2 root root ? 80 Apr 6 21:50 .
libguestfs: drwxrwxrwt 11 root root ? 260 Apr 6 21:50 ..
libguestfs: srw-rw---- 1 root qemu ? 0 Apr 6 21:50 console.sock
libguestfs: srw-rw---- 1 root qemu ? 0 Apr 6 21:50 guestfsd.sock
libguestfs: launch libvirt guest
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
Invalid argument [you can ignore this message if you are not using SELinux
+ sVirt]
libguestfs: trace: v2v: launch = -1 (error)
virt-v2v: error: libguestfs error: could not create appliance through
libvirt.
Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct
Original error from libvirt: Cannot access backing file '/root/graylog.ova'
of storage file '/var/tmp/v2vovle91365.qcow2' (as uid:107, gid:107):
Permission denied [code=38 int1=13]
rm -rf '/var/tmp/ova.bRNpvE'
rm -rf '/var/tmp/null.ESbL2T'
libguestfs: trace: v2v: close
libguestfs: closing guestfs handle 0x1f00280 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsu6lY8x
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs7bRh8r
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1effed0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1effb80 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1ebe250 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1e98ee0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1e993e0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1e988d0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1e984e0 (state 0)
7 years, 7 months
[PATCH] v2v: ovf: Add virtio-rng and memory balloon device
by Tomáš Golembiovský
This affects -o rhv and -o vdsm.
Signed-off-by: Tomáš Golembiovský <tgolembi(a)redhat.com>
---
v2v/create_ovf.ml | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml
index cfca63452..03df7f934 100644
--- a/v2v/create_ovf.ml
+++ b/v2v/create_ovf.ml
@@ -390,6 +390,29 @@ let rec create_ovf source targets guestcaps inspect
]
];
+ (* Add the miscellaneous KVM devices. *)
+ if guestcaps.gcaps_virtio_rng then
+ append virtual_hardware_section_items [
+ e "Item" [] [
+ e "rasd:Description" [] [PCData "RNG Device"];
+ e "rasd:InstanceId" [] [PCData (uuidgen ())];
+ e "rasd:ResourceType" [] [PCData "0"];
+ e "Type" [] [PCData "rng"];
+ e "Device" [] [PCData "virtio"];
+ ]
+ ];
+ if guestcaps.gcaps_virtio_balloon then
+ append virtual_hardware_section_items [
+ e "Item" [] [
+ e "rasd:Description" [] [PCData "Memory Ballooning Device"];
+ e "rasd:InstanceId" [] [PCData (uuidgen ())];
+ e "rasd:ResourceType" [] [PCData "0"];
+ e "Type" [] [PCData "balloon"];
+ e "Device" [] [PCData "memballoon"];
+ ]
+ ];
+
+
push_back content_subnodes (
e "Section" ["xsi:type", "ovf:VirtualHardwareSection_Type"]
!virtual_hardware_section_items
--
2.12.1
7 years, 7 months
[PATCH 1/2] mllib: add new Common_utils.run_commands
by Pino Toscano
Mostly modelled after a snippet implemented in dib, it is an helper
function to run multiple commands in parallel, waiting for all of them
at once, and returning all their exit codes. It is possible to pass
custom descriptors for collecting stdout and stderr of each command.
Common_utils.run_command is adapted to use it, so all the existing
code using it keeps working.
Add a simple unit tests for it.
---
mllib/common_utils.ml | 85 +++++++++++++++++++++++++++++++++------------
mllib/common_utils.mli | 19 ++++++++++
mllib/common_utils_tests.ml | 50 ++++++++++++++++++++++++++
3 files changed, 132 insertions(+), 22 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 73546d7..0008d3a 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -825,29 +825,70 @@ let external_command ?(echo_cmd = true) cmd =
);
lines
+let run_commands ?(echo_cmd = true) cmds =
+ let res = Array.make (List.length cmds) 0 in
+ let get_fd default = function
+ | None ->
+ default
+ | Some fd ->
+ Unix.set_close_on_exec fd;
+ fd
+ in
+ let pids =
+ mapi (
+ fun i (args, out, err) ->
+ let app = List.hd args in
+ try
+ let app =
+ if Filename.is_relative app then which app
+ else (Unix.access app [Unix.X_OK]; app) in
+ let outfd = get_fd Unix.stdout out in
+ let errfd = get_fd Unix.stderr err in
+ if echo_cmd then
+ debug "%s" (stringify_args args);
+ let pid = Unix.create_process app (Array.of_list args) Unix.stdin
+ outfd errfd in
+ Some (i, pid, app, out, err)
+ with
+ | Executable_not_found _ ->
+ res.(i) <- 127;
+ None
+ | Unix.Unix_error (errcode, _, _) when errcode = Unix.ENOENT ->
+ res.(i) <- 127;
+ None
+ ) cmds in
+ let pids = filter_map (fun x -> x) pids in
+ let pids = ref pids in
+ while !pids <> [] do
+ let pid, stat = Unix.waitpid [] 0 in
+ let matching_pair, new_pids =
+ List.partition (
+ fun (_, p, _, _, _) ->
+ pid = p
+ ) !pids in
+ if matching_pair <> [] then (
+ let matching_pair = List.hd matching_pair in
+ let idx, _, app, outfd, errfd = matching_pair in
+ may Unix.close outfd;
+ may Unix.close errfd;
+ pids := new_pids;
+ match stat with
+ | Unix.WEXITED i ->
+ res.(idx) <- i
+ | Unix.WSIGNALED i ->
+ error (f_"external command ‘%s’ killed by signal %d")
+ app i
+ | Unix.WSTOPPED i ->
+ error (f_"external command ‘%s’ stopped by signal %d")
+ app i
+ );
+ done;
+ Array.to_list res
+
let run_command ?(echo_cmd = true) args =
- if echo_cmd then
- debug "%s" (stringify_args args);
- let app = List.hd args in
- try
- let app =
- if Filename.is_relative app then which app
- else (Unix.access app [Unix.X_OK]; app) in
- let pid =
- Unix.create_process app (Array.of_list args) Unix.stdin
- Unix.stdout Unix.stderr in
- let _, stat = Unix.waitpid [] pid in
- match stat with
- | Unix.WEXITED i -> i
- | Unix.WSIGNALED i ->
- error (f_"external command ‘%s’ killed by signal %d")
- (stringify_args args) i
- | Unix.WSTOPPED i ->
- error (f_"external command ‘%s’ stopped by signal %d")
- (stringify_args args) i
- with
- | Executable_not_found tool -> 127
- | Unix.Unix_error (errcode, _, _) when errcode = Unix.ENOENT -> 127
+ let ret = run_commands ~echo_cmd [(args, None, None)] in
+ assert (List.length ret = 1);
+ List.hd ret
let shell_command ?(echo_cmd = true) cmd =
if echo_cmd then
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index 1cd38ba..90351ad 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -359,6 +359,25 @@ val external_command : ?echo_cmd:bool -> string -> string list
[echo_cmd] specifies whether to output the full command on verbose
mode, and it's on by default. *)
+val run_commands : ?echo_cmd:bool -> (string list * Unix.file_descr option * Unix.file_descr option) list -> int list
+(** Run external commands in parallel without using a shell,
+ and return a list with their exit codes.
+
+ The list of commands is composed as tuples:
+ - the first element is a list of command and its arguments
+ - the second element is an optional [Unix.file_descr] descriptor
+ for the stdout of the process; if not specified, [stdout] is
+ used
+ - the third element is an optional [Unix.file_descr] descriptor
+ for the stderr of the process; if not specified, [stderr] is
+ used
+
+ If any descriptor is specified, it is automatically closed at the
+ end of the execution of the command for which it was specified.
+
+ [echo_cmd] specifies whether output the full command on verbose
+ mode, and it's on by default. *)
+
val run_command : ?echo_cmd:bool -> string list -> int
(** Run an external command without using a shell, and return its exit code.
diff --git a/mllib/common_utils_tests.ml b/mllib/common_utils_tests.ml
index aacc01e..42af7be 100644
--- a/mllib/common_utils_tests.ml
+++ b/mllib/common_utils_tests.ml
@@ -26,6 +26,7 @@ let assert_equal_string = assert_equal ~printer:(fun x -> x)
let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
+let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat ";" (List.map string_of_int x)) ^ ")")
let test_subdirectory ctx =
assert_equal_string "" (subdirectory "/foo" "/foo");
@@ -131,6 +132,54 @@ let test_string_lines_split ctx =
assert_equal_stringlist ["A\nB"; ""] (String.lines_split "A\\\nB\n");
assert_equal_stringlist ["A\nB\n"] (String.lines_split "A\\\nB\\\n")
+(* Test Common_utils.run_commands. *)
+let test_run_commands ctx =
+ begin
+ let res = run_commands [] in
+ assert_equal_intlist [] res
+ end;
+ begin
+ let res = run_commands [(["true"], None, None)] in
+ assert_equal_intlist [0] res
+ end;
+ begin
+ let res = run_commands [(["true"], None, None); (["false"], None, None)] in
+ assert_equal_intlist [0; 1] res
+ end;
+ begin
+ let res = run_commands [(["this-command-does-not-really-exist"], None, None)] in
+ assert_equal_intlist [127] res
+ end;
+ begin
+ let tmpfile, chan = bracket_tmpfile ctx in
+ let res = run_commands [(["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None)] in
+ assert_equal_intlist [0] res;
+ let content = read_whole_file tmpfile in
+ assert_equal_string "this is a test\n" content
+ end;
+ begin
+ let tmpfile, chan = bracket_tmpfile ctx in
+ let res = run_commands [(["ls"; "/this-directory-is-unlikely-to-exist"], None, Some (Unix.descr_of_out_channel chan))] in
+ assert_equal_intlist [2] res;
+ let content = read_whole_file tmpfile in
+ assert_bool "test_run_commands/not-existing/content" (String.length content > 0)
+ end;
+ begin
+ let tmpfile, chan = bracket_tmpfile ctx in
+ let res = run_commands [(["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None); (["false"], None, None)] in
+ assert_equal_intlist [0; 1] res;
+ let content = read_whole_file tmpfile in
+ assert_equal_string "this is a test\n" content
+ end;
+ begin
+ let tmpfile, chan = bracket_tmpfile ctx in
+ let res = run_commands [(["this-command-does-not-really-exist"], None, None); (["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None)] in
+ assert_equal_intlist [127; 0] res;
+ let content = read_whole_file tmpfile in
+ assert_equal_string "this is a test\n" content
+ end;
+ ()
+
(* Suites declaration. *)
let suite =
"mllib Common_utils" >:::
@@ -143,6 +192,7 @@ let suite =
"strings.is_suffix" >:: test_string_is_suffix;
"strings.find" >:: test_string_find;
"strings.lines_split" >:: test_string_lines_split;
+ "run_commands" >:: test_run_commands;
]
let () =
--
2.9.3
7 years, 7 months
[PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
by Richard W.M. Jones
All of the GPG commands we run are compatible with either v1 or v2, so
this simply involves looking for either gpg2 or gpg binaries at
runtime.
---
builder/builder.ml | 10 ++++------
builder/cmdline.ml | 8 +++++++-
builder/virt-builder.pod | 7 +++++--
docs/guestfs-building.pod | 2 +-
4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index 95f32edaf..b0a48ea89 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -148,12 +148,10 @@ let main () =
(* Check that gpg is installed. Optional as long as the user
* disables all signature checks.
*)
- let cmd = sprintf "%s --help >/dev/null 2>&1" cmdline.gpg in
- if shell_command cmd <> 0 then (
- if cmdline.check_signature then
- error (f_"gpg is not installed (or does not work)\nYou should install gpg, or use --gpg option, or use --no-check-signature.")
- else if verbose () then
- warning (f_"gpg program is not available")
+ if cmdline.check_signature then (
+ let cmd = sprintf "%s --help >/dev/null 2>&1" cmdline.gpg in
+ if cmdline.gpg = "" || shell_command cmd <> 0 then
+ error (f_"no GNU Privacy Guard (GnuPG, gpg) binary was found.\n\nEither gpg v1 or v2 can be installed to check signatures. Virt-builder looks for a binary called either ‘gpg2’ or ‘gpg‘ on the $PATH. You can also specify a binary using the ‘--gpg’ option. If you don't want to check signatures, use ’--no-check-signature’ but note that this may make you vulnerable to Man-In-The-Middle attacks.")
);
(* Check that curl works. *)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index aa852e8f5..f20c0936c 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -87,7 +87,13 @@ let parse_cmdline () =
let add_fingerprint arg = push_front arg fingerprints in
let format = ref "" in
- let gpg = ref "gpg" in
+ let gpg =
+ try which "gpg2"
+ with Executable_not_found _ ->
+ try which "gpg"
+ with Executable_not_found _ ->
+ "" in
+ let gpg = ref gpg in
let list_format = ref List_entries.Short in
let list_set_long () = list_format := List_entries.Long in
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
index b48b1241b..dbbd6469e 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -314,8 +314,10 @@ F</boot> directory of a guest, see L<virt-copy-out(1)>.
=item B<--gpg> GPG
-Specify an alternate L<gpg(1)> (GNU Privacy Guard) binary. You can
-also use this to add gpg parameters, for example to specify an
+Specify an alternate L<gpg(1)> (GNU Privacy Guard) binary. By default
+virt-builder looks for either C<gpg2> or C<gpg> in the C<$PATH>.
+
+You can also use this to add gpg parameters, for example to specify an
alternate home directory:
virt-builder --gpg "gpg --homedir /tmp" [...]
@@ -1880,6 +1882,7 @@ L<virt-resize(1)>,
L<virt-sysprep(1)>,
L<oz-install(1)>,
L<gpg(1)>,
+L<gpg2(1)>,
L<curl(1)>,
L<virt-make-fs(1)>,
L<genisoimage(1)>,
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index 5e314b34d..bfb46a02f 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -280,7 +280,7 @@ Optional. For the L<UML backend|guestfs(3)/BACKEND>.
Optional. Used by virt-builder for downloads.
-=item gpg
+=item GNU Privacy Guard (GnuPG, gpg) v1 or v2
Optional. Used by virt-builder for checking digital signatures.
--
2.12.0
7 years, 7 months
[PATCH] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
by Richard W.M. Jones
All of the GPG commands we run are compatible with either v1 or v2, so
this simply involves changing the configure script to find either
binary.
---
builder/cmdline.ml | 2 +-
docs/guestfs-building.pod | 17 ++++++++++++++++-
m4/guestfs_progs.m4 | 19 +++++++++++++++++++
mllib/guestfs_config.ml.in | 1 +
4 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index aa852e8f5..5424e885a 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -87,7 +87,7 @@ let parse_cmdline () =
let add_fingerprint arg = push_front arg fingerprints in
let format = ref "" in
- let gpg = ref "gpg" in
+ let gpg = ref Guestfs_config.gnupg in
let list_format = ref List_entries.Short in
let list_set_long () = list_format := List_entries.Long in
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index 5e314b34d..b29fcc4ab 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -280,10 +280,25 @@ Optional. For the L<UML backend|guestfs(3)/BACKEND>.
Optional. Used by virt-builder for downloads.
-=item gpg
+=item GNU Privacy Guard (GnuPG, gpg) v1 or v2
Optional. Used by virt-builder for checking digital signatures.
+Either version 1 or version 2 or fallback from v2 to v1 may be used by
+specifying:
+
+ ./configure --with-gnupg="gpg"
+
+ ./configure --with-gnupg="gpg2"
+
+ ./configure --with-gnupg="gpg2 gpg"
+
+Additionally the end user can override the choice using the
+virt-builder I<--gpg> option.
+
+B<NB:> Do not confuse C<gpg2> with C<gpgv2>. The latter is for
+B<v>erifying signatures only, and will not work as the gnupg binary.
+
=item liblzma
Optional. If available, virt-builder will use this library
diff --git a/m4/guestfs_progs.m4 b/m4/guestfs_progs.m4
index 1f0a4c1f6..ec1f400e9 100644
--- a/m4/guestfs_progs.m4
+++ b/m4/guestfs_progs.m4
@@ -114,6 +114,25 @@ if test "x$YACC" = "xyacc"; then
AC_MSG_FAILURE([GNU 'bison' is required (yacc won't work).])
fi
+dnl Check for GnuPG, used by virt-builder. This is just the
+dnl default binary, and it can be overridden on the command line.
+AC_ARG_WITH([gnupg],
+ [AS_HELP_STRING([--with-gnupg="gpg2"],
+ [set default GNU Privacy Guard binary v1 or v2 @<:@default="gpg2 gpg"@:>@])],
+ [],
+ [with_gnupg="gpg2 gpg"]
+)
+
+AS_IF([test "x$with_gnupg" = "xno"],[
+ AC_MSG_WARN([GnuPG was disabled, you must use virt-builder --gpg option to check signatures])
+ GNUPG=no
+],[
+ AC_PATH_PROGS([GNUPG],[$with_gnupg],[no])
+ AS_IF([test "x$GNUPG" = "xno"],[
+ AC_MSG_WARN([GnuPG was not found])
+ ])
+])
+
dnl zip/unzip, used by virt-v2v
AC_PATH_PROGS([ZIP],[zip],[no])
AC_DEFINE_UNQUOTED([ZIP],["$ZIP"],[Name of zip program.])
diff --git a/mllib/guestfs_config.ml.in b/mllib/guestfs_config.ml.in
index 4d1a5c5d0..68dbcbc20 100644
--- a/mllib/guestfs_config.ml.in
+++ b/mllib/guestfs_config.ml.in
@@ -23,3 +23,4 @@ let package_version_full = "@PACKAGE_VERSION_FULL@"
let prefix = "@prefix@"
let datadir = prefix ^ "/share"
let host_cpu = "@host_cpu@"
+let gnupg = "@GNUPG@"
--
2.12.0
7 years, 7 months
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
by Richard W.M. Jones
Only in end-user messages and documentation. This change was done
mostly mechanically using the Perl script attached below.
I also changed don't -> don’t etc and made some other simple fixes.
See also: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
----------
#!/usr/bin/perl -w
use strict;
use Locale::PO;
my $re = qr{'([-\w%.,=?*/]+)'};
my %files = ();
foreach my $filename ("po/libguestfs.pot", "po-docs/libguestfs-docs.pot") {
my $poref = Locale::PO->load_file_asarray($filename);
foreach my $po (@$poref) {
if ($po->msgid =~ $re) {
my @refs = split /\s+/, $po->reference;
foreach my $ref (@refs) {
my ($file, $lineno) = split /:/, $ref, 2;
$file =~ s{^\.\./}{};
if (exists $files{$file}) {
push @{$files{$file}}, $lineno;
} else {
$files{$file} = [$lineno];
}
}
}
}
}
foreach my $file (sort keys %files) {
unless (-w $file) {
warn "warning: $file is probably generated\n"; # have to edit generator
next;
}
my @lines = sort { $a <=> $b } @{$files{$file}};
#print "editing $file at lines ", join (", ", @lines), " ...\n";
open FILE, "<$file" or die "$file: $!";
my @all = ();
push @all, $_ while <FILE>;
close FILE;
my $ext = $file;
$ext =~ s/^.*\.//;
foreach (@lines) {
# Don't mess with verbatim sections in POD files.
next if $ext eq "pod" && $all[$_-1] =~ m/^ /;
unless ($all[$_-1] =~ $re) {
# this can happen for multi-line strings, have to edit it
# by hand
warn "warning: $file:$_ does not contain expected content\n";
next;
}
$all[$_-1] =~ s/$re/‘$1’/g;
}
rename "$file", "$file.bak";
open FILE, ">$file" or die "$file: $!";
print FILE $_ for @all;
close FILE;
my $mode = (stat ("$file.bak"))[2];
chmod ($mode & 0777, "$file");
}
---
align/virt-alignment-scan.pod | 2 +-
builder/builder.ml | 4 ++--
builder/cmdline.ml | 16 +++++++--------
builder/downloader.ml | 2 +-
builder/index-validate.c | 8 ++++----
builder/index_parser.ml | 26 +++++++++++------------
builder/sigchecker.ml | 10 ++++-----
builder/sources.ml | 2 +-
builder/virt-builder.pod | 24 +++++++++++-----------
builder/yajl.ml | 16 +++++++--------
cat/filesystems.c | 2 +-
cat/log.c | 4 ++--
cat/virt-cat.pod | 2 +-
cat/virt-filesystems.pod | 2 +-
cat/virt-ls.pod | 4 ++--
cat/virt-tail.pod | 2 +-
common/miniexpect/miniexpect.pod | 2 +-
common/options/inspect.c | 30 +++++++++++++--------------
common/options/options.c | 4 ++--
common/options/uri.c | 2 +-
customize/customize_run.ml | 8 ++++----
customize/firstboot.ml | 4 ++--
customize/password.ml | 2 +-
customize/ssh_key.ml | 2 +-
customize/subscription_manager.ml | 4 ++--
customize/virt-customize.pod | 6 +++---
dib/cmdline.ml | 6 +++---
dib/dib.ml | 6 +++---
dib/output_format_docker.ml | 4 ++--
dib/output_format_vhd.ml | 2 +-
dib/utils.ml | 4 ++--
dib/virt-dib.pod | 4 ++--
diff/diff.c | 2 +-
docs/guestfs-building.pod | 2 +-
docs/guestfs-faq.pod | 26 +++++++++++------------
docs/guestfs-hacking.pod | 8 ++++----
docs/guestfs-internals.pod | 6 +++---
docs/guestfs-performance.pod | 4 ++--
docs/guestfs-recipes.pod | 6 +++---
docs/guestfs-security.pod | 2 +-
docs/guestfs-testing.pod | 6 +++---
edit/virt-edit.pod | 2 +-
fish/events.c | 2 +-
fish/fish.c | 22 +++++++++++---------
fish/guestfish.pod | 10 ++++-----
fish/help.c | 17 +++++++--------
fish/man.c | 2 +-
fish/prep.c | 4 ++--
fish/rc.c | 6 +++---
fish/reopen.c | 2 +-
format/format.c | 2 +-
fuse/guestmount.pod | 4 ++--
fuse/guestunmount.c | 4 ++--
fuse/guestunmount.pod | 2 +-
generator/actions.ml | 2 +-
generator/actions_core.ml | 12 +++++------
generator/actions_core_deprecated.ml | 2 +-
generator/actions_debug.ml | 2 +-
generator/actions_tsk.ml | 30 +++++++++++++--------------
get-kernel/get_kernel.ml | 2 +-
get-kernel/virt-get-kernel.pod | 2 +-
inspector/inspector.c | 2 +-
inspector/virt-inspector.pod | 2 +-
lib/copy-in-out.c | 8 ++++----
lib/create.c | 14 ++++++-------
lib/drives.c | 18 ++++++++--------
lib/fuse.c | 2 +-
lib/guestfs.pod | 30 +++++++++++++--------------
lib/handle.c | 4 ++--
lib/info.c | 6 +++---
lib/launch-libvirt.c | 18 ++++++++--------
lib/launch-uml.c | 6 +++---
lib/launch.c | 4 ++--
lib/libvirt-auth.c | 2 +-
lib/libvirt-domain.c | 18 ++++++++--------
lib/qemu.c | 6 +++---
lib/tmpdirs.c | 2 +-
make-fs/make-fs.c | 4 ++--
make-fs/virt-make-fs.pod | 2 +-
mllib/checksums.ml | 2 +-
mllib/common_utils.ml | 14 ++++++-------
mllib/getopt-c.c | 8 ++++----
p2v/virt-p2v-make-disk.pod | 2 +-
p2v/virt-p2v.pod | 4 ++--
rescue/rescue.c | 12 +++++------
rescue/suggest.c | 4 ++--
resize/resize.ml | 40 ++++++++++++++++++------------------
resize/virt-resize.pod | 6 +++---
sparsify/cmdline.ml | 2 +-
sysprep/main.ml | 6 +++---
sysprep/virt-sysprep.pod | 4 ++--
test-tool/test-tool.c | 4 ++--
tests/regressions/rhbz1044014.sh | 2 +-
tools/virt-win-reg | 2 +-
v2v/OVF.ml | 6 +++---
v2v/cmdline.ml | 10 ++++-----
v2v/convert_linux.ml | 4 ++--
v2v/convert_windows.ml | 4 ++--
v2v/input_ova.ml | 2 +-
v2v/inspect_source.ml | 4 ++--
v2v/libvirt_utils-c.c | 24 +++++++++++-----------
v2v/linux.ml | 8 ++++----
v2v/linux_bootloaders.ml | 2 +-
v2v/linux_kernels.ml | 2 +-
v2v/output_libvirt.ml | 14 ++++++-------
v2v/output_rhv.ml | 2 +-
v2v/output_vdsm.ml | 2 +-
v2v/parse_libvirt_xml.ml | 2 +-
v2v/utils.ml | 2 +-
v2v/v2v.ml | 14 ++++++-------
v2v/vCenter.ml | 4 ++--
v2v/virt-v2v.pod | 8 ++++----
112 files changed, 393 insertions(+), 390 deletions(-)
diff --git a/align/virt-alignment-scan.pod b/align/virt-alignment-scan.pod
index 54f3ffdc1..19953546e 100644
--- a/align/virt-alignment-scan.pod
+++ b/align/virt-alignment-scan.pod
@@ -178,7 +178,7 @@ single thread.
=item B<--quiet>
-Don't produce any output. Just set the exit code
+Don’t produce any output. Just set the exit code
(see L</EXIT STATUS> below).
=item B<--uuid>
diff --git a/builder/builder.ml b/builder/builder.ml
index e59c763b2..95f32edaf 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -96,7 +96,7 @@ let selected_cli_item cmdline index =
name = arg && cmdline.arch = normalize_arch a
) index
with Not_found ->
- error (f_"cannot find os-version '%s' with architecture '%s'.\nUse --list to list available guest types.")
+ error (f_"cannot find os-version ‘%s’ with architecture ‘%s’.\nUse --list to list available guest types.")
arg cmdline.arch in
item
@@ -318,7 +318,7 @@ let main () =
| { Index.checksums = Some csums } ->
(try Checksums.verify_checksums csums template
with Checksums.Mismatched_checksum (csum, csum_actual) ->
- error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!")
+ error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the ‘-v’ option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!")
(Checksums.string_of_csum_t csum) csum_actual (Checksums.string_of_csum csum)
)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index 47daf9683..aa852e8f5 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -137,7 +137,7 @@ let parse_cmdline () =
[ L"delete-cache" ], Getopt.Unit delete_cache_mode,
s_"Delete the template cache";
[ L"no-delete-on-failure" ], Getopt.Clear delete_on_failure,
- s_"Don't delete output file on failure";
+ s_"Don’t delete output file on failure";
[ L"fingerprint" ], Getopt.String ("AAAA..", add_fingerprint),
s_"Fingerprint of valid signing key";
[ L"format" ], Getopt.Set_string ("raw|qcow2", format), s_"Output format (default: raw)";
@@ -231,26 +231,26 @@ read the man page virt-builder(1).
(match args with
| [arg] -> arg
| [] ->
- error (f_"virt-builder os-version\nMissing 'os-version'. Use '--list' to list available template names.")
+ error (f_"virt-builder os-version\nMissing ‘os-version’. Use ‘--list’ to list available template names.")
| _ ->
- error (f_"too many parameters, expecting 'os-version'")
+ error (f_"too many parameters, expecting ‘os-version’")
)
| `List ->
if format <> None then
- error (f_"--list: use '--list-format', not '--format'");
+ error (f_"--list: use ‘--list-format’, not ‘--format’");
(match args with
| [arg] -> arg
| [] -> ""
| _ ->
- error (f_"too many parameters, at most one 'os-version' is allowed for --list")
+ error (f_"too many parameters, at most one ‘os-version’ is allowed for --list")
)
| `Notes ->
(match args with
| [arg] -> arg
| [] ->
- error (f_"virt-builder --notes os-version\nMissing 'os-version'. Use '--list' to list available template names.")
+ error (f_"virt-builder --notes os-version\nMissing ‘os-version’. Use ‘--list’ to list available template names.")
| _ ->
- error (f_"--notes: too many parameters, expecting 'os-version'");
+ error (f_"--notes: too many parameters, expecting ‘os-version’");
)
| `Cache_all
| `Print_cache
@@ -264,7 +264,7 @@ read the man page virt-builder(1).
(match args with
| [arg] -> arg
| [] ->
- error (f_"virt-builder --get-kernel image\nMissing 'image' (disk image file) argument")
+ error (f_"virt-builder --get-kernel image\nMissing ‘image’ (disk image file) argument")
| _ ->
error (f_"--get-kernel: too many parameters")
) in
diff --git a/builder/downloader.ml b/builder/downloader.ml
index afd9c0f96..ef3cd67cb 100644
--- a/builder/downloader.ml
+++ b/builder/downloader.ml
@@ -88,7 +88,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename =
[ path; filename_new ] in
let r = run_command cmd in
if r <> 0 then
- error (f_"cp (download) command failed copying '%s'") path;
+ error (f_"cp (download) command failed copying ‘%s’") path;
(* Any other protocol. *)
| _ ->
diff --git a/builder/index-validate.c b/builder/index-validate.c
index 33086b2fd..224cd674a 100644
--- a/builder/index-validate.c
+++ b/builder/index-validate.c
@@ -122,7 +122,7 @@ main (int argc, char *argv[])
if (ret != 0) {
parse_context_free (&context);
error (EXIT_FAILURE, 0,
- _("'%s' could not be validated, see errors above"), input);
+ _("‘%s’ could not be validated, see errors above"), input);
}
if (compat_1_24_1 && context.seen_comments) {
@@ -152,7 +152,7 @@ main (int argc, char *argv[])
strchr (fields->key, ']')) {
parse_context_free (&context);
error (EXIT_FAILURE, 0,
- _("%s: section [%s], field '%s' has invalid characters which will not work with virt-builder 1.24.0"),
+ _("%s: section [%s], field ‘%s’ has invalid characters which will not work with virt-builder 1.24.0"),
input, sections->name, fields->key);
}
}
@@ -161,7 +161,7 @@ main (int argc, char *argv[])
strchr (fields->key, ',')) {
parse_context_free (&context);
error (EXIT_FAILURE, 0,
- _("%s: section [%s], field '%s' has invalid characters which will not work with virt-builder 1.24.1"),
+ _("%s: section [%s], field ‘%s’ has invalid characters which will not work with virt-builder 1.24.1"),
input, sections->name, fields->key);
}
}
@@ -172,7 +172,7 @@ main (int argc, char *argv[])
if (compat_1_24_0 && !seen_sig) {
parse_context_free (&context);
error (EXIT_FAILURE, 0,
- _("%s: section [%s] is missing a 'sig' field which will not work with virt-builder 1.24.0"),
+ _("%s: section [%s] is missing a ‘sig’ field which will not work with virt-builder 1.24.0"),
input, sections->name);
}
}
diff --git a/builder/index_parser.ml b/builder/index_parser.ml
index a3cae7d1a..468805cf8 100644
--- a/builder/index_parser.ml
+++ b/builder/index_parser.ml
@@ -27,7 +27,7 @@ open Unix
let get_index ~downloader ~sigchecker
{ Sources.uri = uri; proxy = proxy } =
let corrupt_file () =
- error (f_"The index file downloaded from '%s' is corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri
+ error (f_"The index file downloaded from ‘%s’ is corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri
in
let rec get_index () =
@@ -57,7 +57,7 @@ let get_index ~downloader ~sigchecker
fun (n, arch) ->
let id = n, arch in
if Hashtbl.mem nseen id then (
- eprintf (f_"%s: index is corrupt: os-version '%s' with architecture '%s' appears two or more times\n") prog n arch;
+ eprintf (f_"%s: index is corrupt: os-version ‘%s’ with architecture ‘%s’ appears two or more times\n") prog n arch;
corrupt_file ()
);
Hashtbl.add nseen id true
@@ -73,9 +73,9 @@ let get_index ~downloader ~sigchecker
if Hashtbl.mem fseen hashkey then (
(match subkey with
| Some value ->
- eprintf (f_"%s: index is corrupt: %s: field '%s[%s]' appears two or more times\n") prog n field value
+ eprintf (f_"%s: index is corrupt: %s: field ‘%s[%s]’ appears two or more times\n") prog n field value
| None ->
- eprintf (f_"%s: index is corrupt: %s: field '%s' appears two or more times\n") prog n field);
+ eprintf (f_"%s: index is corrupt: %s: field ‘%s’ appears two or more times\n") prog n field);
corrupt_file ()
);
Hashtbl.add fseen hashkey true
@@ -94,12 +94,12 @@ let get_index ~downloader ~sigchecker
let file_uri =
try make_absolute_uri (List.assoc ("file", None) fields)
with Not_found ->
- eprintf (f_"%s: no 'file' (URI) entry for '%s'\n") prog n;
+ eprintf (f_"%s: no ‘file’ (URI) entry for ‘%s’\n") prog n;
corrupt_file () in
let arch =
try List.assoc ("arch", None) fields
with Not_found ->
- eprintf (f_"%s: no 'arch' entry for '%s'\n") prog n;
+ eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n;
corrupt_file () in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
@@ -114,7 +114,7 @@ let get_index ~downloader ~sigchecker
with
| Not_found -> Rev_int 1
| Failure _ ->
- eprintf (f_"%s: cannot parse 'revision' field for '%s'\n") prog n;
+ eprintf (f_"%s: cannot parse ‘revision’ field for ‘%s’\n") prog n;
corrupt_file () in
let format =
try Some (List.assoc ("format", None) fields) with Not_found -> None in
@@ -122,10 +122,10 @@ let get_index ~downloader ~sigchecker
try Int64.of_string (List.assoc ("size", None) fields)
with
| Not_found ->
- eprintf (f_"%s: no 'size' field for '%s'\n") prog n;
+ eprintf (f_"%s: no ‘size’ field for ‘%s’\n") prog n;
corrupt_file ()
| Failure _ ->
- eprintf (f_"%s: cannot parse 'size' field for '%s'\n") prog n;
+ eprintf (f_"%s: cannot parse ‘size’ field for ‘%s’\n") prog n;
corrupt_file () in
let compressed_size =
try Some (Int64.of_string (List.assoc ("compressed_size", None) fields))
@@ -133,7 +133,7 @@ let get_index ~downloader ~sigchecker
| Not_found ->
None
| Failure _ ->
- eprintf (f_"%s: cannot parse 'compressed_size' field for '%s'\n")
+ eprintf (f_"%s: cannot parse ‘compressed_size’ field for ‘%s’\n")
prog n;
corrupt_file () in
let expand =
@@ -158,7 +158,7 @@ let get_index ~downloader ~sigchecker
with
| Not_found -> false
| Failure _ ->
- eprintf (f_"%s: cannot parse 'hidden' field for '%s'\n")
+ eprintf (f_"%s: cannot parse ‘hidden’ field for ‘%s’\n")
prog n;
corrupt_file () in
let aliases =
@@ -208,11 +208,11 @@ let get_index ~downloader ~sigchecker
corrupt_file ()
)
else if String.find path "://" >= 0 then (
- eprintf (f_"%s: cannot use a URI ('%s') in the index file\n") prog path;
+ eprintf (f_"%s: cannot use a URI (‘%s’) in the index file\n") prog path;
corrupt_file ()
)
else if path.[0] = '/' then (
- eprintf (f_"%s: you must use relative paths (not '%s') in the index file\n") prog path;
+ eprintf (f_"%s: you must use relative paths (not ‘%s’) in the index file\n") prog path;
corrupt_file ()
)
else (
diff --git a/builder/sigchecker.ml b/builder/sigchecker.ml
index 68f99e807..6c1e691ee 100644
--- a/builder/sigchecker.ml
+++ b/builder/sigchecker.ml
@@ -42,7 +42,7 @@ let import_keyfile ~gpg ~gpghome ~tmpdir ?(trust = true) keyfile =
(if verbose () then "" else " >/dev/null 2>&1") in
let r = shell_command cmd in
if r <> 0 then
- error (f_"could not import public key\nUse the '-v' option and look for earlier error messages.");
+ error (f_"could not import public key\nUse the ‘-v’ option and look for earlier error messages.");
let status = read_whole_file status_file in
let status = String.nsplit "\n" status in
let key_id = ref "" in
@@ -61,7 +61,7 @@ let import_keyfile ~gpg ~gpghome ~tmpdir ?(trust = true) keyfile =
(if verbose () then "" else " >/dev/null 2>&1") in
let r = shell_command cmd in
if r <> 0 then
- error (f_"GPG failure: could not trust the imported key\nUse the '-v' option and look for earlier error messages.");
+ error (f_"GPG failure: could not trust the imported key\nUse the ‘-v’ option and look for earlier error messages.");
);
let subkeys =
(* --with-fingerprint is specified twice so gpg outputs the full
@@ -106,7 +106,7 @@ let rec create ~gpg ~gpgkey ~check_signature ~tmpdir =
gpg gpgtmpdir (if verbose () then "" else " >/dev/null 2>&1") in
let r = shell_command cmd in
if r <> 0 then
- error (f_"GPG failure: could not run GPG the first time\nUse the '-v' option and look for earlier error messages.");
+ error (f_"GPG failure: could not run GPG the first time\nUse the ‘-v’ option and look for earlier error messages.");
match gpgkey with
| No_Key ->
assert false
@@ -119,7 +119,7 @@ let rec create ~gpg ~gpgkey ~check_signature ~tmpdir =
(if verbose () then "" else " >/dev/null 2>&1") in
let r = shell_command cmd in
if r <> 0 then
- error (f_"could not export public key\nUse the '-v' option and look for earlier error messages.");
+ error (f_"could not export public key\nUse the ‘-v’ option and look for earlier error messages.");
import_keyfile gpg gpgtmpdir tmpdir filename
) else
"", [] in
@@ -199,7 +199,7 @@ and do_verify ?(verify_only = true) t args =
(quote status_file) args in
let r = shell_command cmd in
if r <> 0 then
- error (f_"GPG failure: could not verify digital signature of file\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!");
+ error (f_"GPG failure: could not verify digital signature of file\nTry:\n - Use the ‘-v’ option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!");
(* Check the fingerprint is who it should be. *)
let status = read_whole_file status_file in
diff --git a/builder/sources.ml b/builder/sources.ml
index db1a9692e..290151c3a 100644
--- a/builder/sources.ml
+++ b/builder/sources.ml
@@ -46,7 +46,7 @@ let parse_conf file =
let uri =
try List.assoc ("uri", None) fields
with Not_found as ex ->
- eprintf (f_"%s: no 'uri' entry for '%s' in %s, skipping it\n") prog n file;
+ eprintf (f_"%s: no ‘uri’ entry for ‘%s’ in %s, skipping it\n") prog n file;
raise ex in
let gpgkey =
let k =
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
index a3e05728a..b48b1241b 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -106,7 +106,7 @@ As above, but using an i386 template, if available.
Create a Fedora 20 image. The root password is taken from the file
F</tmp/rootpw>.
-Note if you I<don't> set I<--root-password> then the guest is given
+Note if you I<don’t> set I<--root-password> then the guest is given
a I<random> root password.
You can also create user accounts. See L</USERS AND PASSWORDS> below.
@@ -235,7 +235,7 @@ Also this doesn't cache packages (the I<--install>, I<--update> options).
=item B<--no-check-signature>
-Check/don't check the digital signature of the OS template. The
+Check/don’t check the digital signature of the OS template. The
default is to check the signature and exit if it is not correct.
Using I<--no-check-signature> bypasses this check.
@@ -263,7 +263,7 @@ Delete the template cache. See L</CACHING>.
=item B<--no-delete-on-failure>
-Don't delete the output file on failure to build. You can use this to
+Don’t delete the output file on failure to build. You can use this to
debug failures to run scripts. See L</DEBUGGING BUILDS> for ways to
debug images.
@@ -415,14 +415,14 @@ don't need the network.
=item 3.
-You don't want untrusted guest code trying to access your host network
+You don’t want untrusted guest code trying to access your host network
when running virt-builder. This is particularly an issue when you
don't trust the source of the operating system templates. (See
L</SECURITY> below).
=item 4.
-You don't have a host network (eg. in secure/restricted environments).
+You don’t have a host network (eg. in secure/restricted environments).
=back
@@ -452,7 +452,7 @@ the install).
=item B<--output> filename
-Write the output to F<filename>. If you don't specify this option,
+Write the output to F<filename>. If you don’t specify this option,
then the output filename is generated by taking the C<os-version>
string and adding C<.img> (for raw format) or C<.qcow2> (for qcow2
format).
@@ -471,7 +471,7 @@ Print information about the template cache. See L</CACHING>.
=item B<--quiet>
-Don't print ordinary progress messages.
+Don’t print ordinary progress messages.
=item B<--size> SIZE
@@ -501,7 +501,7 @@ You can give this option multiple times to specify multiple sources.
See also L</SOURCES OF TEMPLATES> below.
-Note that you should not point I<--source> to sources that you don't
+Note that you should not point I<--source> to sources that you don’t
trust (unless the source is signed by someone you do trust). See also
the I<--no-network> option.
@@ -798,7 +798,7 @@ If F</tmp> or F<C:\Temp> is missing.
=back
-If you don't want the log file to appear in the final image, then
+If you don’t want the log file to appear in the final image, then
use the I<--no-logfile> command line option.
=head2 SSH KEYS
@@ -1256,7 +1256,7 @@ filesystem.
=head3 Setting up a GPG key
-If you don't have a GnuPG key, you will need to set one up. (Strictly
+If you don’t have a GnuPG key, you will need to set one up. (Strictly
speaking this is optional, but if your index and template files are
not signed then virt-builder users will have to use the
I<--no-check-signature> flag every time they use virt-builder.)
@@ -1369,7 +1369,7 @@ downloaded. To work out the signature, do:
sha512sum disk.xz
-Note if you use this, you don't need to sign the file, ie. don't use
+Note if you use this, you don’t need to sign the file, ie. don’t use
C<sig>. This option overrides C<sig>.
=item C<checksum=7b882fe9b82eb0fef...>
@@ -1619,7 +1619,7 @@ requires importing the public key into the user’s local gpg keyring
When a template is downloaded, its signature is checked in the same
way.
-Although the signatures are optional, if you don't have them then
+Although the signatures are optional, if you don’t have them then
virt-builder users will have to use I<--no-check-signature> on the
command line. This prevents an attacker from replacing the signed
index file with an unsigned index file and having virt-builder
diff --git a/builder/yajl.ml b/builder/yajl.ml
index e53706abc..d933b5246 100644
--- a/builder/yajl.ml
+++ b/builder/yajl.ml
@@ -35,23 +35,23 @@ let object_find_optional key = function
(match List.filter (fun (k, _) -> k = key) (Array.to_list o) with
| [(k, v)] -> Some v
| [] -> None
- | _ -> error (f_"more than value for the key '%s'") key)
- | _ -> error (f_"the value of the key '%s' is not an object") key
+ | _ -> error (f_"more than value for the key ‘%s’") key)
+ | _ -> error (f_"the value of the key ‘%s’ is not an object") key
let object_find key yv =
match object_find_optional key yv with
- | None -> error (f_"missing value for the key '%s'") key
+ | None -> error (f_"missing value for the key ‘%s’") key
| Some v -> v
let object_get_string key yv =
match object_find key yv with
| Yajl_string s -> s
- | _ -> error (f_"the value for the key '%s' is not a string") key
+ | _ -> error (f_"the value for the key ‘%s’ is not a string") key
let object_find_object key yv =
match object_find key yv with
| Yajl_object _ as o -> o
- | _ -> error (f_"the value for the key '%s' is not an object") key
+ | _ -> error (f_"the value for the key ‘%s’ is not an object") key
let object_find_objects fn = function
| Yajl_object o -> filter_map fn (Array.to_list o)
@@ -66,7 +66,7 @@ let object_get_number key yv =
match object_find key yv with
| Yajl_number n -> n
| Yajl_double d -> Int64.of_float d
- | _ -> error (f_"the value for the key '%s' is not an integer") key
+ | _ -> error (f_"the value for the key ‘%s’ is not an integer") key
let objects_get_string key yvs =
let rec loop = function
@@ -74,10 +74,10 @@ let objects_get_string key yvs =
| x :: xs ->
(match object_find_optional key x with
| Some (Yajl_string s) -> Some s
- | Some _ -> error (f_"the value for key '%s' is not a string as expected") key
+ | Some _ -> error (f_"the value for key ‘%s’ is not a string as expected") key
| None -> loop xs
)
in
match loop yvs with
| Some s -> s
- | None -> error (f_"the key '%s' was not found in a list of objects") key
+ | None -> error (f_"the key ‘%s’ was not found in a list of objects") key
diff --git a/cat/filesystems.c b/cat/filesystems.c
index 6146984c9..3bedf886f 100644
--- a/cat/filesystems.c
+++ b/cat/filesystems.c
@@ -297,7 +297,7 @@ main (int argc, char *argv[])
/* Must be no extra arguments on the command line. */
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --format "
"like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
diff --git a/cat/log.c b/cat/log.c
index e5691ddbf..eca84593c 100644
--- a/cat/log.c
+++ b/cat/log.c
@@ -190,7 +190,7 @@ main (int argc, char *argv[])
/* User must not specify more arguments on the command line. */
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --format "
"like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
@@ -427,7 +427,7 @@ do_log_windows_evtx (void)
int fd, status;
if (system ("evtxdump.py -h >/dev/null 2>&1") != 0) {
- fprintf (stderr, _("%s: you need to install 'evtxdump.py' (from the python-evtx package)\n"
+ fprintf (stderr, _("%s: you need to install ‘evtxdump.py’ (from the python-evtx package)\n"
"in order to parse Windows Event Logs. If you cannot install this, then\n"
"use virt-copy-out(1) to copy the contents of /Windows/System32/winevt/Logs\n"
"from this guest, and examine in a binary file viewer.\n"),
diff --git a/cat/virt-cat.pod b/cat/virt-cat.pod
index 3c685440b..327ef255e 100644
--- a/cat/virt-cat.pod
+++ b/cat/virt-cat.pod
@@ -139,7 +139,7 @@ the mount of its root and all of its mountpoints, so make sure
to mount all the mountpoints needed to work with the filenames
given as arguments.
-If you don't know what filesystems a disk image contains, you can
+If you don’t know what filesystems a disk image contains, you can
either run guestfish without this option, then list the partitions,
filesystems and LVs available (see L</list-partitions>,
L</list-filesystems> and L</lvs> commands), or you can use the
diff --git a/cat/virt-filesystems.pod b/cat/virt-filesystems.pod
index 84ad02fea..a3a0fb29a 100644
--- a/cat/virt-filesystems.pod
+++ b/cat/virt-filesystems.pod
@@ -235,7 +235,7 @@ irrespective of whether the LVs contain filesystems.
=item B<--no-title>
-In I<--long> mode, don't add a title row.
+In I<--long> mode, don’t add a title row.
Note that the order of the columns is not fixed, and may change in
future versions of virt-filesystems, so using this option may give you
diff --git a/cat/virt-ls.pod b/cat/virt-ls.pod
index d23e14baf..6aafc72f8 100644
--- a/cat/virt-ls.pod
+++ b/cat/virt-ls.pod
@@ -48,7 +48,7 @@ List all Unix domain sockets in a Linux virtual machine:
virt-ls -lR -d guest / | grep '^s'
-List all regular files with filenames ending in '.png':
+List all regular files with filenames ending in ‘.png’:
virt-ls -lR -d guest / | grep -i '^-.*\.png$'
@@ -370,7 +370,7 @@ the mount of its root and all of its mountpoints, so make sure
to mount all the mountpoints needed to work with the filenames
given as arguments.
-If you don't know what filesystems a disk image contains, you can
+If you don’t know what filesystems a disk image contains, you can
either run guestfish without this option, then list the partitions,
filesystems and LVs available (see L</list-partitions>,
L</list-filesystems> and L</lvs> commands), or you can use the
diff --git a/cat/virt-tail.pod b/cat/virt-tail.pod
index 367cc4e64..2278ad034 100644
--- a/cat/virt-tail.pod
+++ b/cat/virt-tail.pod
@@ -141,7 +141,7 @@ the mount of its root and all of its mountpoints, so make sure
to mount all the mountpoints needed to work with the filenames
given as arguments.
-If you don't know what filesystems a disk image contains, you can
+If you don’t know what filesystems a disk image contains, you can
either run guestfish without this option, then list the partitions,
filesystems and LVs available (see L</list-partitions>,
L</list-filesystems> and L</lvs> commands), or you can use the
diff --git a/common/miniexpect/miniexpect.pod b/common/miniexpect/miniexpect.pod
index cd008fc1e..5deb3125a 100644
--- a/common/miniexpect/miniexpect.pod
+++ b/common/miniexpect/miniexpect.pod
@@ -325,7 +325,7 @@ Notes:
=item *
-C<regexps> may be NULL or an empty list, which means we don't match
+C<regexps> may be NULL or an empty list, which means we don’t match
against a regular expression. This is useful if you just want to wait
for EOF or timeout.
diff --git a/common/options/inspect.c b/common/options/inspect.c
index bb4ee87e7..e0deae2df 100644
--- a/common/options/inspect.c
+++ b/common/options/inspect.c
@@ -68,7 +68,7 @@ void
inspect_mount_handle (guestfs_h *g)
{
if (live)
- error (EXIT_FAILURE, 0, _("don't use --live and -i options together"));
+ error (EXIT_FAILURE, 0, _("don’t use --live and -i options together"));
inspect_do_decrypt (g);
@@ -80,16 +80,16 @@ inspect_mount_handle (guestfs_h *g)
fprintf (stderr,
_("%s: no operating system was found on this disk\n"
"\n"
- "If using guestfish '-i' option, remove this option and instead\n"
- "use the commands 'run' followed by 'list-filesystems'.\n"
+ "If using guestfish ‘-i’ option, remove this option and instead\n"
+ "use the commands ‘run’ followed by ‘list-filesystems’.\n"
"You can then mount filesystems you want by hand using the\n"
- "'mount' or 'mount-ro' command.\n"
+ "‘mount’ or ‘mount-ro’ command.\n"
"\n"
- "If using guestmount '-i', remove this option and choose the\n"
- "filesystem(s) you want to see by manually adding '-m' option(s).\n"
- "Use 'virt-filesystems' to see what filesystems are available.\n"
+ "If using guestmount ‘-i’, remove this option and choose the\n"
+ "filesystem(s) you want to see by manually adding ‘-m’ option(s).\n"
+ "Use ‘virt-filesystems’ to see what filesystems are available.\n"
"\n"
- "If using other virt tools, this disk image won't work\n"
+ "If using other virt tools, this disk image won’t work\n"
"with these tools. Use the guestfish equivalent commands\n"
"(see the virt tool manual page).\n"),
getprogname ());
@@ -101,16 +101,16 @@ inspect_mount_handle (guestfs_h *g)
fprintf (stderr,
_("%s: multi-boot operating systems are not supported\n"
"\n"
- "If using guestfish '-i' option, remove this option and instead\n"
- "use the commands 'run' followed by 'list-filesystems'.\n"
+ "If using guestfish ‘-i’ option, remove this option and instead\n"
+ "use the commands ‘run’ followed by ‘list-filesystems’.\n"
"You can then mount filesystems you want by hand using the\n"
- "'mount' or 'mount-ro' command.\n"
+ "‘mount’ or ‘mount-ro’ command.\n"
"\n"
- "If using guestmount '-i', remove this option and choose the\n"
- "filesystem(s) you want to see by manually adding '-m' option(s).\n"
- "Use 'virt-filesystems' to see what filesystems are available.\n"
+ "If using guestmount ‘-i’, remove this option and choose the\n"
+ "filesystem(s) you want to see by manually adding ‘-m’ option(s).\n"
+ "Use ‘virt-filesystems’ to see what filesystems are available.\n"
"\n"
- "If using other virt tools, multi-boot operating systems won't work\n"
+ "If using other virt tools, multi-boot operating systems won’t work\n"
"with these tools. Use the guestfish equivalent commands\n"
"(see the virt tool manual page).\n"),
getprogname ());
diff --git a/common/options/options.c b/common/options/options.c
index a531e2e18..c9948d72f 100644
--- a/common/options/options.c
+++ b/common/options/options.c
@@ -275,11 +275,11 @@ display_mountpoints_on_failure (const char *mp_device,
if (fses == NULL || fses[0] == NULL)
return;
- fprintf (stderr, _("%s: '%s' could not be mounted.\n"),
+ fprintf (stderr, _("%s: ‘%s’ could not be mounted.\n"),
getprogname (), mp_device);
if (user_supplied_options)
- fprintf (stderr, _("%s: Check mount(8) man page to ensure options '%s'\n"
+ fprintf (stderr, _("%s: Check mount(8) man page to ensure options ‘%s’\n"
"%s: are supported by the filesystem that is being mounted.\n"),
getprogname (), user_supplied_options, getprogname ());
diff --git a/common/options/uri.c b/common/options/uri.c
index ae30bce9b..e7ba7a51a 100644
--- a/common/options/uri.c
+++ b/common/options/uri.c
@@ -116,7 +116,7 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
uri = xmlParseURI (arg);
if (!uri) {
- fprintf (stderr, _("%s: --add: could not parse URI '%s'\n"),
+ fprintf (stderr, _("%s: --add: could not parse URI ‘%s’\n"),
getprogname (), arg);
return -1;
}
diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index 5cc60a471..f71ae3535 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
@@ -92,7 +92,7 @@ exec >>%s 2>&1
debug_logfile ();
if warn_failed_no_network && not (g#get_network ()) then (
prerr_newline ();
- warning (f_"the command may have failed because the network is disabled. Try either removing '--no-network' or adding '--network' on the command line.");
+ warning (f_"the command may have failed because the network is disabled. Try either removing ‘--no-network’ or adding ‘--network’ on the command line.");
prerr_newline ()
);
error (f_"%s: command exited with an error") display
@@ -182,10 +182,10 @@ exec >>%s 2>&1
(* Windows has package_management == "unknown". *)
and error_unknown_package_manager flag =
- error (f_"cannot use '%s' because no package manager has been detected for this guest OS.\n\nIf this guest OS is a common one with ordinary package management then this may have been caused by a failure of libguestfs inspection.\n\nFor OSes such as Windows that lack package management, this is not possible. Try using one of the '--firstboot*' flags instead (described in the manual).") flag
+ error (f_"cannot use ‘%s’ because no package manager has been detected for this guest OS.\n\nIf this guest OS is a common one with ordinary package management then this may have been caused by a failure of libguestfs inspection.\n\nFor OSes such as Windows that lack package management, this is not possible. Try using one of the ‘--firstboot*’ flags instead (described in the manual).") flag
and error_unimplemented_package_manager flag pm =
- error (f_"sorry, '%s' with the '%s' package manager has not been implemented yet.\n\nYou can work around this by using one of the '--run*' or '--firstboot*' options instead (described in the manual).") flag pm
+ error (f_"sorry, ‘%s’ with the ‘%s’ package manager has not been implemented yet.\n\nYou can work around this by using one of the ‘--run*’ or ‘--firstboot*’ options instead (described in the manual).") flag pm
in
(* Set the random seed. *)
@@ -197,7 +197,7 @@ exec >>%s 2>&1
let passwords = Hashtbl.create 13 in
let set_password user pw =
if Hashtbl.mem passwords user then
- error (f_"multiple --root-password/--password options set the password for user '%s' twice") user;
+ error (f_"multiple --root-password/--password options set the password for user ‘%s’ twice") user;
Hashtbl.replace passwords user pw
in
diff --git a/customize/firstboot.ml b/customize/firstboot.ml
index 1e4c8e7c8..9208daa0a 100644
--- a/customize/firstboot.ml
+++ b/customize/firstboot.ml
@@ -223,10 +223,10 @@ WantedBy=default.target
if guest_arch_compatible then
try ignore (g#sh cmd)
with Guestfs.Error msg ->
- warning (f_"could not finish firstboot installation by running '%s' because the command failed: %s")
+ warning (f_"could not finish firstboot installation by running ‘%s’ because the command failed: %s")
cmd msg
else (
- warning (f_"cannot finish firstboot installation by running '%s' because host cpu (%s) and guest arch (%s) are not compatible. The firstboot service may not run at boot.")
+ warning (f_"cannot finish firstboot installation by running ‘%s’ because host cpu (%s) and guest arch (%s) are not compatible. The firstboot service may not run at boot.")
cmd Guestfs_config.host_cpu guest_arch
)
end
diff --git a/customize/password.ml b/customize/password.ml
index 92cb4e495..4ab5a14d1 100644
--- a/customize/password.ml
+++ b/customize/password.ml
@@ -67,7 +67,7 @@ and parse_selector_list orig_arg = function
| [ "disable"|"disabled" ] ->
{ pw_password = Disabled_password; pw_locked = false }
| _ ->
- error (f_"invalid password selector '%s'; see the man page") orig_arg
+ error (f_"invalid password selector ‘%s’; see the man page") orig_arg
(* Permissible characters in a salt. *)
let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./"
diff --git a/customize/ssh_key.ml b/customize/ssh_key.ml
index 41f900af1..4302a8e92 100644
--- a/customize/ssh_key.ml
+++ b/customize/ssh_key.ml
@@ -41,7 +41,7 @@ and parse_selector_list orig_arg = function
| [ "string"; s ] ->
KeyString s
| _ ->
- error (f_"invalid ssh-inject selector '%s'; see the man page") orig_arg
+ error (f_"invalid ssh-inject selector ‘%s’; see the man page") orig_arg
(* Find the local [on the host] user's SSH public key. See
* ssh-copy-id(1) default_ID_file for rationale.
diff --git a/customize/subscription_manager.ml b/customize/subscription_manager.ml
index 1e6e25de3..a23efe546 100644
--- a/customize/subscription_manager.ml
+++ b/customize/subscription_manager.ml
@@ -37,7 +37,7 @@ and parse_credentials_selector_list orig_arg = function
| [ username; "file"; filename ] ->
{ sm_username = username; sm_password = read_first_line_from_file filename }
| _ ->
- error (f_"invalid sm-credentials selector '%s'; see the man page") orig_arg
+ error (f_"invalid sm-credentials selector ‘%s’; see the man page") orig_arg
let rec parse_pool_selector arg =
parse_pool_selector_list arg (String.nsplit ":" arg)
@@ -50,4 +50,4 @@ and parse_pool_selector_list orig_arg = function
| [ "file"; filename ] ->
PoolId (read_first_line_from_file filename)
| _ ->
- error (f_"invalid sm-attach selector '%s'; see the man page") orig_arg
+ error (f_"invalid sm-attach selector ‘%s’; see the man page") orig_arg
diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod
index 1a5ab018f..2e58a63ef 100644
--- a/customize/virt-customize.pod
+++ b/customize/virt-customize.pod
@@ -190,14 +190,14 @@ don't need the network.
=item 3.
-You don't want untrusted guest code trying to access your host network
+You don’t want untrusted guest code trying to access your host network
when running virt-customize. This is particularly an issue when you
don't trust the source of the operating system templates. (See
L</SECURITY> below).
=item 4.
-You don't have a host network (eg. in secure/restricted environments).
+You don’t have a host network (eg. in secure/restricted environments).
=back
@@ -205,7 +205,7 @@ You don't have a host network (eg. in secure/restricted environments).
=item B<--quiet>
-Don't print log messages.
+Don’t print log messages.
To enable detailed logging of individual file operations, use I<-x>.
diff --git a/dib/cmdline.ml b/dib/cmdline.ml
index e7c86fa61..67194704e 100644
--- a/dib/cmdline.ml
+++ b/dib/cmdline.ml
@@ -112,7 +112,7 @@ read the man page virt-dib(1).
fun fmtset fmt ->
try Output_format.add_to_set fmt fmtset
with Not_found ->
- error (f_"invalid format '%s' in --formats") fmt
+ error (f_"invalid format ‘%s’ in --formats") fmt
) Output_format.empty_set fmts in
formats := Some fmtset in
@@ -162,7 +162,7 @@ read the man page virt-dib(1).
[ L"exclude-script" ], Getopt.String ("script", append_excluded_script),
s_"Exclude the specified script";
[ L"envvar" ], Getopt.String ("envvar[=value]", append_envvar), s_"Carry/set this environment variable";
- [ L"skip-base" ], Getopt.Clear use_base, s_"Skip the inclusion of the 'base' element";
+ [ L"skip-base" ], Getopt.Clear use_base, s_"Skip the inclusion of the ‘base’ element";
[ L"root-label" ], Getopt.String ("label", set_root_label), s_"Label for the root fs";
[ L"install-type" ], Getopt.Set_string ("type", install_type), s_"Installation type";
[ L"image-cache" ], Getopt.String ("directory", set_image_cache), s_"Location for cached images";
@@ -189,7 +189,7 @@ read the man page virt-dib(1).
[ L"no-network" ], Getopt.Clear network, s_"Disable appliance network";
[ L"smp" ], Getopt.Int ("vcpus", set_smp), s_"Set number of vCPUs";
[ L"no-delete-on-failure" ], Getopt.Clear delete_on_failure,
- s_"Don't delete output file on failure";
+ s_"Don’t delete output file on failure";
[ L"machine-readable" ], Getopt.Set machine_readable, s_"Make output machine readable";
[ L"debug" ], Getopt.Int ("level", set_debug), s_"Set debug level";
diff --git a/dib/dib.ml b/dib/dib.ml
index 9ccf9bab6..8d078aabb 100644
--- a/dib/dib.ml
+++ b/dib/dib.ml
@@ -1009,13 +1009,13 @@ let main () =
match stat with
| Unix.WEXITED 0 -> ()
| Unix.WEXITED i ->
- error (f_"external command '%s' exited with error %d")
+ error (f_"external command ‘%s’ exited with error %d")
csum_tool i
| Unix.WSIGNALED i ->
- error (f_"external command '%s' killed by signal %d")
+ error (f_"external command ‘%s’ killed by signal %d")
csum_tool i
| Unix.WSTOPPED i ->
- error (f_"external command '%s' stopped by signal %d")
+ error (f_"external command ‘%s’ stopped by signal %d")
csum_tool i
);
done;
diff --git a/dib/output_format_docker.ml b/dib/output_format_docker.ml
index 903ac6539..f48da0f79 100644
--- a/dib/output_format_docker.ml
+++ b/dib/output_format_docker.ml
@@ -29,14 +29,14 @@ let set_docker_target arg = docker_target := Some arg
let docker_check () =
require_tool "docker";
if !docker_target = None then
- error (f_"docker: a target was not specified, use '--docker-target'")
+ error (f_"docker: a target was not specified, use ‘--docker-target’")
let docker_run_fs (g : Guestfs.guestfs) _ temp_dir =
let docker_target =
match !docker_target with
| None -> assert false (* checked earlier *)
| Some t -> t in
- message (f_"Importing the image to docker as '%s'") docker_target;
+ message (f_"Importing the image to docker as ‘%s’") docker_target;
let dockertmp = Filename.temp_file ~temp_dir "docker." ".tar" in
g#tar_out ~excludes:[| "./sys/*"; "./proc/*" |] ~xattrs:true ~selinux:true
"/" dockertmp;
diff --git a/dib/output_format_vhd.ml b/dib/output_format_vhd.ml
index 2e31f9341..a4bad66f9 100644
--- a/dib/output_format_vhd.ml
+++ b/dib/output_format_vhd.ml
@@ -35,7 +35,7 @@ let vhd_run_file filename (tmpdisk, _) temp_dir =
"-i"; fn_intermediate; "-o"; filename ] in
if run_command cmd <> 0 then exit 1;
if not (Sys.file_exists filename) then
- error (f_"VHD output not produced, most probably vhd-util is old or not patched for 'convert'")
+ error (f_"VHD output not produced, most probably vhd-util is old or not patched for ‘convert’")
let fmt = {
defaults with
diff --git a/dib/utils.ml b/dib/utils.ml
index 967754d95..afa2ec944 100644
--- a/dib/utils.ml
+++ b/dib/utils.ml
@@ -47,11 +47,11 @@ let var_from_lines var lines =
let var_lines = List.filter (fun x -> String.is_prefix x var_with_equal) lines in
match var_lines with
| [] ->
- error (f_"variable '%s' not found in lines:\n%s")
+ error (f_"variable ‘%s’ not found in lines:\n%s")
var (String.concat "\n" lines)
| [x] -> snd (String.split "=" x)
| _ ->
- error (f_"variable '%s' has more than one occurrency in lines:\n%s")
+ error (f_"variable ‘%s’ has more than one occurrency in lines:\n%s")
var (String.concat "\n" lines)
let string_index_fn fn str =
diff --git a/dib/virt-dib.pod b/dib/virt-dib.pod
index d918097e4..4087cefc8 100644
--- a/dib/virt-dib.pod
+++ b/dib/virt-dib.pod
@@ -348,7 +348,7 @@ Not applicable in ramdisk mode, see L</RAMDISK BUILDING>.
=item B<--no-delete-on-failure>
-Don't delete the output files on failure to build. You can use this
+Don’t delete the output files on failure to build. You can use this
to debug failures to run scripts.
The default is to delete the output files if virt-dib fails (or,
@@ -369,7 +369,7 @@ F<python>.
=item B<--quiet>
-Don't print ordinary progress messages.
+Don’t print ordinary progress messages.
=item B<--qemu-img-options> option[,option,...]
diff --git a/diff/diff.c b/diff/diff.c
index a6f161b82..92ebdf7dc 100644
--- a/diff/diff.c
+++ b/diff/diff.c
@@ -342,7 +342,7 @@ main (int argc, char *argv[])
error (EXIT_FAILURE, 0, _("you cannot use -h and --csv options together."));
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --checksum or --format "
"like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index 3cf86a0ae..5e314b34d 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -604,7 +604,7 @@ it, since errors in the GNUlib test suite are often not important.
=item B<--disable-static>
-Don't build a static linked version of the libguestfs library.
+Don’t build a static linked version of the libguestfs library.
=item B<--enable-install-daemon>
diff --git a/docs/guestfs-faq.pod b/docs/guestfs-faq.pod
index 9da133098..85fc95d2e 100644
--- a/docs/guestfs-faq.pod
+++ b/docs/guestfs-faq.pod
@@ -151,7 +151,7 @@ To get further information about the failure, you have to run:
libguestfs-test-tool
-If, after using this, you still don't understand the failure, contact
+If, after using this, you still don’t understand the failure, contact
us (see previous section).
=head2 libguestfs: error: cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH
@@ -193,7 +193,7 @@ Switch to the direct backend:
=item *
-Don't run libguestfs as root.
+Don’t run libguestfs as root.
=item *
@@ -317,7 +317,7 @@ L<http://packages.debian.org/search?keywords=libguestfs>
=item Ubuntu
-We don't have a full time Ubuntu maintainer, and the packages supplied
+We don’t have a full time Ubuntu maintainer, and the packages supplied
by Canonical (which are outside our control) are sometimes broken.
Canonical decided to change the permissions on the kernel so that it's
@@ -388,7 +388,7 @@ README file before starting.
Git: L<https://github.com/libguestfs/libguestfs>
Source tarballs: L<http://libguestfs.org/download>
-Don't run C<make install>! Use the C<./run> script instead (see README).
+Don’t run C<make install>! Use the C<./run> script instead (see README).
=head2 How can I compile and install libguestfs if my distro doesn't
have new enough qemu/supermin/kernel?
@@ -422,11 +422,11 @@ programs you have compiled.
Use C<./localconfigure> instead of C<./configure>, but otherwise you
compile libguestfs as usual.
-Don't run C<make install>! Use the C<./run> script instead (see README).
+Don’t run C<make install>! Use the C<./run> script instead (see README).
=head2 How can I compile and install libguestfs without supermin?
-If supermin 5 supports your distro, but you don't happen to have a new
+If supermin 5 supports your distro, but you don’t happen to have a new
enough supermin installed, then see the previous question.
If supermin 5 doesn't support your distro at all, you will need to use
@@ -759,7 +759,7 @@ yet been reverse engineered and implemented in the Linux kernel, and
therefore libguestfs doesn't support it. At the moment it seems to be
very rare "in the wild".
-=head2 Non-ASCII characters don't appear on VFAT filesystems.
+=head2 Non-ASCII characters don’t appear on VFAT filesystems.
Typical symptoms of this problem:
@@ -1056,7 +1056,7 @@ L<environment variable|guestfs(3)/ENVIRONMENT VARIABLES>:
See also L<guestfs-internals(1)>.
-=head2 Why don't you do everything through the FUSE / filesystem
+=head2 Why don’t you do everything through the FUSE / filesystem
interface?
We offer a command called L<guestmount(1)> which lets you mount guest
@@ -1084,7 +1084,7 @@ In the libguestfs API it is much more efficient to download an entire
file or directory through one of the streaming calls like
C<guestfs_download> or C<guestfs_tar_out>.
-=head2 Why don't you do everything through GVFS?
+=head2 Why don’t you do everything through GVFS?
The problems are similar to the problems with FUSE.
@@ -1145,7 +1145,7 @@ L<https://www.redhat.com/archives/libguestfs/2010-August/msg00024.html>
See also the next question.
-=head2 Why can't I run fsck on a live filesystem using C<guestfish --ro>?
+=head2 Why can’t I run fsck on a live filesystem using C<guestfish --ro>?
This command will usually I<not> work:
@@ -1180,7 +1180,7 @@ provide:
$ virt-rescue --ro guest.img
><rescue> /sbin/fsck /dev/sda1
-And the related question which then arises is why you can't type in
+And the related question which then arises is why you can’t type in
full shell commands with all the --options in guestfish (but you can
in L<virt-rescue(1)>).
@@ -1294,7 +1294,7 @@ L<https://www.redhat.com/mailman/listinfo/libguestfs>. You don't have
to be subscribed, but there will be a delay until your posting is
manually approved.
-B<Please don't use github pull requests - they will be ignored>. The
+B<Please don’t use github pull requests - they will be ignored>. The
reasons are (a) we want to discuss and dissect patches on the mailing
list, and (b) github pull requests turn into merge commits but we
prefer to have a linear history.
@@ -1307,7 +1307,7 @@ on the mailing list first
disappointment and wasted work if we don't think the feature would fit
into the libguestfs project.
-If you want to suggest a useful feature but don't want to write the
+If you want to suggest a useful feature but don’t want to write the
code, you can file a bug (see L</GETTING HELP AND REPORTING BUGS>)
with C<"RFE: "> at the beginning of the Summary line.
diff --git a/docs/guestfs-hacking.pod b/docs/guestfs-hacking.pod
index 8778ebbf6..098869bbd 100644
--- a/docs/guestfs-hacking.pod
+++ b/docs/guestfs-hacking.pod
@@ -390,7 +390,7 @@ In either case, use another function as an example of what to do.
After making these changes, use C<make> to compile.
-Note that you don't need to implement the RPC, language bindings,
+Note that you don’t need to implement the RPC, language bindings,
manual pages or anything else. It’s all automatically generated from
the OCaml description.
@@ -783,7 +783,7 @@ Submit patches to the mailing list:
L<http://www.redhat.com/mailman/listinfo/libguestfs>
and CC to L<rjones(a)redhat.com>.
-You do not need to subscribe to the mailing list if you don't want to.
+You do not need to subscribe to the mailing list if you don’t want to.
There may be a short delay while your message is moderated.
=head2 DAEMON CUSTOM PRINTF FORMATTERS
@@ -821,7 +821,7 @@ however.
We support i18n (gettext anyhow) in the library.
-However many messages come from the daemon, and we don't translate
+However many messages come from the daemon, and we don’t translate
those at the moment. One reason is that the appliance generally has
all locale files removed from it, because they take up a lot of space.
So we'd have to readd some of those, as well as copying our PO files
@@ -1009,7 +1009,7 @@ F<http://git.annexia.org/?p=miniexpect.git;a=summary>)
=head2 MAINTAINER MAKEFILE TARGETS
-These C<make> targets probably won't work and aren't useful unless you
+These C<make> targets probably won’t work and aren't useful unless you
are a libguestfs maintainer.
=head3 make maintainer-commit
diff --git a/docs/guestfs-internals.pod b/docs/guestfs-internals.pod
index 16bab0618..c3c93c043 100644
--- a/docs/guestfs-internals.pod
+++ b/docs/guestfs-internals.pod
@@ -202,7 +202,7 @@ communication protocol (see below).
=head2 COMMUNICATION PROTOCOL
-Don't rely on using this protocol directly. This section documents
+Don’t rely on using this protocol directly. This section documents
how it currently works, but it may change at any time.
The protocol used to talk between the library and the daemon running
@@ -212,7 +212,7 @@ of XDR (RFC 1014, RFC 1832, RFC 4506).
The detailed format of structures is in F<common/protocol/guestfs_protocol.x>
(note: this file is automatically generated).
-There are two broad cases, ordinary functions that don't have any
+There are two broad cases, ordinary functions that don’t have any
C<FileIn> and C<FileOut> parameters, which are handled with very
simple request/reply messages. Then there are functions that have any
C<FileIn> or C<FileOut> parameters, which use the same request and
@@ -234,7 +234,7 @@ total length is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently
4MB), which means the effective size of any request is limited to
somewhere under this size.
-Note also that many functions don't take any arguments, in which case
+Note also that many functions don’t take any arguments, in which case
the C<guestfs_I<foo>_args> is completely omitted.
The header contains the procedure number (C<guestfs_proc>) which is
diff --git a/docs/guestfs-performance.pod b/docs/guestfs-performance.pod
index 620a82adf..9b8a204d0 100644
--- a/docs/guestfs-performance.pod
+++ b/docs/guestfs-performance.pod
@@ -242,7 +242,7 @@ expensive) unless you need the results.
If you previously performed inspection on the guest, then it may be
safe to cache and reuse the results from last time.
-Some disks don't need to be inspected at all: for example, if you are
+Some disks don’t need to be inspected at all: for example, if you are
creating a disk image, or if the disk image is not a VM, or if the
disk image has a known layout.
@@ -431,7 +431,7 @@ and most distributions now do this.
=head2 Processors to avoid
-Avoid processors that don't have hardware virtualization, and some
+Avoid processors that don’t have hardware virtualization, and some
processors which are simply very slow (AMD Geode being a great
example).
diff --git a/docs/guestfs-recipes.pod b/docs/guestfs-recipes.pod
index 02739f6dc..7d772b8f2 100644
--- a/docs/guestfs-recipes.pod
+++ b/docs/guestfs-recipes.pod
@@ -1,6 +1,6 @@
=begin comment
-We break with tradition here and don't use ALL CAPS for the section
+We break with tradition here and don’t use ALL CAPS for the section
headings, as this makes them much easier to read.
=end comment
@@ -109,7 +109,7 @@ To browse the final disk image, do:
This technique is quite powerful, allowing you for example to split up
source directories over the target filesystems.
-Note this won't work (at least, not directly) for bootable virtual
+Note this won’t work (at least, not directly) for bootable virtual
machine disks because it doesn't copy over the boot loader.
=head1 Convert Windows DVD to bootable USB key
@@ -138,7 +138,7 @@ use guestfish to do this:
# for Windows guests:
><fs> resize2fs /dev/sdb1
-Such a disk image won't be directly bootable. You may need to boot it
+Such a disk image won’t be directly bootable. You may need to boot it
with an external kernel and initramfs (see below). Or you can use the
guestfish commands C<syslinux> or C<extlinux> to install a SYSLINUX
bootloader.
diff --git a/docs/guestfs-security.pod b/docs/guestfs-security.pod
index 093e7544c..a77c78280 100644
--- a/docs/guestfs-security.pod
+++ b/docs/guestfs-security.pod
@@ -63,7 +63,7 @@ to escalate its privileges to root. Additionally if you use the
libvirt back end and SELinux, sVirt is used to confine the qemu
process. This multi-step escalation, performed by a static piece of
data, is thought to be extremely hard to do, although we never say
-'never' about security issues.
+‘never’ about security issues.
Callers can also reduce the attack surface by forcing the filesystem
type when mounting (use L<guestfs(3)/guestfs_mount_vfs>).
diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod
index 1e88ed4df..5cd7f4ad8 100644
--- a/docs/guestfs-testing.pod
+++ b/docs/guestfs-testing.pod
@@ -210,7 +210,7 @@ numbers to change.
=back
-We don't guarantee that the numbers will be identical even under these
+We don’t guarantee that the numbers will be identical even under these
circumstances. They should be similar. It would indicate a bug if
you saw greatly differing numbers.
@@ -283,7 +283,7 @@ List all Unix domain sockets in a Linux virtual machine:
virt-ls -lR -d Guest / | grep '^s'
-List all regular files with filenames ending in '.png':
+List all regular files with filenames ending in ‘.png’:
virt-ls -lR -d Guest / | grep -i '^-.*\.png$'
@@ -308,7 +308,7 @@ that you happen to have:
virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img
-Add 'output.img' as a raw disk to an existing guest. Check the guest
+Add ‘output.img’ as a raw disk to an existing guest. Check the guest
can see the files. This test is particularly useful if you try it
with a Windows guest.
diff --git a/edit/virt-edit.pod b/edit/virt-edit.pod
index a6b82a594..cb5f5df59 100644
--- a/edit/virt-edit.pod
+++ b/edit/virt-edit.pod
@@ -171,7 +171,7 @@ the mount of its root and all of its mountpoints, so make sure
to mount all the mountpoints needed to work with the filenames
given as arguments.
-If you don't know what filesystems a disk image contains, you can
+If you don’t know what filesystems a disk image contains, you can
either run guestfish without this option, then list the partitions,
filesystems and LVs available (see L</list-partitions>,
L</list-filesystems> and L</lvs> commands), or you can use the
diff --git a/fish/events.c b/fish/events.c
index 459445c3e..a45004427 100644
--- a/fish/events.c
+++ b/fish/events.c
@@ -294,7 +294,7 @@ run_list_events (const char *cmd, size_t argc, char *argv[])
{
if (argc != 0) {
fprintf (stderr,
- _("use 'list-events' to list event handlers\n"));
+ _("use ‘list-events’ to list event handlers\n"));
return -1;
}
diff --git a/fish/fish.c b/fish/fish.c
index 781e1148c..c47576f97 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -122,12 +122,12 @@ usage (int status)
" %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"
+ " -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"
+ " --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"
" --help Display brief help\n"
@@ -140,8 +140,8 @@ usage (int status)
" --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"
+ " -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"
@@ -158,8 +158,10 @@ usage (int status)
"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"
+ "‘--ro’ is recommended to avoid any writes to the disk image.\n"
+ "\n"
+ "If ‘-i’ option fails run again without ‘-i’ and use ‘run’ +\n"
+ "‘list-filesystems’ + ‘mount’ cmds.\n"
"\n"
"For more information, see the manpage %s(1).\n"),
getprogname (), getprogname (),
@@ -683,9 +685,9 @@ script (int prompt)
"Welcome to guestfish, the guest filesystem shell for\n"
"editing virtual machine filesystems and disk images.\n"
"\n"
- "Type: 'help' for help on commands\n"
- " 'man' to read the manual\n"
- " 'quit' to quit the shell\n"
+ "Type: ‘help’ for help on commands\n"
+ " ‘man’ to read the manual\n"
+ " ‘quit’ to quit the shell\n"
"\n"));
if (inspector) {
@@ -893,7 +895,7 @@ parse_command_line (char *buf, int *exit_on_error_rtn)
} else
pend = &p[len];
} else {
- fprintf (stderr, _("%s: internal error parsing string at '%s'\n"),
+ fprintf (stderr, _("%s: internal error parsing string at ‘%s’\n"),
getprogname (), p);
abort ();
}
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
index 3b71c3a21..c3f684563 100644
--- a/fish/guestfish.pod
+++ b/fish/guestfish.pod
@@ -308,7 +308,7 @@ You have to mount something on F</> before most commands will work.
If any I<-m> or I<--mount> options are given, the guest is
automatically launched.
-If you don't know what filesystems a disk image contains, you can
+If you don’t know what filesystems a disk image contains, you can
either run guestfish without this option, then list the partitions,
filesystems and LVs available (see L</list-partitions>,
L</list-filesystems> and L</lvs> commands), or you can use the
@@ -355,7 +355,7 @@ of autosync in the L<guestfs(3)> manpage.
=item B<--no-dest-paths>
-Don't tab-complete paths on the guest filesystem. It is useful to be
+Don’t tab-complete paths on the guest filesystem. It is useful to be
able to hit the tab key to complete paths on the guest filesystem, but
this causes extra "hidden" guestfs calls to be made, so this option is
here to allow this feature to be disabled.
@@ -731,7 +731,7 @@ following will not do what you expect:
rm-rf /home/*
-Assuming you don't have a directory called literally F</home/*>
+Assuming you don’t have a directory called literally F</home/*>
then the above command will return an error.
To perform wildcard expansion, use the C<glob> command.
@@ -1034,14 +1034,14 @@ and cleans up guestfish when the script exits:
=head2 REMOTE CONTROL DOES NOT WORK WITH I<-a> ETC. OPTIONS
-Options such as I<-a>, I<--add>, I<-N>, I<--new> etc don't interact
+Options such as I<-a>, I<--add>, I<-N>, I<--new> etc don’t interact
properly with remote support. They are processed locally, and not
sent through to the remote guestfish. In particular this won't do
what you expect:
guestfish --remote --add disk.img
-Don't use these options. Use the equivalent commands instead, eg:
+Don’t use these options. Use the equivalent commands instead, eg:
guestfish --remote add-drive disk.img
diff --git a/fish/help.c b/fish/help.c
index 84820ee05..18e540018 100644
--- a/fish/help.c
+++ b/fish/help.c
@@ -43,23 +43,24 @@ display_help (void)
{
if (guestfs_is_config (g))
printf (_(
-"Add disk images to examine using the -a or -d options, or the 'add' command.\n"
-"Or create a new disk image using -N, or the 'alloc' or 'sparse' commands.\n"
-"Once you have done this, use the 'run' command.\n"
+"Add disk images to examine using the ‘-a’ or ‘-d’ options, or the ‘add’\n"
+"command.\n"
+"Or create a new disk image using ‘-N’, or the ‘alloc’ or ‘sparse’ commands.\n"
+"Once you have done this, use the ‘run’ command.\n"
));
else
printf (_(
-"Find out what filesystems are available using 'list-filesystems' and then\n"
-"mount them to examine or modify the contents using 'mount-ro' or\n"
-"'mount'.\n"
+"Find out what filesystems are available using ‘list-filesystems’ and then\n"
+"mount them to examine or modify the contents using ‘mount-ro’ or\n"
+"‘mount’.\n"
));
printf ("\n");
printf (_(
-"For more information about a command, use 'help cmd'.\n"
+"For more information about a command, use ‘help cmd’.\n"
"\n"
-"To read the manual, type 'man'.\n"
+"To read the manual, type ‘man’.\n"
));
printf ("\n");
diff --git a/fish/man.c b/fish/man.c
index a1983ec25..c7d28c6ed 100644
--- a/fish/man.c
+++ b/fish/man.c
@@ -34,7 +34,7 @@ int
run_man (const char *cmd, size_t argc, char *argv[])
{
if (argc != 0) {
- fprintf (stderr, _("use 'man' without parameters to open the manual\n"));
+ fprintf (stderr, _("use ‘man’ without parameters to open the manual\n"));
return -1;
}
diff --git a/fish/prep.c b/fish/prep.c
index f25d05281..540b9d0ba 100644
--- a/fish/prep.c
+++ b/fish/prep.c
@@ -106,7 +106,7 @@ parse_type_string (const char *type_string)
if (i == NR_PREPS)
error (EXIT_FAILURE, 0,
- _("-N parameter '%s': no such prepared disk image known.\n"
+ _("-N parameter ‘%s’: no such prepared disk image known.\n"
"Use 'guestfish -N help' to list possible values for the -N parameter."),
type_string);
@@ -159,7 +159,7 @@ void
prep_error (prep_data *data, const char *filename, const char *fs, ...)
{
fprintf (stderr,
- _("guestfish: error creating prepared disk image '%s' on '%s': "),
+ _("guestfish: error creating prepared disk image ‘%s’ on ‘%s’: "),
data->orig_type_string, filename);
va_list args;
diff --git a/fish/rc.c b/fish/rc.c
index 25179215e..de76ab127 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -68,7 +68,7 @@ create_sockdir (void)
(statbuf.st_mode & 0777) != 0700 ||
statbuf.st_uid != euid)
error (EXIT_FAILURE, 0,
- _("'%s' is not a directory or has insecure owner or permissions"),
+ _("‘%s’ is not a directory or has insecure owner or permissions"),
dir);
}
@@ -280,12 +280,12 @@ rc_listen (void)
xdrstdio_create (&xdr, fp, XDR_DECODE);
if (!xdr_guestfish_hello (&xdr, &hello)) {
- fprintf (stderr, _("guestfish: protocol error: could not read 'hello' message\n"));
+ fprintf (stderr, _("guestfish: protocol error: could not read ‘hello’ message\n"));
goto error;
}
if (STRNEQ (hello.vers, PACKAGE_VERSION)) {
- fprintf (stderr, _("guestfish: protocol error: version mismatch, server version '%s' does not match client version '%s'. The two versions must match exactly.\n"),
+ fprintf (stderr, _("guestfish: protocol error: version mismatch, server version ‘%s’ does not match client version ‘%s’. The two versions must match exactly.\n"),
PACKAGE_VERSION,
hello.vers);
xdr_free ((xdrproc_t) xdr_guestfish_hello, (char *) &hello);
diff --git a/fish/reopen.c b/fish/reopen.c
index 9098a9c31..37995d209 100644
--- a/fish/reopen.c
+++ b/fish/reopen.c
@@ -40,7 +40,7 @@ run_reopen (const char *cmd, size_t argc, char *argv[])
void *cb_data;
if (argc > 0) {
- fprintf (stderr, _("'reopen' command takes no parameters\n"));
+ fprintf (stderr, _("‘reopen’ command takes no parameters\n"));
return -1;
}
diff --git a/format/format.c b/format/format.c
index d0eb6a003..4e6ed2612 100644
--- a/format/format.c
+++ b/format/format.c
@@ -225,7 +225,7 @@ main (int argc, char *argv[])
/* Must be no extra arguments on the command line. */
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --format, --lvm "
"or --partition like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod
index f8e400db6..7f3e84308 100644
--- a/fuse/guestmount.pod
+++ b/fuse/guestmount.pod
@@ -49,7 +49,7 @@ For a libvirt guest called "Guest" you could do:
guestmount -d Guest -i --ro /mnt
-If you don't know what filesystems are contained in a guest or
+If you don’t know what filesystems are contained in a guest or
disk image, use L<virt-filesystems(1)> first:
virt-filesystems -d MyGuest
@@ -281,7 +281,7 @@ or if libguestfs misidentifies a filesystem.
=item B<--no-fork>
-Don't daemonize (or fork into the background).
+Don’t daemonize (or fork into the background).
=item B<-n>
diff --git a/fuse/guestunmount.c b/fuse/guestunmount.c
index a1d3702da..2b2c493f8 100644
--- a/fuse/guestunmount.c
+++ b/fuse/guestunmount.c
@@ -117,13 +117,13 @@ main (int argc, char *argv[])
display_short_options (options);
else if (STREQ (long_options[option_index].name, "fd")) {
if (sscanf (optarg, "%d", &fd) != 1 || fd < 0)
- error (EXIT_FAILURE, 0, _("cannot parse fd option '%s'"), optarg);
+ error (EXIT_FAILURE, 0, _("cannot parse fd option ‘%s’"), optarg);
} else if (STREQ (long_options[option_index].name, "no-retry")) {
retries = 0;
} else if (STREQ (long_options[option_index].name, "retry")) {
if (sscanf (optarg, "%zu", &retries) != 1 || retries >= 64)
error (EXIT_FAILURE, 0,
- _("cannot parse retries option or value is too large '%s'"),
+ _("cannot parse retries option or value is too large ‘%s’"),
optarg);
} else
error (EXIT_FAILURE, 0,
diff --git a/fuse/guestunmount.pod b/fuse/guestunmount.pod
index 72c5dc4e7..2bdbbb4a3 100644
--- a/fuse/guestunmount.pod
+++ b/fuse/guestunmount.pod
@@ -84,7 +84,7 @@ Display brief help and exit.
=item B<--quiet>
-Don't display error messages from fusermount. The return status is
+Don’t display error messages from fusermount. The return status is
still set (see L</EXIT STATUS> below).
=item B<--no-retry>
diff --git a/generator/actions.ml b/generator/actions.ml
index fa0e6568a..a04fdc0f9 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -191,4 +191,4 @@ let sort = List.sort action_compare
(* Find a single action by name, or give an error. *)
let find name =
try List.find (fun { name = n } -> n = name) actions
- with Not_found -> failwithf "could not find action named '%s'" name
+ with Not_found -> failwithf "could not find action named ‘%s’" name
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index 7e80ab821..0dee25a9d 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -415,7 +415,7 @@ For example:
\"/dev/vg_guest/lv_swap\" => \"swap\"
The key is not necessarily a block device. It may also be an opaque
-'mountable' string which can be passed to C<guestfs_mount>.
+‘mountable’ string which can be passed to C<guestfs_mount>.
The value can have the special value \"unknown\", meaning the
content of the device is undetermined or empty.
@@ -620,7 +620,7 @@ specify the remote username you want.
=item C<secret>
-For the C<rbd> protocol only, this specifies the 'secret' to use when
+For the C<rbd> protocol only, this specifies the ‘secret’ to use when
connecting to the remote device. It must be base64 encoded.
If not given, then a secret matching the given username will be looked up in the
@@ -1445,7 +1445,7 @@ See L<guestfs(3)/LIBVIRT AUTHENTICATION> for documentation and example code." };
longdesc = "\
Parse the program’s environment and set flags in the handle
accordingly. For example if C<LIBGUESTFS_DEBUG=1> then the
-'verbose' flag is set in the handle.
+‘verbose’ flag is set in the handle.
I<Most programs do not need to call this>. It is done implicitly
when you call C<guestfs_create>.
@@ -1464,7 +1464,7 @@ C<guestfs_parse_environment_list>." };
Parse the list of strings in the argument C<environment>
and set flags in the handle accordingly.
For example if C<LIBGUESTFS_DEBUG=1> is a string in the list,
-then the 'verbose' flag is set in the handle.
+then the ‘verbose’ flag is set in the handle.
This is the same as C<guestfs_parse_environment> except that
it parses an explicit list of strings instead of the program's
@@ -1753,7 +1753,7 @@ Mount a guest disk at a position in the filesystem. Block devices
are named F</dev/sda>, F</dev/sdb> and so on, as they were added to
the guest. If those block devices contain partitions, they will have
the usual names (eg. F</dev/sda1>). Also LVM F</dev/VG/LV>-style
-names can be used, or 'mountable' strings returned by
+names can be used, or ‘mountable’ strings returned by
C<guestfs_list_filesystems> or C<guestfs_inspect_get_mountpoints>.
The rules are the same as for L<mount(2)>: A filesystem must
@@ -6912,7 +6912,7 @@ This option may not be specified at the same time as the C<forceall> option.
=item C<forceall>
-Assume an answer of 'yes' to all questions; allows e2fsck to be used
+Assume an answer of ‘yes’ to all questions; allows e2fsck to be used
non-interactively.
This option may not be specified at the same time as the C<correct> option.
diff --git a/generator/actions_core_deprecated.ml b/generator/actions_core_deprecated.ml
index 5d13187ea..045b08643 100644
--- a/generator/actions_core_deprecated.ml
+++ b/generator/actions_core_deprecated.ml
@@ -157,7 +157,7 @@ C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads
and sectors on the device, which are passed directly to sfdisk as
the I<-C>, I<-H> and I<-S> parameters. If you pass C<0> for any
of these, then the corresponding parameter is omitted. Usually for
-'large' disks, you can just pass C<0> for these, but for small
+‘large’ disks, you can just pass C<0> for these, but for small
(floppy-sized) disks, sfdisk (or rather, the kernel) cannot work
out the right geometry and you will need to tell it.
diff --git a/generator/actions_debug.ml b/generator/actions_debug.ml
index 6a62d04ac..959a9415f 100644
--- a/generator/actions_debug.ml
+++ b/generator/actions_debug.ml
@@ -30,7 +30,7 @@ let non_daemon_functions = [
blocking = false;
shortdesc = "debug the drives (internal use only)";
longdesc = "\
-This returns the internal list of drives. 'debug' commands are
+This returns the internal list of drives. ‘debug’ commands are
not part of the formal API and can be removed or changed at any time." };
]
diff --git a/generator/actions_tsk.ml b/generator/actions_tsk.ml
index f8768bc8b..6e09b7d41 100644
--- a/generator/actions_tsk.ml
+++ b/generator/actions_tsk.ml
@@ -43,26 +43,26 @@ The C<tsk_dirent> structure contains the following fields.
=over 4
-=item 'tsk_inode'
+=item C<tsk_inode>
Filesystem reference number of the node. It migh be C<0>
if the node has been deleted.
-=item 'tsk_type'
+=item C<tsk_type>
Basic file type information.
See below for a detailed list of values.
-=item 'tsk_size'
+=item C<tsk_size>
File size in bytes. It migh be C<-1>
if the node has been deleted.
-=item 'tsk_name'
+=item C<tsk_name>
The file path relative to its directory.
-=item 'tsk_flags'
+=item C<tsk_flags>
Bitfield containing extra information regarding the entry.
It contains the logical OR of the following values:
@@ -95,30 +95,30 @@ application level compression.
=back
-=item 'tsk_atime_sec'
+=item C<tsk_atime_sec>
-=item 'tsk_atime_nsec'
+=item C<tsk_atime_nsec>
-=item 'tsk_mtime_sec'
+=item C<tsk_mtime_sec>
-=item 'tsk_mtime_nsec'
+=item C<tsk_mtime_nsec>
-=item 'tsk_ctime_sec'
+=item C<tsk_ctime_sec>
-=item 'tsk_ctime_nsec'
+=item C<tsk_ctime_nsec>
-=item 'tsk_crtime_sec'
+=item C<tsk_crtime_sec>
-=item 'tsk_crtime_nsec'
+=item C<tsk_crtime_nsec>
Respectively, access, modification, last status change and creation
time in Unix format in seconds and nanoseconds.
-=item 'tsk_nlink'
+=item C<tsk_nlink>
Number of file names pointing to this entry.
-=item 'tsk_link'
+=item C<tsk_link>
If the entry is a symbolic link, this field will contain the path
to the target file.
diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml
index d57f7b228..e45838811 100644
--- a/get-kernel/get_kernel.ml
+++ b/get-kernel/get_kernel.ml
@@ -124,7 +124,7 @@ let rec do_fetch ~transform_fn ~outputdir g root =
match typ with
| "linux" -> pick_kernel_files_linux g root
| typ ->
- error (f_"operating system '%s' not supported") typ in
+ error (f_"operating system ‘%s’ not supported") typ in
(* Download the files. *)
List.iter (
diff --git a/get-kernel/virt-get-kernel.pod b/get-kernel/virt-get-kernel.pod
index e99640f42..468cdc8e8 100644
--- a/get-kernel/virt-get-kernel.pod
+++ b/get-kernel/virt-get-kernel.pod
@@ -124,7 +124,7 @@ See also I<--unversioned-names>.
=item B<--quiet>
-Don't print ordinary progress messages.
+Don’t print ordinary progress messages.
=item B<--unversioned-names>
diff --git a/inspector/inspector.c b/inspector/inspector.c
index 77f7e08aa..112077696 100644
--- a/inspector/inspector.c
+++ b/inspector/inspector.c
@@ -239,7 +239,7 @@ main (int argc, char *argv[])
/* Must be no extra arguments on the command line. */
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --format "
"like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod
index 8be9aed1a..9d6fbda7c 100644
--- a/inspector/virt-inspector.pod
+++ b/inspector/virt-inspector.pod
@@ -40,7 +40,7 @@ time>. To inspect several virtual machines, you have to run
virt-inspector several times (for example, from a shell script
for-loop).
-Because virt-inspector needs direct access to guest images, it won't
+Because virt-inspector needs direct access to guest images, it won’t
normally work over remote libvirt connections.
All of the information available from virt-inspector is also available
diff --git a/lib/copy-in-out.c b/lib/copy-in-out.c
index a4e39f8b3..6c1a37504 100644
--- a/lib/copy-in-out.c
+++ b/lib/copy-in-out.c
@@ -48,7 +48,7 @@ guestfs_impl_copy_in (guestfs_h *g,
struct stat statbuf;
if (stat (localpath, &statbuf) == -1) {
- error (g, _("source '%s' does not exist (or cannot be read)"), localpath);
+ error (g, _("source ‘%s’ does not exist (or cannot be read)"), localpath);
return -1;
}
@@ -57,7 +57,7 @@ guestfs_impl_copy_in (guestfs_h *g,
return -1;
if (!remote_is_dir) {
- error (g, _("target '%s' is not a directory"), remotedir);
+ error (g, _("target ‘%s’ is not a directory"), remotedir);
return -1;
}
@@ -139,7 +139,7 @@ guestfs_impl_copy_out (guestfs_h *g,
if (stat (localdir, &statbuf) == -1 ||
! (S_ISDIR (statbuf.st_mode))) {
- error (g, _("target '%s' is not a directory"), localdir);
+ error (g, _("target ‘%s’ is not a directory"), localdir);
return -1;
}
@@ -176,7 +176,7 @@ guestfs_impl_copy_out (guestfs_h *g,
return -1;
if (r == 0) {
- error (g, _("'%s' is not a file or directory"), remotepath);
+ error (g, _("‘%s’ is not a file or directory"), remotepath);
return -1;
}
diff --git a/lib/create.c b/lib/create.c
index 6f1584ed3..bd4c32ef7 100644
--- a/lib/create.c
+++ b/lib/create.c
@@ -93,7 +93,7 @@ guestfs_impl_disk_create (guestfs_h *g, const char *filename,
* want to make unlimited promises through the API. We can always
* add more later.
*/
- error (g, _("unsupported format '%s'"), format);
+ error (g, _("unsupported format ‘%s’"), format);
return -1;
}
@@ -151,7 +151,7 @@ disk_create_raw (guestfs_h *g, const char *filename, int64_t size,
else if (STREQ (optargs->preallocation, "full"))
allocated = 1;
else {
- error (g, _("invalid value for preallocation parameter '%s'"),
+ error (g, _("invalid value for preallocation parameter ‘%s’"),
optargs->preallocation);
return -1;
}
@@ -168,7 +168,7 @@ disk_create_raw (guestfs_h *g, const char *filename, int64_t size,
if (stat (filename, &statbuf) == 0) {
/* Refuse to overwrite char devices. */
if (S_ISCHR (statbuf.st_mode)) {
- error (g, _("refusing to overwrite char device '%s'"), filename);
+ error (g, _("refusing to overwrite char device ‘%s’"), filename);
return -1;
}
/* Block devices have to be handled specially. */
@@ -273,7 +273,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size,
if (STRNEQ (backingformat, "raw") &&
STRNEQ (backingformat, "qcow2") &&
STRNEQ (backingformat, "vmdk")) {
- error (g, _("invalid value for backingformat parameter '%s'"),
+ error (g, _("invalid value for backingformat parameter ‘%s’"),
backingformat);
return -1;
}
@@ -288,7 +288,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size,
/* Ugh: https://lists.gnu.org/archive/html/qemu-devel/2014-08/msg03863.html */
preallocation = "falloc";
else {
- error (g, _("invalid value for preallocation parameter '%s'"),
+ error (g, _("invalid value for preallocation parameter ‘%s’"),
preallocation);
return -1;
}
@@ -296,7 +296,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size,
if (optargs->bitmask & GUESTFS_DISK_CREATE_COMPAT_BITMASK) {
compat = optargs->compat;
if (STRNEQ (compat, "0.10") && STRNEQ (compat, "1.1")) {
- error (g, _("invalid value for compat parameter '%s'"), compat);
+ error (g, _("invalid value for compat parameter ‘%s’"), compat);
return -1;
}
}
@@ -304,7 +304,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size,
clustersize = optargs->clustersize;
if (clustersize < 512 || clustersize > 2097152 ||
!is_power_of_2 ((unsigned) clustersize)) {
- error (g, _("invalid value for clustersize parameter '%d'"),
+ error (g, _("invalid value for clustersize parameter ‘%d’"),
clustersize);
return -1;
}
diff --git a/lib/drives.c b/lib/drives.c
index 4cf41cd9b..ec8bdbbe4 100644
--- a/lib/drives.c
+++ b/lib/drives.c
@@ -412,7 +412,7 @@ create_drive_dev_null (guestfs_h *g,
if (data->format) {
if (STRNEQ (data->format, "raw")) {
- error (g, _("for device '/dev/null', format must be 'raw'"));
+ error (g, _("for device ‘/dev/null’, format must be ‘raw’"));
return NULL;
}
} else {
@@ -653,14 +653,14 @@ parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret)
if (match2 (g, server, re_hostname_port, &hostname, &port_str)) {
if (sscanf (port_str, "%d", &port) != 1 || !valid_port (port)) {
- error (g, _("invalid port number '%s'"), port_str);
+ error (g, _("invalid port number ‘%s’"), port_str);
free (hostname);
free (port_str);
return -1;
}
free (port_str);
if (!VALID_HOSTNAME (hostname)) {
- error (g, _("invalid hostname '%s'"), hostname);
+ error (g, _("invalid hostname ‘%s’"), hostname);
free (hostname);
return -1;
}
@@ -671,7 +671,7 @@ parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret)
/* Doesn't match anything above, so assume it's a bare hostname. */
if (!VALID_HOSTNAME (server)) {
- error (g, _("invalid hostname or server string '%s'"), server);
+ error (g, _("invalid hostname or server string ‘%s’"), server);
return -1;
}
@@ -755,7 +755,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
else if (STREQ (optargs->discard, "besteffort"))
data.discard = discard_besteffort;
else {
- error (g, _("discard parameter must be 'disable', 'enable' or 'besteffort'"));
+ error (g, _("discard parameter must be ‘disable’, ‘enable’ or ‘besteffort’"));
free_drive_servers (data.servers, data.nr_servers);
return -1;
}
@@ -792,7 +792,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
}
if (data.cachemode &&
!(STREQ (data.cachemode, "writeback") || STREQ (data.cachemode, "unsafe"))) {
- error (g, _("cachemode parameter must be 'writeback' (default) or 'unsafe'"));
+ error (g, _("cachemode parameter must be ‘writeback’ (default) or ‘unsafe’"));
free_drive_servers (data.servers, data.nr_servers);
return -1;
}
@@ -871,7 +871,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
drv = create_drive_curl (g, &data);
}
else {
- error (g, _("unknown protocol '%s'"), protocol);
+ error (g, _("unknown protocol ‘%s’"), protocol);
drv = NULL; /*FALLTHROUGH*/
}
@@ -895,7 +895,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
}
if (!drv->disk_label) {
- error (g, _("'label' is required when hotplugging drives"));
+ error (g, _("‘label’ is required when hotplugging drives"));
free_drive_struct (drv);
return -1;
}
@@ -1025,7 +1025,7 @@ guestfs_impl_remove_drive (guestfs_h *g, const char *label)
if (drv->disk_label && STREQ (label, drv->disk_label))
goto found;
}
- error (g, _("disk with label '%s' not found"), label);
+ error (g, _("disk with label ‘%s’ not found"), label);
return -1;
found:
diff --git a/lib/fuse.c b/lib/fuse.c
index 7f80c494e..cde3783d9 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1072,7 +1072,7 @@ guestfs_impl_mount_local_run (guestfs_h *g)
r = guestfs_exists (g, "/");
guestfs_pop_error_handler (g);
if (r == -1) {
- error (g, _("you must call 'guestfs_mount' first to mount a filesystem on '/'.\nNote: '%s' is still mounted. Use 'guestunmount %s' to clean up."),
+ error (g, _("you must call ‘guestfs_mount’ first to mount a filesystem on '/'.\nNote: ‘%s’ is still mounted. Use ‘guestunmount %s’ to clean up."),
g->localmountpoint, g->localmountpoint);
return -1;
}
diff --git a/lib/guestfs.pod b/lib/guestfs.pod
index bbc64892b..544ca2a3c 100644
--- a/lib/guestfs.pod
+++ b/lib/guestfs.pod
@@ -208,7 +208,7 @@ Linux LVM2 logical volumes you could refer to those instead
(eg. F</dev/VG/LV>). Note that these are libguestfs virtual devices,
and are nothing to do with host devices.
-If you are given a disk image and you don't know what it contains then
+If you are given a disk image and you don’t know what it contains then
you have to find out. Libguestfs can do that too: use
L</guestfs_list_partitions> and L</guestfs_lvs> to list possible
partitions and LVs, and either try mounting each to see what is
@@ -458,7 +458,7 @@ Only supports Linux guests (not Windows, BSD, etc).
=item *
-Architecture limitations (eg. won't work for a PPC guest on
+Architecture limitations (eg. won’t work for a PPC guest on
an X86 host).
=item *
@@ -502,7 +502,7 @@ The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We
don't document Augeas itself here because there is excellent
documentation on the L<http://augeas.net/> website.
-If you don't want to use Augeas (you fool!) then try calling
+If you don’t want to use Augeas (you fool!) then try calling
L</guestfs_read_lines> to get the file as a list of lines which
you can iterate over.
@@ -1105,7 +1105,7 @@ or by copying and resizing and on failure going back to the original.
=head2 USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES
-Although we don't want to discourage you from using the C API, we will
+Although we don’t want to discourage you from using the C API, we will
mention here that the same API is also available in other languages.
The API is broadly identical in all supported languages. This means
@@ -1117,7 +1117,7 @@ straightforward, predictable isomorphism between each language.
Error messages are automatically transformed
into exceptions if the language supports it.
-We don't try to "object orientify" parts of the API in OO languages,
+We don’t try to "object orientify" parts of the API in OO languages,
although contributors are welcome to write higher level APIs above
what we provide in their favourite languages if they wish.
@@ -1264,7 +1264,7 @@ the error message was also unintuitive, but we have corrected this
since. Like the Bourne shell, we should have used C<guestfish -c
command> to run commands.
-=item guestfish megabyte modifiers don't work right on all commands
+=item guestfish megabyte modifiers don’t work right on all commands
In recent guestfish you can use C<1M> to mean 1 megabyte (and
similarly for other modifiers). What guestfish actually does is to
@@ -1643,7 +1643,7 @@ Clone the Linux git repository or download the Linux source tarball.
=item 2. Configure the kernel
-B<Note:> All 'make' commands must have C<ARCH=um> added.
+B<Note:> All ‘make’ commands must have C<ARCH=um> added.
make menuconfig ARCH=um
@@ -1858,7 +1858,7 @@ The internal test suite.
=item 3.
-If you want to use libguestfs APIs that don't refer to disks, since
+If you want to use libguestfs APIs that don’t refer to disks, since
libguestfs requires that at least one disk is added, you should add a
null disk.
@@ -1959,7 +1959,7 @@ L</CVE-2010-3851> below.
Libguestfs offers an API to get the format of a disk image
(L</guestfs_disk_format>, and it is safest to use this.
-I<Don't> be tempted to try parsing the text / human-readable output of
+I<Don’t> be tempted to try parsing the text / human-readable output of
C<qemu-img> since it cannot be parsed reliably and securely. Also do
not use the C<file> command since the output of that changes over
time.
@@ -2013,7 +2013,7 @@ no extra arguments are used).
=item C<GUESTFS_CREATE_NO_ENVIRONMENT>
-Don't parse any environment variables (such as C<LIBGUESTFS_DEBUG> etc).
+Don’t parse any environment variables (such as C<LIBGUESTFS_DEBUG> etc).
You can call L</guestfs_parse_environment> or
L</guestfs_parse_environment_list> afterwards to parse environment
@@ -2025,7 +2025,7 @@ L</guestfs_parse_environment>.
=item C<GUESTFS_CREATE_NO_CLOSE_ON_EXIT>
-Don't try to close the handle in an L<atexit(3)> handler if the
+Don’t try to close the handle in an L<atexit(3)> handler if the
program exits without explicitly closing the handle.
The default (if this flag is not given) is to install such an atexit
@@ -2282,7 +2282,7 @@ situation. I<Note this callback must not return>.
The default is to call L<abort(3)>.
-You cannot set C<cb> to C<NULL>. You can't ignore out of memory
+You cannot set C<cb> to C<NULL>. You can’t ignore out of memory
situations.
=head2 guestfs_get_out_of_memory_handler
@@ -2428,7 +2428,7 @@ With two:
GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,
-1);
-and so forth. Don't forget the terminating C<-1> otherwise
+and so forth. Don’t forget the terminating C<-1> otherwise
Bad Things will happen!
=head2 USING va_list FOR OPTIONAL ARGUMENTS
@@ -3213,7 +3213,7 @@ Our criteria for backporting changes are:
=item *
-Documentation changes which don't affect any code are
+Documentation changes which don’t affect any code are
backported unless the documentation refers to a future feature
which is not in stable.
@@ -3230,7 +3230,7 @@ too far out of step, allowing us to backport future fixes more easily.
=item *
-We I<don't> backport new features, new APIs, new tools etc, except in
+We I<don’t> backport new features, new APIs, new tools etc, except in
one exceptional case: the new feature is required in order to
implement an important bug fix.
diff --git a/lib/handle.c b/lib/handle.c
index ded14823c..91f5f755d 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -132,9 +132,9 @@ guestfs_create_flags (unsigned flags, ...)
if (!g->identifier) goto error;
if (guestfs_int_set_backend (g, DEFAULT_BACKEND) == -1) {
- warning (g, _("libguestfs was built with an invalid default backend, using 'direct' instead"));
+ warning (g, _("libguestfs was built with an invalid default backend, using ‘direct’ instead"));
if (guestfs_int_set_backend (g, "direct") == -1) {
- warning (g, _("'direct' backend does not work"));
+ warning (g, _("‘direct’ backend does not work"));
goto error;
}
}
diff --git a/lib/info.c b/lib/info.c
index 979173066..f7378adfd 100644
--- a/lib/info.c
+++ b/lib/info.c
@@ -87,7 +87,7 @@ guestfs_impl_disk_format (guestfs_h *g, const char *filename)
}
bad_type:
- error (g, _("qemu-img info: JSON output did not contain 'format' key"));
+ error (g, _("qemu-img info: JSON output did not contain ‘format’ key"));
return NULL;
}
@@ -112,7 +112,7 @@ guestfs_impl_disk_virtual_size (guestfs_h *g, const char *filename)
if (! YAJL_IS_NUMBER (node))
goto bad_type;
if (! YAJL_IS_INTEGER (node)) {
- error (g, _("qemu-img info: 'virtual-size' is not representable as a 64 bit integer"));
+ error (g, _("qemu-img info: ‘virtual-size’ is not representable as a 64 bit integer"));
return -1;
}
return YAJL_GET_INTEGER (node);
@@ -120,7 +120,7 @@ guestfs_impl_disk_virtual_size (guestfs_h *g, const char *filename)
}
bad_type:
- error (g, _("qemu-img info: JSON output did not contain 'virtual-size' key"));
+ error (g, _("qemu-img info: JSON output did not contain ‘virtual-size’ key"));
return -1;
}
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index 168bba6ac..261b09cda 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libvirt.c
@@ -196,7 +196,7 @@ get_source_format_or_autodetect (guestfs_h *g, struct drive *drv)
if (STREQ (format, "unknown")) {
error (g, _("could not auto-detect the format.\n"
"If the format is known, pass the format to libguestfs, eg. using the\n"
- "'--format' option, or via the optional 'format' argument to 'add-drive'."));
+ "‘--format’ option, or via the optional ‘format’ argument to ‘add-drive’."));
return NULL;
}
@@ -206,7 +206,7 @@ get_source_format_or_autodetect (guestfs_h *g, struct drive *drv)
/* Non-file protocol. */
error (g, _("could not auto-detect the format when using a non-file protocol.\n"
"If the format is known, pass the format to libguestfs, eg. using the\n"
- "'--format' option, or via the optional 'format' argument to 'add-drive'."));
+ "‘--format’ option, or via the optional ‘format’ argument to ‘add-drive’."));
return NULL;
}
@@ -334,7 +334,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
MIN_LIBVIRT_MAJOR, MIN_LIBVIRT_MINOR,
MIN_LIBVIRT_MICRO)) {
error (g, _("you must have libvirt >= %d.%d.%d "
- "to use the 'libvirt' backend"),
+ "to use the ‘libvirt’ backend"),
MIN_LIBVIRT_MAJOR, MIN_LIBVIRT_MINOR, MIN_LIBVIRT_MICRO);
return -1;
}
@@ -788,11 +788,11 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
CLEANUP_FREE char *backend = guestfs_get_backend (g);
error (g,
- _("libvirt hypervisor doesn't support qemu or KVM,\n"
+ _("libvirt hypervisor doesn’t support qemu or KVM,\n"
"so we cannot create the libguestfs appliance.\n"
- "The current backend is '%s'.\n"
+ "The current backend is ‘%s’.\n"
"Check that the PATH environment variable is set and contains\n"
- "the path to the qemu ('qemu-system-*') or KVM ('qemu-kvm', 'kvm' etc).\n"
+ "the path to the qemu (‘qemu-system-*’) or KVM (‘qemu-kvm’, ‘kvm’ etc).\n"
"Or: try setting:\n"
" export LIBGUESTFS_BACKEND=libvirt:qemu:///session\n"
"Or: if you want to have libguestfs run qemu directly, try:\n"
@@ -1429,7 +1429,7 @@ construct_libvirt_xml_disk (guestfs_h *g,
/* XXX We probably could support this if we thought about it some more. */
if (drv->iface) {
- error (g, _("'iface' parameter is not supported by the libvirt backend"));
+ error (g, _("‘iface’ parameter is not supported by the libvirt backend"));
return -1;
}
@@ -1475,7 +1475,7 @@ construct_libvirt_xml_disk (guestfs_h *g,
if (!is_host_device) {
path = realpath (drv->src.u.path, NULL);
if (path == NULL) {
- perrorf (g, _("realpath: could not convert '%s' to absolute path"),
+ perrorf (g, _("realpath: could not convert ‘%s’ to absolute path"),
drv->src.u.path);
return -1;
}
@@ -2036,7 +2036,7 @@ check_bridge_exists (guestfs_h *g, const char *brname)
return 0;
error (g,
- _("bridge '%s' not found. Try running:\n"
+ _("bridge ‘%s’ not found. Try running:\n"
"\n"
" brctl show\n"
"\n"
diff --git a/lib/launch-uml.c b/lib/launch-uml.c
index c391af309..eccc102f5 100644
--- a/lib/launch-uml.c
+++ b/lib/launch-uml.c
@@ -111,18 +111,18 @@ uml_supported (guestfs_h *g)
}
if (drv->iface) {
error (g,
- _("uml backend does not support drives with 'iface' parameter"));
+ _("uml backend does not support drives with ‘iface’ parameter"));
return false;
}
if (drv->disk_label) {
error (g,
- _("uml backend does not support drives with 'label' parameter"));
+ _("uml backend does not support drives with ‘label’ parameter"));
return false;
}
/* Note that discard == "besteffort" is fine. */
if (drv->discard == discard_enable) {
error (g,
- _("uml backend does not support drives with 'discard' parameter set to 'enable'"));
+ _("uml backend does not support drives with ‘discard’ parameter set to ‘enable’"));
return false;
}
}
diff --git a/lib/launch.c b/lib/launch.c
index f0ac4bef6..7f06c69f8 100644
--- a/lib/launch.c
+++ b/lib/launch.c
@@ -173,7 +173,7 @@ guestfs_impl_get_pid (guestfs_h *g)
if (g->backend_ops->get_pid == NULL)
NOT_SUPPORTED (g, -1,
- _("the current backend does not support 'get-pid'"));
+ _("the current backend does not support ‘get-pid’"));
return g->backend_ops->get_pid (g, g->backend_data);
}
@@ -272,7 +272,7 @@ guestfs_impl_config (guestfs_h *g,
STREQ (hv_param, "-full-screen") ||
STREQ (hv_param, "-std-vga") ||
STREQ (hv_param, "-vnc")) {
- error (g, _("parameter '%s' isn't allowed"), hv_param);
+ error (g, _("parameter ‘%s’ isn't allowed"), hv_param);
return -1;
}
diff --git a/lib/libvirt-auth.c b/lib/libvirt-auth.c
index cbc246114..15b6defaf 100644
--- a/lib/libvirt-auth.c
+++ b/lib/libvirt-auth.c
@@ -93,7 +93,7 @@ guestfs_impl_set_libvirt_supported_credentials (guestfs_h *g, char *const *creds
for (i = 0; creds[i] != NULL; ++i) {
credtype = get_credtype_from_string (creds[i]);
if (credtype == -1) {
- error (g, _("unknown credential type '%s'"), creds[i]);
+ error (g, _("unknown credential type ‘%s’"), creds[i]);
return -1;
}
diff --git a/lib/libvirt-domain.c b/lib/libvirt-domain.c
index 7c17ca438..37c0b49b2 100644
--- a/lib/libvirt-domain.c
+++ b/lib/libvirt-domain.c
@@ -126,7 +126,7 @@ guestfs_impl_add_domain (guestfs_h *g, const char *domain_name,
if (!dom) {
err = virGetLastError ();
- error (g, _("no libvirt domain called '%s': %s"),
+ error (g, _("no libvirt domain called ‘%s’: %s"),
domain_name, err->message);
goto cleanup;
}
@@ -614,7 +614,7 @@ for_each_disk (guestfs_h *g,
sec = virSecretLookupByUUIDString (conn, uuidstr);
if (sec == NULL) {
err = virGetLastError ();
- error (g, _("no secret with UUID '%s': %s"),
+ error (g, _("no secret with UUID ‘%s’: %s"),
uuidstr, err ? err->message : "(none)");
continue;
}
@@ -622,7 +622,7 @@ for_each_disk (guestfs_h *g,
value = virSecretGetValue (sec, &value_size, 0);
if (value == NULL) {
err = virGetLastError ();
- error (g, _("cannot get the value of the secret with UUID '%s': %s"),
+ error (g, _("cannot get the value of the secret with UUID ‘%s’: %s"),
uuidstr, err->message);
virSecretFree (sec);
continue;
@@ -650,7 +650,7 @@ for_each_disk (guestfs_h *g,
sec = virSecretLookupByUsage (conn, usageType, usagestr);
if (sec == NULL) {
err = virGetLastError ();
- error (g, _("no secret for usage '%s': %s"),
+ error (g, _("no secret for usage ‘%s’: %s"),
usagestr, err->message);
continue;
}
@@ -658,7 +658,7 @@ for_each_disk (guestfs_h *g,
value = virSecretGetValue (sec, &value_size, 0);
if (value == NULL) {
err = virGetLastError ();
- error (g, _("cannot get the value of the secret with usage '%s': %s"),
+ error (g, _("cannot get the value of the secret with usage ‘%s’: %s"),
usagestr, err->message);
virSecretFree (sec);
continue;
@@ -904,7 +904,7 @@ filename_from_pool (guestfs_h *g, virConnectPtr conn,
pool = virStoragePoolLookupByName (conn, pool_name);
if (pool == NULL) {
err = virGetLastError ();
- error (g, _("no libvirt pool called '%s': %s"),
+ error (g, _("no libvirt pool called ‘%s’: %s"),
pool_name, err->message);
goto cleanup;
}
@@ -912,7 +912,7 @@ filename_from_pool (guestfs_h *g, virConnectPtr conn,
vol = virStorageVolLookupByName (pool, volume_name);
if (vol == NULL) {
err = virGetLastError ();
- error (g, _("no volume called '%s' in the libvirt pool '%s': %s"),
+ error (g, _("no volume called ‘%s’ in the libvirt pool ‘%s’: %s"),
volume_name, pool_name, err->message);
goto cleanup;
}
@@ -920,7 +920,7 @@ filename_from_pool (guestfs_h *g, virConnectPtr conn,
ret = virStorageVolGetInfo (vol, &info);
if (ret < 0) {
err = virGetLastError ();
- error (g, _("cannot get information of the libvirt volume '%s': %s"),
+ error (g, _("cannot get information of the libvirt volume ‘%s’: %s"),
volume_name, err->message);
goto cleanup;
}
@@ -934,7 +934,7 @@ filename_from_pool (guestfs_h *g, virConnectPtr conn,
filename = virStorageVolGetPath (vol);
if (filename == NULL) {
err = virGetLastError ();
- error (g, _("cannot get the filename of the libvirt volume '%s': %s"),
+ error (g, _("cannot get the filename of the libvirt volume ‘%s’: %s"),
volume_name, err->message);
goto cleanup;
}
diff --git a/lib/qemu.c b/lib/qemu.c
index d60692f0d..6d8fe3594 100644
--- a/lib/qemu.c
+++ b/lib/qemu.c
@@ -435,7 +435,7 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g,
*/
path = realpath (src->u.path, NULL);
if (path == NULL) {
- perrorf (g, _("realpath: could not convert '%s' to absolute path"),
+ perrorf (g, _("realpath: could not convert ‘%s’ to absolute path"),
src->u.path);
return NULL;
}
@@ -650,7 +650,7 @@ guestfs_int_discard_possible (guestfs_h *g, struct drive *drv,
*/
NOT_SUPPORTED (g, false,
_("discard cannot be enabled on this drive: "
- "qemu does not support discard for '%s' format files"),
+ "qemu does not support discard for ‘%s’ format files"),
drv->src.format);
}
@@ -673,7 +673,7 @@ guestfs_int_discard_possible (guestfs_h *g, struct drive *drv,
case drive_protocol_tftp:
NOT_SUPPORTED (g, -1,
_("discard cannot be enabled on this drive: "
- "protocol '%s' does not support discard"),
+ "protocol ‘%s’ does not support discard"),
guestfs_int_drive_protocol_to_string (drv->src.protocol));
}
diff --git a/lib/tmpdirs.c b/lib/tmpdirs.c
index 7d289a650..344475d1b 100644
--- a/lib/tmpdirs.c
+++ b/lib/tmpdirs.c
@@ -74,7 +74,7 @@ set_abs_path (guestfs_h *g, const char *ctxstr,
}
if (!S_ISDIR (statbuf.st_mode)) {
- error (g, _("%s: %s: '%s' is not a directory"),
+ error (g, _("%s: %s: ‘%s’ is not a directory"),
_("setting temporary directory"), ctxstr, tmpdir);
return -1;
}
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 961127ab9..27cdb9fd2 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -443,7 +443,7 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
}
if (sscanf (line, "%" SCNu64, estimate_rtn) != 1) {
- fprintf (stderr, _("%s: cannot parse the output of 'du' command: %s\n"),
+ fprintf (stderr, _("%s: cannot parse the output of ‘du’ command: %s\n"),
getprogname (), line);
return -1;
}
@@ -632,7 +632,7 @@ parse_size (const char *str, uint64_t estimate, uint64_t *size_rtn)
xerr = xstrtoull (str, NULL, 0, &size, "0kKMGTPEZY");
if (xerr != LONGINT_OK) {
fprintf (stderr,
- _("%s: %s: invalid size parameter '%s' (%s returned %u)\n"),
+ _("%s: %s: invalid size parameter ‘%s’ (%s returned %u)\n"),
getprogname (), "parse_size", str, "xstrtoull", xerr);
return -1;
}
diff --git a/make-fs/virt-make-fs.pod b/make-fs/virt-make-fs.pod
index 5a044f85d..eed176647 100644
--- a/make-fs/virt-make-fs.pod
+++ b/make-fs/virt-make-fs.pod
@@ -106,7 +106,7 @@ before using it). This allows you to choose a large I<--size> but the
extra space won't actually be allocated in the image until you try to
store something in it.
-Don't forget that you can also use local commands including
+Don’t forget that you can also use local commands including
L<resize2fs(8)> and L<virt-resize(1)> to resize existing filesystems,
or rerun virt-make-fs to build another image from scratch.
diff --git a/mllib/checksums.ml b/mllib/checksums.ml
index 000214703..61deac2d1 100644
--- a/mllib/checksums.ml
+++ b/mllib/checksums.ml
@@ -51,7 +51,7 @@ let compute_checksum csum_type ?tar filename =
| "sha1" -> "sha1sum"
| "sha256" -> "sha256sum"
| "sha512" -> "sha512sum"
- | _ -> error (f_"unhandled checksum type '%s'") csum_type
+ | _ -> error (f_"unhandled checksum type ‘%s’") csum_type
in
let cmd =
match tar with
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index e1d63292e..73546d773 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -729,7 +729,7 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg =
[ S 'v'; L"verbose" ], Getopt.Unit set_verbose, s_"Enable libguestfs debugging messages";
[ S 'x' ], Getopt.Unit set_trace, s_"Enable tracing of libguestfs calls";
[ L"debug-gc" ], Getopt.Unit set_debug_gc, Getopt.hidden_option_description;
- [ S 'q'; L"quiet" ], Getopt.Unit set_quiet, s_"Don't print progress messages";
+ [ S 'q'; L"quiet" ], Getopt.Unit set_quiet, s_"Don’t print progress messages";
[ L"color"; L"colors";
L"colour"; L"colours" ], Getopt.Unit set_colours, s_"Use ANSI colour sequences even if not tty";
] @ argspec in
@@ -737,7 +737,7 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg =
argspec @
(if key_opts then
[
- [ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don't turn off echo for passphrases";
+ [ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don’t turn off echo for passphrases";
[ L"keys-from-stdin" ], Getopt.Unit c_set_keys_from_stdin, s_"Read passphrases from stdin";
]
else []) in
@@ -817,11 +817,11 @@ let external_command ?(echo_cmd = true) cmd =
(match stat with
| Unix.WEXITED 0 -> ()
| Unix.WEXITED i ->
- error (f_"external command '%s' exited with error %d") cmd i
+ error (f_"external command ‘%s’ exited with error %d") cmd i
| Unix.WSIGNALED i ->
- error (f_"external command '%s' killed by signal %d") cmd i
+ error (f_"external command ‘%s’ killed by signal %d") cmd i
| Unix.WSTOPPED i ->
- error (f_"external command '%s' stopped by signal %d") cmd i
+ error (f_"external command ‘%s’ stopped by signal %d") cmd i
);
lines
@@ -840,10 +840,10 @@ let run_command ?(echo_cmd = true) args =
match stat with
| Unix.WEXITED i -> i
| Unix.WSIGNALED i ->
- error (f_"external command '%s' killed by signal %d")
+ error (f_"external command ‘%s’ killed by signal %d")
(stringify_args args) i
| Unix.WSTOPPED i ->
- error (f_"external command '%s' stopped by signal %d")
+ error (f_"external command ‘%s’ stopped by signal %d")
(stringify_args args) i
with
| Executable_not_found tool -> 127
diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
index 8336c3fb5..d2d98768c 100644
--- a/mllib/getopt-c.c
+++ b/mllib/getopt-c.c
@@ -189,7 +189,7 @@ strtoint (const char *arg)
long int num;
if (xstrtol (arg, NULL, 0, &num, "") != LONGINT_OK) {
- fprintf (stderr, _("%s: '%s' is not a numeric value.\n"),
+ fprintf (stderr, _("%s: ‘%s’ is not a numeric value.\n"),
getprogname (), arg);
show_error (EXIT_FAILURE);
}
@@ -375,10 +375,10 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu
v = Field (actionv, 1);
if (!list_mem (v, optarg)) {
if (c != 0) {
- fprintf (stderr, _("%s: '%s' is not allowed for -%c; allowed values are:\n"),
+ fprintf (stderr, _("%s: ‘%s’ is not allowed for -%c; allowed values are:\n"),
getprogname (), optarg, c);
} else {
- fprintf (stderr, _("%s: '%s' is not allowed for %s%s; allowed values are:\n"),
+ fprintf (stderr, _("%s: ‘%s’ is not allowed for %s%s; allowed values are:\n"),
getprogname (), optarg,
vector_has_dashdash_opt (specv, longopts[option_index].name) ? "--" : "-",
longopts[option_index].name);
@@ -402,7 +402,7 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu
if (optind < (int) argc) {
if (anon_funv == Val_none) {
- fprintf (stderr, _("Extra parameter on the command line: '%s'.\n"),
+ fprintf (stderr, _("Extra parameter on the command line: ‘%s’.\n"),
argv[optind]);
show_error (EXIT_FAILURE);
}
diff --git a/p2v/virt-p2v-make-disk.pod b/p2v/virt-p2v-make-disk.pod
index 5530757ce..487ee0258 100644
--- a/p2v/virt-p2v-make-disk.pod
+++ b/p2v/virt-p2v-make-disk.pod
@@ -138,7 +138,7 @@ See L</ADDING EXTRA PACKAGES> above.
=item B<--no-warn-if-partition>
-Normally you should not write to a partition on a USB drive (ie. don't
+Normally you should not write to a partition on a USB drive (ie. don’t
use S<C<-o /dev/sdX1>>, use S<C<-o /dev/sdX>> to make a bootable USB
drive). If you do this, virt-builder prints a warning. This option
suppresses that warning.
diff --git a/p2v/virt-p2v.pod b/p2v/virt-p2v.pod
index 127fb891c..ad0b00ac4 100644
--- a/p2v/virt-p2v.pod
+++ b/p2v/virt-p2v.pod
@@ -14,7 +14,7 @@ Virt-p2v converts a physical machine to run virtualized on KVM,
managed by libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV), or
one of the other targets supported by L<virt-v2v(1)>.
-Normally you don't run the virt-p2v program directly. Instead you
+Normally you don’t run the virt-p2v program directly. Instead you
have to boot the physical machine using the bootable CD-ROM, ISO or
PXE image. This bootable image contains the virt-p2v binary and runs
it automatically. Booting from a CD-ROM/etc is required because the
@@ -282,7 +282,7 @@ machine. If conversion is successful, you should never reboot it.
=head1 KERNEL COMMAND LINE CONFIGURATION
-If you don't want to configure things using the graphical UI, an
+If you don’t want to configure things using the graphical UI, an
alternative is to configure through the kernel command line. This is
especially convenient if you are converting a lot of physical machines
which are booted using PXE.
diff --git a/rescue/rescue.c b/rescue/rescue.c
index f03040690..19baa8797 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -189,10 +189,10 @@ main (int argc, char *argv[])
} else if (STREQ (long_options[option_index].name, "smp")) {
if (sscanf (optarg, "%d", &smp) != 1)
error (EXIT_FAILURE, 0,
- _("could not parse --smp parameter '%s'"), optarg);
+ _("could not parse --smp parameter ‘%s’"), optarg);
if (smp < 1)
error (EXIT_FAILURE, 0,
- _("--smp parameter '%s' should be >= 1"), optarg);
+ _("--smp parameter ‘%s’ should be >= 1"), optarg);
} else if (STREQ (long_options[option_index].name, "suggest")) {
suggest = 1;
} else if (STREQ (long_options[option_index].name, "scratch")) {
@@ -202,16 +202,16 @@ main (int argc, char *argv[])
int n;
if (sscanf (optarg, "%d", &n) != 1)
error (EXIT_FAILURE, 0,
- _("could not parse --scratch parameter '%s'"), optarg);
+ _("could not parse --scratch parameter ‘%s’"), optarg);
if (n < 1)
error (EXIT_FAILURE, 0,
- _("--scratch parameter '%s' should be >= 1"), optarg);
+ _("--scratch parameter ‘%s’ should be >= 1"), optarg);
add_scratch_disks (n, &drvs);
}
} else if (STREQ (long_options[option_index].name, "memsize")) {
if (sscanf (optarg, "%d", &memsize) != 1)
error (EXIT_FAILURE, 0,
- _("could not parse memory size '%s'"), optarg);
+ _("could not parse memory size ‘%s’"), optarg);
} else
error (EXIT_FAILURE, 0,
_("unknown long option: %s (%d)"),
@@ -325,7 +325,7 @@ main (int argc, char *argv[])
/* Must be no extra arguments on the command line. */
if (optind != argc) {
- fprintf (stderr, _("%s: error: extra argument '%s' on command line.\n"
+ fprintf (stderr, _("%s: error: extra argument ‘%s’ on command line.\n"
"Make sure to specify the argument for --format or --scratch "
"like '--format=%s'.\n"),
getprogname (), argv[optind], argv[optind]);
diff --git a/rescue/suggest.c b/rescue/suggest.c
index 07c9f474b..78792f2d3 100644
--- a/rescue/suggest.c
+++ b/rescue/suggest.c
@@ -159,12 +159,12 @@ suggest_filesystems (void)
return;
}
- printf (_("This disk contains one or more filesystems, but we don't recognize any\n"
+ printf (_("This disk contains one or more filesystems, but we don’t recognize any\n"
"operating system. You can use these mount commands in virt-rescue (at the\n"
"><rescue> prompt) to mount these filesystems.\n\n"));
for (i = 0; fses[i] != NULL; i += 2) {
- printf (_("# %s has type '%s'\n"), fses[i], fses[i+1]);
+ printf (_("# %s has type ‘%s’\n"), fses[i], fses[i+1]);
if (TEST_MOUNTABLE (fses[i+1]))
printf ("mount %s /sysroot\n", fses[i]);
diff --git a/resize/resize.ml b/resize/resize.ml
index dc96b23ea..f9b612e28 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -192,17 +192,17 @@ let main () =
let argspec = [
[ L"align-first" ], Getopt.Set_string (s_"never|always|auto", align_first), s_"Align first partition (default: auto)";
[ L"alignment" ], Getopt.Set_int (s_"sectors", alignment), s_"Set partition alignment (default: 128 sectors)";
- [ L"no-copy-boot-loader" ], Getopt.Clear copy_boot_loader, s_"Don't copy boot loader";
+ [ L"no-copy-boot-loader" ], Getopt.Clear copy_boot_loader, s_"Don’t copy boot loader";
[ S 'd'; L"debug" ], Getopt.Unit set_verbose, s_"Enable debugging messages";
[ L"delete" ], Getopt.String (s_"part", add deletes), s_"Delete partition";
[ L"expand" ], Getopt.String (s_"part", set_expand), s_"Expand partition";
- [ L"no-expand-content" ], Getopt.Clear expand_content, s_"Don't expand content";
- [ L"no-extra-partition" ], Getopt.Clear extra_partition, s_"Don't create extra partition";
+ [ L"no-expand-content" ], Getopt.Clear expand_content, s_"Don’t expand content";
+ [ L"no-extra-partition" ], Getopt.Clear extra_partition, s_"Don’t create extra partition";
[ L"format" ], Getopt.Set_string (s_"format", format), s_"Format of input disk";
[ L"ignore" ], Getopt.String (s_"part", add ignores), s_"Ignore partition";
[ L"lv-expand"; L"LV-expand"; L"lvexpand"; L"LVexpand" ], Getopt.String (s_"lv", add lv_expands), s_"Expand logical volume";
[ L"machine-readable" ], Getopt.Set machine_readable, s_"Make output machine readable";
- [ S 'n'; L"dry-run"; L"dryrun" ], Getopt.Set dryrun, s_"Don't perform changes";
+ [ S 'n'; L"dry-run"; L"dryrun" ], Getopt.Set dryrun, s_"Don’t perform changes";
[ L"ntfsresize-force" ], Getopt.Set ntfsresize_force, s_"Force ntfsresize";
[ L"output-format" ], Getopt.Set_string (s_"format", output_format), s_"Format of output disk";
[ L"resize" ], Getopt.String (s_"part=size", add resizes), s_"Resize partition";
@@ -313,14 +313,14 @@ read the man page virt-resize(1).
let infile =
try (infile, URI.parse_uri infile)
with Invalid_argument "URI.parse_uri" ->
- error (f_"error parsing URI '%s'. Look for error messages printed above.")
+ error (f_"error parsing URI ‘%s’. Look for error messages printed above.")
infile in
(* outfile can be a URI. *)
let outfile =
try (outfile, URI.parse_uri outfile)
with Invalid_argument "URI.parse_uri" ->
- error (f_"error parsing URI '%s'. Look for error messages printed above.")
+ error (f_"error parsing URI ‘%s’. Look for error messages printed above.")
outfile in
infile, outfile, align_first, alignment, copy_boot_loader,
@@ -620,15 +620,15 @@ read the man page virt-resize(1).
let partition =
try Hashtbl.find hash name
with Not_found ->
- error (f_"%s: partition not found in the source disk image (this error came from '%s' option on the command line). Try running this command: virt-filesystems --partitions --long -a %s")
+ error (f_"%s: partition not found in the source disk image (this error came from ‘%s’ option on the command line). Try running this command: virt-filesystems --partitions --long -a %s")
name option (fst infile) in
if partition.p_operation = OpIgnore then
- error (f_"%s: partition already ignored, you cannot use it in '%s' option")
+ error (f_"%s: partition already ignored, you cannot use it in ‘%s’ option")
name option;
if partition.p_operation = OpDelete then
- error (f_"%s: partition already deleted, you cannot use it in '%s' option")
+ error (f_"%s: partition already deleted, you cannot use it in ‘%s’ option")
name option;
partition in
@@ -677,18 +677,18 @@ read the man page virt-resize(1).
*)
match p.p_type with
| ContentUnknown ->
- error (f_"%s: This partition has unknown content which might be damaged by shrinking it. If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy any data on this partition. (This error came from '%s' option on the command line.)")
+ error (f_"%s: This partition has unknown content which might be damaged by shrinking it. If you want to shrink this partition, you need to use the ‘--resize-force’ option, but that could destroy any data on this partition. (This error came from ‘%s’ option on the command line.)")
name option
| ContentPV size when size > newsize ->
- error (f_"%s: This partition contains an LVM physical volume which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy any data on this partition. (This error came from '%s' option on the command line.)")
+ error (f_"%s: This partition contains an LVM physical volume which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the ‘--resize-force’ option, but that could destroy any data on this partition. (This error came from ‘%s‘ option on the command line.)")
name size newsize option
| ContentPV _ -> ()
| ContentFS (fstype, size) when size > newsize ->
- error (f_"%s: This partition contains a %s filesystem which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy any data on this partition. (This error came from '%s' option on the command line.)")
+ error (f_"%s: This partition contains a %s filesystem which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the ‘--resize-force’ option, but that could destroy any data on this partition. (This error came from ‘%s’ option on the command line.)")
name fstype size newsize option
| ContentFS _ -> ()
| ContentExtendedPartition ->
- error (f_"%s: This extended partition contains logical partitions which might be damaged by shrinking it. If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy logical partitions within this partition. (This error came from '%s' option on the command line.)")
+ error (f_"%s: This extended partition contains logical partitions which might be damaged by shrinking it. If you want to shrink this partition, you need to use the ‘--resize-force’ option, but that could destroy logical partitions within this partition. (This error came from ‘%s’ option on the command line.)")
name option
| ContentSwap -> ()
);
@@ -707,7 +707,7 @@ read the man page virt-resize(1).
if n == 0 then raise Not_found;
String.sub arg 0 i, String.sub arg (i+1) n
with Not_found ->
- error (f_"%s: missing size field in '%s' option") arg option in
+ error (f_"%s: missing size field in ‘%s’ option") arg option in
let p = find_partition ~option dev in
@@ -802,7 +802,7 @@ read the man page virt-resize(1).
| None -> ()
| Some dev ->
if surplus > 0L then
- error (f_"You cannot use --shrink when there is no deficit (see 'deficit' in the virt-resize(1) man page).");
+ error (f_"You cannot use --shrink when there is no deficit (see ‘deficit’ in the virt-resize(1) man page).");
let option = "--shrink" in
let p = find_partition ~option dev in
@@ -834,7 +834,7 @@ read the man page virt-resize(1).
let lv =
try Hashtbl.find hash name
with Not_found ->
- error (f_"%s: logical volume not found in the source disk image (this error came from '--lv-expand' option on the command line). Try running this command: virt-filesystems --logical-volumes --long -a %s")
+ error (f_"%s: logical volume not found in the source disk image (this error came from ‘--lv-expand’ option on the command line). Try running this command: virt-filesystems --logical-volumes --long -a %s")
name (fst infile) in
lv.lv_operation <- LVOpExpand
) lv_expands;
@@ -905,7 +905,7 @@ read the man page virt-resize(1).
sprintf (f_"%s: This partition will be resized from %s to %s.")
p.p_name (human_size p.p_part.G.part_size) (human_size newsize) ^
if can_expand_content p.p_type then (
- sprintf (f_" The %s on %s will be expanded using the '%s' method.")
+ sprintf (f_" The %s on %s will be expanded using the ‘%s’ method.")
(string_of_partition_content_no_size p.p_type)
p.p_name
(string_of_expand_content_method
@@ -936,7 +936,7 @@ read the man page virt-resize(1).
sprintf (f_"%s: This logical volume will be expanded to maximum size.")
name ^
if can_expand_content lv.lv_type then (
- sprintf (f_" The %s on %s will be expanded using the '%s' method.")
+ sprintf (f_" The %s on %s will be expanded using the ‘%s’ method.")
(string_of_partition_content_no_size lv.lv_type)
name
(string_of_expand_content_method
@@ -1359,7 +1359,7 @@ read the man page virt-resize(1).
let target = sprintf "/dev/sda%d" p.p_target_partnum in
let meth = expand_content_method p.p_type in
- message (f_"Expanding %s%s using the '%s' method")
+ message (f_"Expanding %s%s using the ‘%s’ method")
source
(if source <> target then sprintf " (now %s)" target else "")
(string_of_expand_content_method meth);
@@ -1378,7 +1378,7 @@ read the man page virt-resize(1).
let name = lv.lv_name in
let meth = expand_content_method lv.lv_type in
- message (f_"Expanding %s using the '%s' method")
+ message (f_"Expanding %s using the ‘%s’ method")
name (string_of_expand_content_method meth);
(* First expand the LV itself to maximum size. *)
diff --git a/resize/virt-resize.pod b/resize/virt-resize.pod
index 14c682e7f..9fc321124 100644
--- a/resize/virt-resize.pod
+++ b/resize/virt-resize.pod
@@ -239,7 +239,7 @@ Similarly, to get non-sparse raw output use:
fallocate -l size outdisk
-(on older systems that don't have the L<fallocate(1)> command use
+(on older systems that don’t have the L<fallocate(1)> command use
C<dd if=/dev/zero of=outdisk bs=1M count=..>)
=head2 LOGICAL PARTITIONS
@@ -463,7 +463,7 @@ L</MACHINE READABLE OUTPUT> below.
=item B<--dry-run>
-Print a summary of what would be done, but don't do anything.
+Print a summary of what would be done, but don’t do anything.
=item B<--no-copy-boot-loader>
@@ -523,7 +523,7 @@ L</QCOW2 AND NON-SPARSE RAW FORMATS>.
=item B<--quiet>
-Don't print the summary.
+Don’t print the summary.
=item B<--resize> PART=SIZE
diff --git a/sparsify/cmdline.ml b/sparsify/cmdline.ml
index 09e013555..4629aa7a4 100644
--- a/sparsify/cmdline.ml
+++ b/sparsify/cmdline.ml
@@ -146,7 +146,7 @@ read the man page virt-sparsify(1).
(* Check the output is not a char special (RHBZ#1056290). *)
if is_char_device outdisk then
- error (f_"output '%s' cannot be a character device, it must be a regular file")
+ error (f_"output ‘%s’ cannot be a character device, it must be a regular file")
outdisk;
indisk,
diff --git a/sysprep/main.ml b/sysprep/main.ml
index 3dc8f50e7..82164c62f 100644
--- a/sysprep/main.ml
+++ b/sysprep/main.ml
@@ -55,7 +55,7 @@ let main () =
let uri =
try URI.parse_uri arg
with Invalid_argument "URI.parse_uri" ->
- error (f_"error parsing URI '%s'. Look for error messages printed above.") arg in
+ error (f_"error parsing URI ‘%s’. Look for error messages printed above.") arg in
let format = match !format with "auto" -> None | fmt -> Some fmt in
push_front (uri, format) files;
format_consumed := true
@@ -79,7 +79,7 @@ let main () =
fun opset op_name ->
try Sysprep_operation.add_to_set op_name opset
with Not_found ->
- error (f_"--enable: '%s' is not a known operation") op_name
+ error (f_"--enable: ‘%s’ is not a known operation") op_name
) Sysprep_operation.empty_set ops in
operations := Some opset
and set_operations op_string =
@@ -109,7 +109,7 @@ let main () =
| `Remove n -> Sysprep_operation.remove_from_set in
try f n opset with
| Not_found ->
- error (f_"--operations: '%s' is not a known operation") n
+ error (f_"--operations: ‘%s’ is not a known operation") n
) currentopset ops in
operations := Some opset
and list_operations () =
diff --git a/sysprep/virt-sysprep.pod b/sysprep/virt-sysprep.pod
index 89ba49426..2ec54c7a0 100644
--- a/sysprep/virt-sysprep.pod
+++ b/sysprep/virt-sysprep.pod
@@ -236,7 +236,7 @@ will do the same, plus mount F</var> with C<rw,nodiratime>.
=item B<--quiet>
-Don't print log messages.
+Don’t print log messages.
To enable detailed logging of individual file operations, use I<-x>.
@@ -421,7 +421,7 @@ Create a snapshot using qemu-img:
qemu-img create -f qcow2 -o backing_file=original snapshot.qcow
-The advantage is that you don't need to copy the original (very fast)
+The advantage is that you don’t need to copy the original (very fast)
and only changes are stored (less storage required).
Note that writing to the backing file once you have created guests on
diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 2ae266d7d..2d63b4f4e 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -166,7 +166,7 @@ main (int argc, char *argv[])
if (guestfs_parse_environment (g) == -1)
error (EXIT_FAILURE, 0,
_("failed parsing environment variables.\n"
- "Check earlier messages, and the output of the 'printenv' command."));
+ "Check earlier messages, and the output of the ‘printenv’ command."));
guestfs_set_verbose (g, 1);
if (qemu)
@@ -313,7 +313,7 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
if (!use_wrapper) {
if (access (path, X_OK) == -1)
error (EXIT_FAILURE, errno,
- _("binary '%s' does not exist or is not executable"), path);
+ _("binary ‘%s’ does not exist or is not executable"), path);
guestfs_set_hv (g, path);
return;
diff --git a/tests/regressions/rhbz1044014.sh b/tests/regressions/rhbz1044014.sh
index c021ce1e0..f010f2ee2 100755
--- a/tests/regressions/rhbz1044014.sh
+++ b/tests/regressions/rhbz1044014.sh
@@ -52,7 +52,7 @@ grep "libvirt needs authentication to connect to libvirt URI" rhbz1044014.out ||
# This is the error we are expecting to see. If we see it then it
# indicates that authentication was successful.
-grep "error: libvirt hypervisor doesn't support qemu or KVM" rhbz1044014.out || {
+grep "error: libvirt hypervisor doesn’t support qemu or KVM" rhbz1044014.out || {
echo "$0: unexpected output:"
echo
cat rhbz1044014.out
diff --git a/tools/virt-win-reg b/tools/virt-win-reg
index e173d7117..1a936c5d0 100755
--- a/tools/virt-win-reg
+++ b/tools/virt-win-reg
@@ -672,7 +672,7 @@ This file would need conversion before you could I<--merge> it.
=head1 CurrentControlSet etc.
-Registry keys like C<CurrentControlSet> don't really exist in the
+Registry keys like C<CurrentControlSet> don’t really exist in the
Windows Registry at the level of the hive file, and therefore you
cannot modify these.
diff --git a/v2v/OVF.ml b/v2v/OVF.ml
index 719158ec7..f29aefcf9 100644
--- a/v2v/OVF.ml
+++ b/v2v/OVF.ml
@@ -245,7 +245,7 @@ let create_meta_files output_alloc sd_uuid image_uuids targets =
| "raw" -> "RAW"
| "qcow2" -> "COW"
| _ ->
- error (f_"RHV does not support the output format '%s', only raw or qcow2") t.target_format in
+ error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") t.target_format in
let buf = Buffer.create 256 in
let bpf fs = bprintf buf fs in
@@ -485,7 +485,7 @@ and add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids ovf =
| "raw" -> "RAW"
| "qcow2" -> "COW"
| _ ->
- error (f_"RHV does not support the output format '%s', only raw or qcow2") t.target_format in
+ error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") t.target_format in
(* Note: Upper case in the .meta, mixed case in the OVF. *)
let output_alloc_for_rhv =
@@ -627,7 +627,7 @@ and add_sound_card sound ovf =
| Some { s_sound_model = AC97 } -> Some "ac97"
| Some { s_sound_model = ICH6 } -> Some "ich6"
| Some { s_sound_model = model } ->
- warning (f_"oVirt cannot emulate '%s' sound cards. This sound card will be dropped from the output.")
+ warning (f_"oVirt cannot emulate ‘%s’ sound cards. This sound card will be dropped from the output.")
(string_of_source_sound_model model);
None in
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index c580d8a6e..1de550100 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -104,7 +104,7 @@ let parse_cmdline () =
| in_, out ->
let key = t, Some in_ in
if NetworkMap.mem key !network_map then
- error (f_"duplicate %s parameter. Duplicate mappings specified for %s '%s'.") flag name in_;
+ error (f_"duplicate %s parameter. Duplicate mappings specified for %s ‘%s’.") flag name in_;
network_map := NetworkMap.add key out !network_map
in
let add_network str = add "-n/--network" (s_"network") Network str
@@ -169,7 +169,7 @@ let parse_cmdline () =
String.concat "|" (Modules_list.output_modules ()) in
let argspec = [
- [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge 'in' to 'out'";
+ [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge ‘in’ to ‘out’";
[ L"compressed" ], Getopt.Set compressed, s_"Compress output file (-of qcow2 only)";
[ L"dcpath"; L"dcPath" ], Getopt.String ("path", set_string_option_once "--dcpath" dcpath),
s_"Override dcPath (for vCenter)";
@@ -181,7 +181,7 @@ let parse_cmdline () =
s_"Input format (for -i disk)";
[ L"in-place" ], Getopt.Set in_place, s_"Only tune the guest in the input VM";
[ L"machine-readable" ], Getopt.Set machine_readable, s_"Make output machine readable";
- [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), s_"Map network 'in' to 'out'";
+ [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), s_"Map network ‘in’ to ‘out’";
[ L"no-copy" ], Getopt.Clear do_copy, s_"Just write the metadata";
[ L"no-trim" ], Getopt.String ("-", no_trim_warning),
s_"Ignored for backwards compatibility";
@@ -410,7 +410,7 @@ read the man page virt-v2v(1).
let os =
match output_storage with
| None ->
- error (f_"-o rhv: output storage was not specified, use '-os'");
+ error (f_"-o rhv: output storage was not specified, use ‘-os’");
| Some d -> d in
if qemu_boot then
error_option_cannot_be_used_in_output_mode "rhv" "--qemu-boot";
@@ -421,7 +421,7 @@ read the man page virt-v2v(1).
let os =
match output_storage with
| None ->
- error (f_"-o vdsm: output storage was not specified, use '-os'");
+ error (f_"-o vdsm: output storage was not specified, use ‘-os’");
| Some d -> d in
if qemu_boot then
error_option_cannot_be_used_in_output_mode "vdsm" "--qemu-boot";
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index 6c4985e84..50e013a3a 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -713,7 +713,7 @@ let rec convert (g : G.guestfs) inspect source output rcaps =
if !updated &&
not (g#is_file ~followsymlinks:true "/usr/bin/X") &&
not (g#is_file ~followsymlinks:true "/usr/bin/X11/X") then
- warning (f_"The display driver was updated to '%s', but X11 does not seem to be installed in the guest. X may not function correctly.")
+ warning (f_"The display driver was updated to ‘%s’, but X11 does not seem to be installed in the guest. X may not function correctly.")
video_driver
and configure_kernel_modules block_type net_type =
@@ -818,7 +818,7 @@ let rec convert (g : G.guestfs) inspect source output rcaps =
fun path ->
let device = g#aug_get path in
let module_ = g#aug_get (path ^ "/modulename") in
- warning (f_"don't know how to update %s which loads the %s module")
+ warning (f_"don’t know how to update %s which loads the %s module")
device module_;
) paths;
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 583dd0cf2..4fe671fab 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -98,7 +98,7 @@ let convert (g : G.guestfs) inspect source output rcaps =
let uninstkey = "UninstallString" in
let valueh = g#hivex_node_get_value node uninstkey in
if valueh = 0L then (
- warning (f_"cannot uninstall Xen PV drivers: registry key 'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s' does not contain an '%s' key")
+ warning (f_"cannot uninstall Xen PV drivers: registry key ‘HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s’ does not contain an ‘%s’ key")
xenpvreg uninstkey;
raise Not_found
);
@@ -153,7 +153,7 @@ let convert (g : G.guestfs) inspect source output rcaps =
let valueh = g#hivex_node_get_value uninstnode uninstval in
if valueh = 0L then (
let name = g#hivex_node_name uninstnode in
- warning (f_"cannot uninstall Parallels Tools: registry key 'HKLM\\SOFTWARE\\%s\\%s' with DisplayName '%s' doesn't contain value '%s'")
+ warning (f_"cannot uninstall Parallels Tools: registry key ‘HKLM\\SOFTWARE\\%s\\%s’ with DisplayName ‘%s’ doesn't contain value ‘%s’")
(String.concat "\\" path) name dispname uninstval;
raise Not_found
);
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index b82862f19..8c88402b2 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -280,7 +280,7 @@ object
try find_file_in_tar ova filename
with
| Not_found ->
- error (f_"file '%s' not found in the ova") filename
+ error (f_"file ‘%s’ not found in the ova") filename
| Failure msg -> error (f_"%s") msg in
(* QEMU requires size aligned to 512 bytes. This is safe because
* tar also works with 512 byte blocks.
diff --git a/v2v/inspect_source.ml b/v2v/inspect_source.ml
index 6f02fb20e..7476c3d85 100644
--- a/v2v/inspect_source.ml
+++ b/v2v/inspect_source.ml
@@ -131,7 +131,7 @@ and choose_root root_choice g = function
let i = ref 0 in
let n = List.length roots in
while !i < 1 || !i > n do
- printf (f_"Enter a number between 1 and %d, or 'exit': ") n;
+ printf (f_"Enter a number between 1 and %d, or ‘exit’: ") n;
let input = read_line () in
if input = "exit" || input = "q" || input = "quit" then
exit 0
@@ -212,5 +212,5 @@ and sanity_check_inspection inspect =
and error_if_unknown fieldname value =
if value = "unknown" then
- error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nInspection field '%s' was 'unknown'.")
+ error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nInspection field ‘%s’ was ‘unknown’.")
fieldname
diff --git a/v2v/libvirt_utils-c.c b/v2v/libvirt_utils-c.c
index 7e505da48..98ed30e06 100644
--- a/v2v/libvirt_utils-c.c
+++ b/v2v/libvirt_utils-c.c
@@ -137,7 +137,7 @@ connect_and_load_pool (value connv, value poolnamev)
if (conn == NULL) {
if (conn_uri)
snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection '%s'"), conn_uri);
+ _("cannot open libvirt connection ‘%s’"), conn_uri);
else
snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
caml_invalid_argument (errmsg);
@@ -160,7 +160,7 @@ connect_and_load_pool (value connv, value poolnamev)
if (!pool) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot find libvirt pool '%s': %s\n\nUse ‘virsh pool-list --all’ to list all available pools, and ‘virsh pool-dumpxml <pool>’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os <pool>’ option."),
+ _("cannot find libvirt pool ‘%s’: %s\n\nUse ‘virsh pool-list --all’ to list all available pools, and ‘virsh pool-dumpxml <pool>’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os <pool>’ option."),
poolname, err->message);
virConnectClose (conn);
caml_invalid_argument (errmsg);
@@ -208,7 +208,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
if (conn == NULL) {
if (conn_uri)
snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection '%s'"), conn_uri);
+ _("cannot open libvirt connection ‘%s’"), conn_uri);
else
snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
caml_invalid_argument (errmsg);
@@ -231,7 +231,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
if (!dom) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot find libvirt domain '%s': %s"), domname, err->message);
+ _("cannot find libvirt domain ‘%s’: %s"), domname, err->message);
virConnectClose (conn);
caml_invalid_argument (errmsg);
}
@@ -246,7 +246,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
state == VIR_DOMAIN_BLOCKED ||
state == VIR_DOMAIN_PAUSED) {
snprintf (errmsg, sizeof errmsg,
- _("libvirt domain '%s' is running or paused. It must be shut down in order to perform virt-v2v conversion"),
+ _("libvirt domain ‘%s’ is running or paused. It must be shut down in order to perform virt-v2v conversion"),
domname);
virDomainFree (dom);
virConnectClose (conn);
@@ -259,7 +259,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
if (xml == NULL) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot fetch XML description of guest '%s': %s"),
+ _("cannot fetch XML description of guest ‘%s’: %s"),
domname, err->message);
virDomainFree (dom);
virConnectClose (conn);
@@ -296,7 +296,7 @@ v2v_pool_dumpxml (value connv, value poolnamev)
if (xml == NULL) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot fetch XML description of pool '%s': %s"),
+ _("cannot fetch XML description of pool ‘%s’: %s"),
String_val (poolnamev), err->message);
virStoragePoolFree (pool);
virConnectClose (conn);
@@ -339,7 +339,7 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
if (!vol) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot find libvirt volume '%s': %s"), volname, err->message);
+ _("cannot find libvirt volume ‘%s’: %s"), volname, err->message);
virStoragePoolFree (pool);
virConnectClose (conn);
caml_invalid_argument (errmsg);
@@ -349,7 +349,7 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
if (xml == NULL) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
- _("cannot fetch XML description of volume '%s': %s"),
+ _("cannot fetch XML description of volume ‘%s’: %s"),
volname, err->message);
virStorageVolFree (vol);
virStoragePoolFree (pool);
@@ -392,7 +392,7 @@ v2v_capabilities (value connv, value unitv)
if (conn == NULL) {
if (conn_uri)
snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection '%s'"), conn_uri);
+ _("cannot open libvirt connection ‘%s’"), conn_uri);
else
snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
caml_invalid_argument (errmsg);
@@ -449,7 +449,7 @@ v2v_domain_exists (value connv, value domnamev)
if (conn == NULL) {
if (conn_uri)
snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection '%s'"), conn_uri);
+ _("cannot open libvirt connection ‘%s’"), conn_uri);
else
snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
caml_invalid_argument (errmsg);
@@ -475,7 +475,7 @@ v2v_domain_exists (value connv, value domnamev)
domain_exists = 0;
else {
snprintf (errmsg, sizeof errmsg,
- _("cannot find libvirt domain '%s': %s"),
+ _("cannot find libvirt domain ‘%s’: %s"),
domname, err->message);
virConnectClose (conn);
caml_invalid_argument (errmsg);
diff --git a/v2v/linux.ml b/v2v/linux.ml
index 8b49fe643..5f40c4196 100644
--- a/v2v/linux.ml
+++ b/v2v/linux.ml
@@ -58,7 +58,7 @@ and do_remove g { i_package_format = package_format } packages =
ignore (g#command cmd)
| format ->
- error (f_"don't know how to remove packages using %s: packages: %s")
+ error (f_"don’t know how to remove packages using %s: packages: %s")
format (String.concat " " packages)
let file_list_of_package (g : Guestfs.guestfs) inspect app =
@@ -102,7 +102,7 @@ let file_list_of_package (g : Guestfs.guestfs) inspect app =
List.sort compare files
| format ->
- error (f_"don't know how to get list of files from package using %s")
+ error (f_"don’t know how to get list of files from package using %s")
format
let rec file_owner (g : G.guestfs) { i_package_format = package_format } path =
@@ -128,7 +128,7 @@ let rec file_owner (g : G.guestfs) { i_package_format = package_format } path =
let line =
try String.sub line 0 (String.rindex line ':')
with Invalid_argument _ ->
- error (f_"internal error: file_owner: invalid dpkg output: '%s'")
+ error (f_"internal error: file_owner: invalid dpkg output: ‘%s’")
line in
fst (String.split "," line)
@@ -151,7 +151,7 @@ let rec file_owner (g : G.guestfs) { i_package_format = package_format } path =
)
| format ->
- error (f_"don't know how to find file owner using %s") format
+ error (f_"don’t know how to find file owner using %s") format
and is_file_owned g inspect path =
try ignore (file_owner g inspect path); true
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index 061d94576..cad72a829 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -126,7 +126,7 @@ object
let path = List.hd paths in
let rex = Str.regexp ".*/title\\[\\([1-9][0-9]*\\)\\]/kernel" in
if not (Str.string_match rex path 0) then
- error (f_"internal error: regular expression did not match '%s'")
+ error (f_"internal error: regular expression did not match ‘%s’")
path;
let index = int_of_string (Str.matched_group 1 path) - 1 in
g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index);
diff --git a/v2v/linux_kernels.ml b/v2v/linux_kernels.ml
index 33062a411..2efd070a6 100644
--- a/v2v/linux_kernels.ml
+++ b/v2v/linux_kernels.ml
@@ -86,7 +86,7 @@ let detect_kernels (g : G.guestfs) inspect family bootloader =
let files = Linux.file_list_of_package g inspect app in
if files = [] then (
- warning (f_"package '%s' contains no files") name;
+ warning (f_"package ‘%s’ contains no files") name;
None
)
else (
diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml
index 33f69dcfa..b3e695387 100644
--- a/v2v/output_libvirt.ml
+++ b/v2v/output_libvirt.ml
@@ -95,10 +95,10 @@ class output_libvirt oc output_pool = object
(* Does the domain already exist on the target? (RHBZ#889082) *)
if Libvirt_utils.domain_exists ?conn:oc source.s_name then (
if source.s_hypervisor = Physical then (* virt-p2v user *)
- error (f_"a libvirt domain called '%s' already exists on the target.\n\nIf using virt-p2v, select a different 'Name' in the 'Target properties'. Or delete the existing domain on the target using the 'virsh undefine' command.")
+ error (f_"a libvirt domain called ‘%s’ already exists on the target.\n\nIf using virt-p2v, select a different ‘Name’ in the ‘Target properties’. Or delete the existing domain on the target using the ‘virsh undefine’ command.")
source.s_name
else (* !virt-p2v *)
- error (f_"a libvirt domain called '%s' already exists on the target.\n\nIf using virt-v2v directly, use the '-on' option to select a different name. Or delete the existing domain on the target using the 'virsh undefine' command.")
+ error (f_"a libvirt domain called ‘%s’ already exists on the target.\n\nIf using virt-v2v directly, use the ‘-on’ option to select a different name. Or delete the existing domain on the target using the ‘virsh undefine’ command.")
source.s_name
);
@@ -112,13 +112,13 @@ class output_libvirt oc output_pool = object
(* We can only output to a pool of type 'dir' (directory). *)
if xpath_string "/pool/@type" <> Some "dir" then
- error (f_"-o libvirt: output pool '%s' is not a directory (type='dir'). See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool;
+ error (f_"-o libvirt: output pool ‘%s’ is not a directory (type='dir'). See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool;
let target_path =
match xpath_string "/pool/target/path/text()" with
| None ->
- error (f_"-o libvirt: output pool '%s' does not have /pool/target/path element. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
+ error (f_"-o libvirt: output pool ‘%s’ does not have /pool/target/path element. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
| Some dir when not (is_directory dir) ->
- error (f_"-o libvirt: output pool '%s' has type='dir' but the /pool/target/path element is not a local directory. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
+ error (f_"-o libvirt: output pool ‘%s’ has type='dir' but the /pool/target/path element is not a local directory. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
| Some dir -> dir in
(* Get the name of the pool, since we have to use that
* (and not the UUID) in the XML of the guest.
@@ -126,7 +126,7 @@ class output_libvirt oc output_pool = object
let name =
match xpath_string "/pool/name/text()" with
| None ->
- error (f_"-o libvirt: output pool '%s' does not have /pool/name element. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
+ error (f_"-o libvirt: output pool ‘%s’ does not have /pool/name element. See virt-v2v(1) section \"OUTPUT TO LIBVIRT\"") output_pool
| Some name -> name in
pool_name <- Some name;
@@ -203,7 +203,7 @@ class output_libvirt oc output_pool = object
if run_command cmd = 0 then (
try Unix.unlink tmpfile with _ -> ()
) else (
- warning (f_"could not define libvirt domain. The libvirt XML is still available in '%s'. Try running 'virsh define %s' yourself instead.")
+ warning (f_"could not define libvirt domain. The libvirt XML is still available in ‘%s’. Try running ‘virsh define %s’ yourself instead.")
tmpfile tmpfile
);
end
diff --git a/v2v/output_rhv.ml b/v2v/output_rhv.ml
index f407b4eda..c7b96ab86 100644
--- a/v2v/output_rhv.ml
+++ b/v2v/output_rhv.ml
@@ -89,7 +89,7 @@ and check_storage_domain domain_class os mp =
let () =
let master_vms_dir = mp // uuid // "master" // "vms" in
if not (is_directory master_vms_dir) then
- error (f_"%s does not exist or is not a directory.\n\nMost likely cause: Either the %s (%s) has not been attached to any Data Center, or the path %s is not an %s at all.\n\nYou have to attach the %s to a Data Center using the RHV-M / OVirt user interface first.\n\nIf you don't know what the %s mount point should be then you can also find this out through the RHV-M user interface.")
+ error (f_"%s does not exist or is not a directory.\n\nMost likely cause: Either the %s (%s) has not been attached to any Data Center, or the path %s is not an %s at all.\n\nYou have to attach the %s to a Data Center using the RHV-M / OVirt user interface first.\n\nIf you don’t know what the %s mount point should be then you can also find this out through the RHV-M user interface.")
master_vms_dir domain_class os os
domain_class domain_class domain_class in
diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml
index bbebff746..e8342f6d3 100644
--- a/v2v/output_vdsm.ml
+++ b/v2v/output_vdsm.ml
@@ -78,7 +78,7 @@ object
method prepare_targets _ targets =
if List.length vdsm_params.image_uuids <> List.length targets ||
List.length vdsm_params.vol_uuids <> List.length targets then
- error (f_"the number of '--vdsm-image-uuid' and '--vdsm-vol-uuid' parameters passed on the command line has to match the number of guest disk images (for this guest: %d)")
+ error (f_"the number of ‘--vdsm-image-uuid’ and ‘--vdsm-vol-uuid’ parameters passed on the command line has to match the number of guest disk images (for this guest: %d)")
(List.length targets);
let mp, uuid =
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index 2dee274bf..4ac9b51a5 100644
--- a/v2v/parse_libvirt_xml.ml
+++ b/v2v/parse_libvirt_xml.ml
@@ -40,7 +40,7 @@ let get_drive_slot str offset =
let name = String.sub str offset (String.length str - offset) in
try Some (Utils.drive_index name)
with Invalid_argument _ ->
- warning (f_"could not parse device name '%s' from the source libvirt XML") str;
+ warning (f_"could not parse device name ‘%s’ from the source libvirt XML") str;
None
let parse_libvirt_xml ?conn xml =
diff --git a/v2v/utils.ml b/v2v/utils.ml
index 5ecf26880..e0275db53 100644
--- a/v2v/utils.ml
+++ b/v2v/utils.ml
@@ -57,7 +57,7 @@ let find_uefi_firmware guest_arch =
| "x86_64" -> Uefi.uefi_x86_64_firmware
| "aarch64" -> Uefi.uefi_aarch64_firmware
| arch ->
- error (f_"don't know how to convert UEFI guests for architecture %s")
+ error (f_"don’t know how to convert UEFI guests for architecture %s")
guest_arch in
let rec loop = function
| [] ->
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 0f14c2189..8cf1fad8e 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -175,7 +175,7 @@ and open_source cmdline input =
(match source.s_hypervisor with
| OtherHV hv ->
- warning (f_"unknown source hypervisor ('%s') in metadata") hv
+ warning (f_"unknown source hypervisor (‘%s’) in metadata") hv
| _ -> ()
);
@@ -323,7 +323,7 @@ and init_targets cmdline output source overlays =
| Some format, _ -> format (* -of overrides everything *)
| None, Some format -> format (* same as backing format *)
| None, None ->
- error (f_"disk %s (%s) has no defined format.\n\nThe input metadata did not define the disk format (eg. raw/qcow2/etc) of this disk, and so virt-v2v will try to autodetect the format when reading it.\n\nHowever because the input format was not defined, we do not know what output format you want to use. You have two choices: either define the original format in the source metadata, or use the '-of' option to force the output format.") ov.ov_sd ov.ov_source.s_qemu_uri in
+ error (f_"disk %s (%s) has no defined format.\n\nThe input metadata did not define the disk format (eg. raw/qcow2/etc) of this disk, and so virt-v2v will try to autodetect the format when reading it.\n\nHowever because the input format was not defined, we do not know what output format you want to use. You have two choices: either define the original format in the source metadata, or use the ‘-of’ option to force the output format.") ov.ov_sd ov.ov_source.s_qemu_uri in
(* What really happens here is that the call to #disk_create
* below fails if the format is not raw or qcow2. We would
@@ -333,7 +333,7 @@ and init_targets cmdline output source overlays =
* early, not below, later.
*)
if format <> "raw" && format <> "qcow2" then
- error (f_"output format should be 'raw' or 'qcow2'.\n\nUse the '-of <format>' option to select a different output format for the converted guest.\n\nOther output formats are not supported at the moment, although might be considered in future.");
+ error (f_"output format should be ‘raw’ or ‘qcow2’.\n\nUse the ‘-of <format>’ option to select a different output format for the converted guest.\n\nOther output formats are not supported at the moment, although might be considered in future.");
(* Only allow compressed with qcow2. *)
if cmdline.compressed && format <> "qcow2" then
@@ -416,7 +416,7 @@ and check_guest_free_space mpstats =
10_000_000L in
if free_bytes < needed_bytes then
- error (f_"not enough free space for conversion on filesystem '%s'. %Ld bytes free < %Ld bytes needed")
+ error (f_"not enough free space for conversion on filesystem ‘%s’. %Ld bytes free < %Ld bytes needed")
mp free_bytes needed_bytes
)
) mpstats
@@ -776,7 +776,7 @@ and rcaps_from_source source =
| Some Source_virtio_blk -> Some Virtio_blk
| Some Source_virtio_SCSI -> Some Virtio_SCSI
| Some Source_IDE -> Some IDE
- | Some t -> error (f_"source has unsupported hard disk type '%s'")
+ | Some t -> error (f_"source has unsupported hard disk type ‘%s’")
(string_of_controller t)
| None -> error (f_"source has unrecognized hard disk type") in
@@ -792,7 +792,7 @@ and rcaps_from_source source =
| Some Source_virtio_net -> Some Virtio_net
| Some Source_e1000 -> Some E1000
| Some Source_rtl8139 -> Some RTL8139
- | Some t -> error (f_"source has unsupported network adapter model '%s'")
+ | Some t -> error (f_"source has unsupported network adapter model ‘%s’")
(string_of_nic_model t)
| None -> None in
@@ -800,7 +800,7 @@ and rcaps_from_source source =
match source.s_video with
| Some Source_QXL -> Some QXL
| Some Source_Cirrus -> Some Cirrus
- | Some t -> error (f_"source has unsupported video adapter model '%s'")
+ | Some t -> error (f_"source has unsupported video adapter model ‘%s’")
(string_of_source_video t)
| None -> None in
diff --git a/v2v/vCenter.ml b/v2v/vCenter.ml
index f6e4288f2..468261d3d 100644
--- a/v2v/vCenter.ml
+++ b/v2v/vCenter.ml
@@ -85,7 +85,7 @@ let get_session_cookie password scheme uri sslverify url =
let status = !status in
if status = "" then (
dump_response stderr;
- error (f_"vcenter: no status code in output of 'curl' command. Is 'curl' installed?")
+ error (f_"vcenter: no status code in output of ‘curl’ command. Is ‘curl’ installed?")
);
if status = "401" then (
@@ -99,7 +99,7 @@ let get_session_cookie password scheme uri sslverify url =
if status = "404" then (
dump_response stderr;
- error (f_"vcenter: URL not found: %s\n\nThe '--dcpath' parameter may be useful. See the explanation in the virt-v2v(1) man page OPTIONS section.") url
+ error (f_"vcenter: URL not found: %s\n\nThe ‘--dcpath’ parameter may be useful. See the explanation in the virt-v2v(1) man page OPTIONS section.") url
);
if status <> "200" then (
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index 6d8a2017c..5d6628d65 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -278,7 +278,7 @@ option of L<qemu-img(1)>.
=item B<--dcpath> Folder/Datacenter
-B<NB:> You don't need to use this parameter if you have
+B<NB:> You don’t need to use this parameter if you have
S<libvirt E<ge> 1.2.20>.
For VMware vCenter, override the C<dcPath=...> parameter used to
@@ -397,7 +397,7 @@ See L</NETWORKS AND BRIDGES> below.
=item B<--no-copy>
-Don't copy the disks. Instead, conversion is performed (and thrown
+Don’t copy the disks. Instead, conversion is performed (and thrown
away), and metadata is written, but no disks are created. See
also discussion of S<I<-o null>> below.
@@ -985,7 +985,7 @@ I<--bridge> option instead. For example:
Virt-v2v is able to import guests from VMware vCenter Server.
-vCenter E<ge> 5.0 is required. If you don't have vCenter, using OVA
+vCenter E<ge> 5.0 is required. If you don’t have vCenter, using OVA
is recommended instead (see L</INPUT FROM VMWARE OVA> below), or if
that is not possible then see L</INPUT FROM VMWARE ESXi HYPERVISOR>.
@@ -1796,7 +1796,7 @@ instance.
=item Writing to Glance
-This does I<not> need root (in fact it probably won't work), but may
+This does I<not> need root (in fact it probably won’t work), but may
require either a special user and/or for you to source a script that
sets authentication environment variables. Consult the Glance
documentation.
--
2.12.0
7 years, 7 months
IRC question: squashfs
by Richard W.M. Jones
>From josv on IRC:
> Hi! I am on Fedora 25 and installed libguestfs (1.36.2) from the
> fedora repo. It seems that the squashfs feature is missing in this
> installation (guestfish add-drive /dev/null : run : available squashfs
> returns "error: squashfs: group not available"). What would be the
> recommended way to have the squashfs feature available?
$ guestfish -a /dev/null run : supported
...
squashfs no
...
$ rpm -q squashfs-tools
squashfs-tools-4.3-12.fc24.x86_64
I think actually this is a bug. I'll take a look into it tomorrow.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
7 years, 7 months
[PATCH v2] builder: Don't hard-code /etc for configuration files.
by Richard W.M. Jones
Use ./configure --sysconfdir setting.
---
builder/paths.ml | 2 +-
mllib/guestfs_config.ml.in | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/builder/paths.ml b/builder/paths.ml
index cbd9d4bd0..d7c4820bf 100644
--- a/builder/paths.ml
+++ b/builder/paths.ml
@@ -35,7 +35,7 @@ let xdg_config_home () =
let xdg_config_dirs () =
let dirs =
try Sys.getenv "XDG_CONFIG_DIRS"
- with Not_found -> "/etc/xdg" in
+ with Not_found -> Guestfs_config.sysconfdir // "xdg" in
let dirs = String.nsplit ":" dirs in
let dirs = List.filter (fun x -> x <> "") dirs in
List.map (fun x -> x // prog) dirs
diff --git a/mllib/guestfs_config.ml.in b/mllib/guestfs_config.ml.in
index 68dbcbc20..15bebd582 100644
--- a/mllib/guestfs_config.ml.in
+++ b/mllib/guestfs_config.ml.in
@@ -22,5 +22,6 @@ let package_version = "@PACKAGE_VERSION@"
let package_version_full = "@PACKAGE_VERSION_FULL@"
let prefix = "@prefix@"
let datadir = prefix ^ "/share"
+let sysconfdir = "@sysconfdir@"
let host_cpu = "@host_cpu@"
let gnupg = "@GNUPG@"
--
2.12.0
7 years, 7 months