From 2e4089f30007e79bc157c775cfd3b326d22f2992 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 19 Jul 2012 15:45:27 +0100 Subject: build: Rename most C files that contain underscore with dash. This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks. --- .gitignore | 14 +- daemon/Makefile.am | 12 +- daemon/echo-daemon.c | 73 ++ daemon/echo_daemon.c | 73 -- fish/Makefile.am | 24 +- fish/cmds-gperf.h | 44 + fish/cmds_gperf.h | 44 - fish/prep-boot.c | 158 ++++ fish/prep-disk.c | 42 + fish/prep-fs.c | 56 ++ fish/prep-lv.c | 160 ++++ fish/prep-part.c | 44 + fish/prep_boot.c | 158 ---- fish/prep_disk.c | 42 - fish/prep_fs.c | 56 -- fish/prep_lv.c | 160 ---- fish/prep_part.c | 44 - fish/test-read-file.sh | 34 + fish/test-read_file.sh | 34 - generator/generator_fish.ml | 4 +- generator/generator_main.ml | 6 +- generator/generator_ocaml.ml | 2 +- ocaml/Makefile.am | 6 +- ocaml/guestfs-c.c | 423 ++++++++++ ocaml/guestfs-c.h | 40 + ocaml/guestfs_c.c | 423 ---------- ocaml/guestfs_c.h | 40 - po-docs/ja.po | 1889 +++++++++++++++++++++--------------------- po-docs/libguestfs-docs.pot | 1657 ++++++++++++++++++------------------ po-docs/uk.po | 1889 +++++++++++++++++++++--------------------- po/POTFILES | 38 +- resize/Makefile.am | 4 +- resize/progress-c.c | 105 +++ resize/progress_c.c | 105 --- sparsify/Makefile.am | 4 +- sparsify/progress-c.c | 105 +++ sparsify/progress_c.c | 105 --- src/Makefile.am | 20 +- src/inspect-apps.c | 621 ++++++++++++++ src/inspect-fs-cd.c | 485 +++++++++++ src/inspect-fs-unix.c | 1537 ++++++++++++++++++++++++++++++++++ src/inspect-fs-windows.c | 586 +++++++++++++ src/inspect-fs.c | 597 +++++++++++++ src/inspect-icon.c | 599 ++++++++++++++ src/inspect_apps.c | 621 -------------- src/inspect_fs.c | 597 ------------- src/inspect_fs_cd.c | 485 ----------- src/inspect_fs_unix.c | 1537 ---------------------------------- src/inspect_fs_windows.c | 586 ------------- src/inspect_icon.c | 599 -------------- tests/xml/Makefile.am | 2 +- tests/xml/fake-libvirt-xml.c | 98 +++ tests/xml/fake_libvirt_xml.c | 98 --- 53 files changed, 8620 insertions(+), 8565 deletions(-) create mode 100644 daemon/echo-daemon.c delete mode 100644 daemon/echo_daemon.c create mode 100644 fish/cmds-gperf.h delete mode 100644 fish/cmds_gperf.h create mode 100644 fish/prep-boot.c create mode 100644 fish/prep-disk.c create mode 100644 fish/prep-fs.c create mode 100644 fish/prep-lv.c create mode 100644 fish/prep-part.c delete mode 100644 fish/prep_boot.c delete mode 100644 fish/prep_disk.c delete mode 100644 fish/prep_fs.c delete mode 100644 fish/prep_lv.c delete mode 100644 fish/prep_part.c create mode 100755 fish/test-read-file.sh delete mode 100755 fish/test-read_file.sh create mode 100644 ocaml/guestfs-c.c create mode 100644 ocaml/guestfs-c.h delete mode 100644 ocaml/guestfs_c.c delete mode 100644 ocaml/guestfs_c.h create mode 100644 resize/progress-c.c delete mode 100644 resize/progress_c.c create mode 100644 sparsify/progress-c.c delete mode 100644 sparsify/progress_c.c create mode 100644 src/inspect-apps.c create mode 100644 src/inspect-fs-cd.c create mode 100644 src/inspect-fs-unix.c create mode 100644 src/inspect-fs-windows.c create mode 100644 src/inspect-fs.c create mode 100644 src/inspect-icon.c delete mode 100644 src/inspect_apps.c delete mode 100644 src/inspect_fs.c delete mode 100644 src/inspect_fs_cd.c delete mode 100644 src/inspect_fs_unix.c delete mode 100644 src/inspect_fs_windows.c delete mode 100644 src/inspect_icon.c create mode 100644 tests/xml/fake-libvirt-xml.c delete mode 100644 tests/xml/fake_libvirt_xml.c diff --git a/.gitignore b/.gitignore index e223d3b0..de5a688d 100644 --- a/.gitignore +++ b/.gitignore @@ -61,8 +61,8 @@ Makefile.in /csharp/Libguestfs.cs /daemon/actions.h /daemon/errnostring.c -/daemon/errnostring_gperf.c -/daemon/errnostring_gperf.gperf +/daemon/errnostring-gperf.c +/daemon/errnostring-gperf.gperf /daemon/errnostring.h /daemon/guestfsd /daemon/guestfsd.exe @@ -104,8 +104,8 @@ Makefile.in /examples/stamp-guestfs-testing.pod /examples/virt-dhcp-address /fish/cmds.c -/fish/cmds_gperf.c -/fish/cmds_gperf.gperf +/fish/cmds-gperf.c +/fish/cmds-gperf.gperf /fish/completion.c /fish/event-names.c /fish/fish-cmds.h @@ -227,7 +227,7 @@ Makefile.in /ocaml/examples/guestfs-ocaml.3 /ocaml/examples/inspect_vm /ocaml/examples/stamp-guestfs-ocaml.pod -/ocaml/guestfs_c_actions.c +/ocaml/guestfs-c-actions.c /ocaml/guestfs.ml /ocaml/guestfs.mli /ocamlinit-stamp @@ -336,8 +336,8 @@ Makefile.in /src/actions.c /src/bindtests.c /src/errnostring.c -/src/errnostring_gperf.c -/src/errnostring_gperf.gperf +/src/errnostring-gperf.c +/src/errnostring-gperf.gperf /src/errnostring.h /src/guestfs.3 /src/guestfs-actions.pod diff --git a/daemon/Makefile.am b/daemon/Makefile.am index afe88741..c43807e5 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -28,8 +28,8 @@ BUILT_SOURCES = \ $(generator_built) \ guestfs_protocol.c \ guestfs_protocol.h \ - errnostring_gperf.c \ - errnostring_gperf.gperf \ + errnostring-gperf.c \ + errnostring-gperf.gperf \ errnostring.c \ errnostring.h @@ -57,16 +57,16 @@ $(libsrcdir)/guestfs_protocol.h: force # of warnings so we must compile it in a separate mini-library. noinst_LIBRARIES += liberrnostring.a liberrnostring_a_SOURCES = \ - errnostring_gperf.c \ + errnostring-gperf.c \ errnostring.h \ errnostring.c liberrnostring_a_CFLAGS = -errnostring_gperf.c: errnostring_gperf.gperf +errnostring-gperf.c: errnostring-gperf.gperf rm -f $@ $(GPERF) -t $< > $@-t mv $@-t $@ -errnostring_gperf.gperf: $(libsrcdir)/errnostring_gperf.gperf +errnostring-gperf.gperf: $(libsrcdir)/errnostring-gperf.gperf rm -f $@ ln $< $@ errnostring.c: $(libsrcdir)/errnostring.c @@ -106,7 +106,7 @@ guestfsd_SOURCES = \ dmesg.c \ dropcaches.c \ du.c \ - echo_daemon.c \ + echo-daemon.c \ ext2.c \ fallocate.c \ file.c \ diff --git a/daemon/echo-daemon.c b/daemon/echo-daemon.c new file mode 100644 index 00000000..18e2cf8e --- /dev/null +++ b/daemon/echo-daemon.c @@ -0,0 +1,73 @@ +/* libguestfs - the guestfsd daemon + * Copyright (C) 2009 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include + +#include "actions.h" +#include "daemon.h" + +char * +do_echo_daemon (char *const *argv) +{ + char *out = NULL; + size_t out_len = 0; + + /* Iterate over argv entries until reaching the NULL terminator */ + while (*argv) { + char add_space = 0; + + /* Store the end of current output */ + size_t out_end = out_len; + + /* Calculate the new output size */ + size_t arg_len = strlen(*argv); + out_len += arg_len; + + /* We will prepend a space if this isn't the first argument added */ + if (NULL != out) { + out_len++; + add_space = 1; + } + + /* Make the output buffer big enough for the string and its terminator */ + char *out_new = realloc (out, out_len + 1); + if (NULL == out_new) { + reply_with_perror ("realloc"); + free(out); + return 0; + } + out = out_new; + + /* Prepend a space if required */ + if (add_space) { + out[out_end++] = ' '; + } + + /* Copy the argument to the output */ + memcpy(&out[out_end], *argv, arg_len); + + argv++; + } + + /* NULL terminate the output */ + out[out_len] = '\0'; + + return out; +} diff --git a/daemon/echo_daemon.c b/daemon/echo_daemon.c deleted file mode 100644 index 18e2cf8e..00000000 --- a/daemon/echo_daemon.c +++ /dev/null @@ -1,73 +0,0 @@ -/* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include - -#include "actions.h" -#include "daemon.h" - -char * -do_echo_daemon (char *const *argv) -{ - char *out = NULL; - size_t out_len = 0; - - /* Iterate over argv entries until reaching the NULL terminator */ - while (*argv) { - char add_space = 0; - - /* Store the end of current output */ - size_t out_end = out_len; - - /* Calculate the new output size */ - size_t arg_len = strlen(*argv); - out_len += arg_len; - - /* We will prepend a space if this isn't the first argument added */ - if (NULL != out) { - out_len++; - add_space = 1; - } - - /* Make the output buffer big enough for the string and its terminator */ - char *out_new = realloc (out, out_len + 1); - if (NULL == out_new) { - reply_with_perror ("realloc"); - free(out); - return 0; - } - out = out_new; - - /* Prepend a space if required */ - if (add_space) { - out[out_end++] = ' '; - } - - /* Copy the argument to the output */ - memcpy(&out[out_end], *argv, arg_len); - - argv++; - } - - /* NULL terminate the output */ - out[out_len] = '\0'; - - return out; -} diff --git a/fish/Makefile.am b/fish/Makefile.am index 8e45294a..c7c1867d 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -28,7 +28,7 @@ bin_PROGRAMS = guestfish generator_built = \ cmds.c \ - cmds_gperf.gperf \ + cmds-gperf.gperf \ completion.c \ event-names.c \ fish-cmds.h \ @@ -39,7 +39,7 @@ generator_built = \ BUILT_SOURCES = \ $(generator_built) \ - cmds_gperf.c \ + cmds-gperf.c \ rc_protocol.h \ rc_protocol.c @@ -76,7 +76,7 @@ guestfish_SOURCES = \ $(generator_built) \ $(SHARED_SOURCE_FILES) \ alloc.c \ - cmds_gperf.h \ + cmds-gperf.h \ copy.c \ destpaths.c \ display.c \ @@ -92,11 +92,11 @@ guestfish_SOURCES = \ man.c \ more.c \ prep.c \ - prep_disk.c \ - prep_part.c \ - prep_fs.c \ - prep_lv.c \ - prep_boot.c \ + prep-disk.c \ + prep-part.c \ + prep-fs.c \ + prep-lv.c \ + prep-boot.c \ rc.c \ reopen.c \ setenv.c \ @@ -111,10 +111,10 @@ librc_protocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing # Build the command lookup perfect hash code. The generated code has # lots of warnings so we must compile it in a separate mini-library. -libcmds_la_SOURCES = cmds_gperf.c +libcmds_la_SOURCES = cmds-gperf.c libcmds_la_CFLAGS = -cmds_gperf.c: cmds_gperf.gperf +cmds-gperf.c: cmds-gperf.gperf rm -f $@ $(GPERF) -t $< > $@-t mv $@-t $@ @@ -246,7 +246,7 @@ TESTS += \ test-find0.sh \ test-glob.sh \ test-mount-local.sh \ - test-read_file.sh \ + test-read-file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ @@ -264,7 +264,7 @@ EXTRA_DIST += \ test-find0.sh \ test-glob.sh \ test-mount-local.sh \ - test-read_file.sh \ + test-read-file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ diff --git a/fish/cmds-gperf.h b/fish/cmds-gperf.h new file mode 100644 index 00000000..74db69d2 --- /dev/null +++ b/fish/cmds-gperf.h @@ -0,0 +1,44 @@ +/* libguestfs - guestfish shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef FISH_CMDS_GPERF_H +#define FISH_CMDS_GPERF_H + +/* There is one of these structures for each individual command that + * guestfish can execute. + */ +struct command_entry { + const char *name; /* Short name. */ + const char *help; /* Online help. */ + + /* The run_* function. */ + int (*run) (const char *cmd, size_t argc, char *argv[]); +}; + +/* Command table used by the gperf-generated lookup function. + * Multiple rows in this table can and do point to a single command + * entry. This is used to implement aliases. + */ +struct command_table { + char *name; + struct command_entry *entry; +}; + +const struct command_table *lookup_fish_command (register const char *str, register unsigned int len); + +#endif /* FISH_CMDS_GPERF_H */ diff --git a/fish/cmds_gperf.h b/fish/cmds_gperf.h deleted file mode 100644 index 74db69d2..00000000 --- a/fish/cmds_gperf.h +++ /dev/null @@ -1,44 +0,0 @@ -/* libguestfs - guestfish shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef FISH_CMDS_GPERF_H -#define FISH_CMDS_GPERF_H - -/* There is one of these structures for each individual command that - * guestfish can execute. - */ -struct command_entry { - const char *name; /* Short name. */ - const char *help; /* Online help. */ - - /* The run_* function. */ - int (*run) (const char *cmd, size_t argc, char *argv[]); -}; - -/* Command table used by the gperf-generated lookup function. - * Multiple rows in this table can and do point to a single command - * entry. This is used to implement aliases. - */ -struct command_table { - char *name; - struct command_entry *entry; -}; - -const struct command_table *lookup_fish_command (register const char *str, register unsigned int len); - -#endif /* FISH_CMDS_GPERF_H */ diff --git a/fish/prep-boot.c b/fish/prep-boot.c new file mode 100644 index 00000000..75ddcca4 --- /dev/null +++ b/fish/prep-boot.c @@ -0,0 +1,158 @@ +/* guestfish - the filesystem interactive shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "fish.h" +#include "prepopts.h" + +void +prep_prelaunch_bootroot (const char *filename, prep_data *data) +{ + if (alloc_disk (filename, data->params[2], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_bootroot (const char *filename, prep_data *data, const char *device) +{ + off_t bootsize; + if (parse_size (data->params[3], &bootsize) == -1) + prep_error (data, filename, _("could not parse boot size")); + + int sector = guestfs_blockdev_getss (g, device); + if (sector == -1) + prep_error (data, filename, _("failed to get sector size of disk: %s"), + guestfs_last_error (g)); + + if (guestfs_part_init (g, device, data->params[4]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); + + off_t lastbootsect = 64 + bootsize/sector - 1; + if (guestfs_part_add (g, device, "primary", 64, lastbootsect) == -1) + prep_error (data, filename, _("failed to add boot partition: %s"), + guestfs_last_error (g)); + + if (guestfs_part_add (g, device, "primary", lastbootsect+1, -64) == -1) + prep_error (data, filename, _("failed to add root partition: %s"), + guestfs_last_error (g)); + + char *part; + if (asprintf (&part, "%s1", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + if (guestfs_mkfs (g, data->params[0], part) == -1) + prep_error (data, filename, _("failed to create boot filesystem: %s"), + guestfs_last_error (g)); + free (part); + + if (asprintf (&part, "%s2", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + if (guestfs_mkfs (g, data->params[1], part) == -1) + prep_error (data, filename, _("failed to create root filesystem: %s"), + guestfs_last_error (g)); + free (part); +} + +void +prep_prelaunch_bootrootlv (const char *filename, prep_data *data) +{ + if (vg_lv_parse (data->params[0], NULL, NULL) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + if (alloc_disk (filename, data->params[3], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_bootrootlv (const char *filename, prep_data *data, const char *device) +{ + off_t bootsize; + if (parse_size (data->params[4], &bootsize) == -1) + prep_error (data, filename, _("could not parse boot size")); + + int sector = guestfs_blockdev_getss (g, device); + if (sector == -1) + prep_error (data, filename, _("failed to get sector size of disk: %s"), + guestfs_last_error (g)); + + if (guestfs_part_init (g, device, data->params[5]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); + + off_t lastbootsect = 64 + bootsize/sector - 1; + if (guestfs_part_add (g, device, "primary", 64, lastbootsect) == -1) + prep_error (data, filename, _("failed to add boot partition: %s"), + guestfs_last_error (g)); + + if (guestfs_part_add (g, device, "primary", lastbootsect+1, -64) == -1) + prep_error (data, filename, _("failed to add root partition: %s"), + guestfs_last_error (g)); + + char *vg; + char *lv; + if (vg_lv_parse (data->params[0], &vg, &lv) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + char *part; + if (asprintf (&part, "%s1", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + if (guestfs_mkfs (g, data->params[1], part) == -1) + prep_error (data, filename, _("failed to create boot filesystem: %s"), + guestfs_last_error (g)); + free (part); + + if (asprintf (&part, "%s2", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + if (guestfs_pvcreate (g, part) == -1) + prep_error (data, filename, _("failed to create PV: %s: %s"), + part, guestfs_last_error (g)); + + char *parts[] = { part, NULL }; + if (guestfs_vgcreate (g, vg, parts) == -1) + prep_error (data, filename, _("failed to create VG: %s: %s"), + vg, guestfs_last_error (g)); + + /* Create the largest possible LV. */ + if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) + prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), + vg, lv, guestfs_last_error (g)); + + if (guestfs_mkfs (g, data->params[2], data->params[0]) == -1) + prep_error (data, filename, _("failed to create root filesystem: %s"), + guestfs_last_error (g)); + + free (part); + free (vg); + free (lv); +} diff --git a/fish/prep-disk.c b/fish/prep-disk.c new file mode 100644 index 00000000..1caee5f0 --- /dev/null +++ b/fish/prep-disk.c @@ -0,0 +1,42 @@ +/* guestfish - the filesystem interactive shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "fish.h" +#include "prepopts.h" + +void +prep_prelaunch_disk (const char *filename, prep_data *data) +{ + if (alloc_disk (filename, data->params[0], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_disk (const char *filename, prep_data *data, const char *device) +{ + /* nothing */ +} diff --git a/fish/prep-fs.c b/fish/prep-fs.c new file mode 100644 index 00000000..a0373d9c --- /dev/null +++ b/fish/prep-fs.c @@ -0,0 +1,56 @@ +/* guestfish - the filesystem interactive shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "fish.h" +#include "prepopts.h" + +void +prep_prelaunch_fs (const char *filename, prep_data *data) +{ + if (alloc_disk (filename, data->params[1], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_fs (const char *filename, prep_data *data, const char *device) +{ + if (guestfs_part_disk (g, device, data->params[2]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); + + char *part; + if (asprintf (&part, "%s1", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + + if (guestfs_mkfs (g, data->params[0], part) == -1) + prep_error (data, filename, _("failed to create filesystem (%s): %s"), + data->params[0], guestfs_last_error (g)); + + free (part); +} diff --git a/fish/prep-lv.c b/fish/prep-lv.c new file mode 100644 index 00000000..f635ff9f --- /dev/null +++ b/fish/prep-lv.c @@ -0,0 +1,160 @@ +/* guestfish - the filesystem interactive shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "fish.h" +#include "prepopts.h" + +/* Split "/dev/VG/LV" into "VG" and "LV". This function should + * probably do more checks. + */ +int +vg_lv_parse (const char *device, char **vg, char **lv) +{ + if (STRPREFIX (device, "/dev/")) + device += 5; + + const char *p = strchr (device, '/'); + if (p == NULL) + return -1; + + if (vg) { + *vg = strndup (device, p - device); + if (*vg == NULL) { + perror ("strndup"); + exit (EXIT_FAILURE); + } + } + + if (lv) { + *lv = strdup (p+1); + if (*lv == NULL) { + perror ("strndup"); + exit (EXIT_FAILURE); + } + } + + return 0; +} + +void +prep_prelaunch_lv (const char *filename, prep_data *data) +{ + if (vg_lv_parse (data->params[0], NULL, NULL) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + if (alloc_disk (filename, data->params[1], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_lv (const char *filename, prep_data *data, const char *device) +{ + if (guestfs_part_disk (g, device, data->params[2]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); + + char *vg; + char *lv; + if (vg_lv_parse (data->params[0], &vg, &lv) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + char *part; + if (asprintf (&part, "%s1", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + + if (guestfs_pvcreate (g, part) == -1) + prep_error (data, filename, _("failed to create PV: %s: %s"), + part, guestfs_last_error (g)); + + char *parts[] = { part, NULL }; + if (guestfs_vgcreate (g, vg, parts) == -1) + prep_error (data, filename, _("failed to create VG: %s: %s"), + vg, guestfs_last_error (g)); + + /* Create the largest possible LV. */ + if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) + prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), + vg, lv, guestfs_last_error (g)); + + free (part); + free (vg); + free (lv); +} + +void +prep_prelaunch_lvfs (const char *filename, prep_data *data) +{ + if (vg_lv_parse (data->params[0], NULL, NULL) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + if (alloc_disk (filename, data->params[2], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_lvfs (const char *filename, prep_data *data, const char *device) +{ + if (guestfs_part_disk (g, device, data->params[3]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); + + char *vg; + char *lv; + if (vg_lv_parse (data->params[0], &vg, &lv) == -1) + prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); + + char *part; + if (asprintf (&part, "%s1", device) == -1) { + perror ("asprintf"); + exit (EXIT_FAILURE); + } + + if (guestfs_pvcreate (g, part) == -1) + prep_error (data, filename, _("failed to create PV: %s: %s"), + part, guestfs_last_error (g)); + + char *parts[] = { part, NULL }; + if (guestfs_vgcreate (g, vg, parts) == -1) + prep_error (data, filename, _("failed to create VG: %s: %s"), + vg, guestfs_last_error (g)); + + /* Create the largest possible LV. */ + if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) + prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), + vg, lv, guestfs_last_error (g)); + + /* Create the filesystem. */ + if (guestfs_mkfs (g, data->params[1], data->params[0]) == -1) + prep_error (data, filename, _("failed to create filesystem (%s): %s"), + data->params[1], guestfs_last_error (g)); + + free (part); + free (vg); + free (lv); +} diff --git a/fish/prep-part.c b/fish/prep-part.c new file mode 100644 index 00000000..fc390143 --- /dev/null +++ b/fish/prep-part.c @@ -0,0 +1,44 @@ +/* guestfish - the filesystem interactive shell + * Copyright (C) 2010 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "fish.h" +#include "prepopts.h" + +void +prep_prelaunch_part (const char *filename, prep_data *data) +{ + if (alloc_disk (filename, data->params[0], 0, 1) == -1) + prep_error (data, filename, _("failed to allocate disk")); +} + +void +prep_postlaunch_part (const char *filename, prep_data *data, const char *device) +{ + if (guestfs_part_disk (g, device, data->params[1]) == -1) + prep_error (data, filename, _("failed to partition disk: %s"), + guestfs_last_error (g)); +} diff --git a/fish/prep_boot.c b/fish/prep_boot.c deleted file mode 100644 index 75ddcca4..00000000 --- a/fish/prep_boot.c +++ /dev/null @@ -1,158 +0,0 @@ -/* guestfish - the filesystem interactive shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "fish.h" -#include "prepopts.h" - -void -prep_prelaunch_bootroot (const char *filename, prep_data *data) -{ - if (alloc_disk (filename, data->params[2], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_bootroot (const char *filename, prep_data *data, const char *device) -{ - off_t bootsize; - if (parse_size (data->params[3], &bootsize) == -1) - prep_error (data, filename, _("could not parse boot size")); - - int sector = guestfs_blockdev_getss (g, device); - if (sector == -1) - prep_error (data, filename, _("failed to get sector size of disk: %s"), - guestfs_last_error (g)); - - if (guestfs_part_init (g, device, data->params[4]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); - - off_t lastbootsect = 64 + bootsize/sector - 1; - if (guestfs_part_add (g, device, "primary", 64, lastbootsect) == -1) - prep_error (data, filename, _("failed to add boot partition: %s"), - guestfs_last_error (g)); - - if (guestfs_part_add (g, device, "primary", lastbootsect+1, -64) == -1) - prep_error (data, filename, _("failed to add root partition: %s"), - guestfs_last_error (g)); - - char *part; - if (asprintf (&part, "%s1", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - if (guestfs_mkfs (g, data->params[0], part) == -1) - prep_error (data, filename, _("failed to create boot filesystem: %s"), - guestfs_last_error (g)); - free (part); - - if (asprintf (&part, "%s2", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - if (guestfs_mkfs (g, data->params[1], part) == -1) - prep_error (data, filename, _("failed to create root filesystem: %s"), - guestfs_last_error (g)); - free (part); -} - -void -prep_prelaunch_bootrootlv (const char *filename, prep_data *data) -{ - if (vg_lv_parse (data->params[0], NULL, NULL) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - if (alloc_disk (filename, data->params[3], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_bootrootlv (const char *filename, prep_data *data, const char *device) -{ - off_t bootsize; - if (parse_size (data->params[4], &bootsize) == -1) - prep_error (data, filename, _("could not parse boot size")); - - int sector = guestfs_blockdev_getss (g, device); - if (sector == -1) - prep_error (data, filename, _("failed to get sector size of disk: %s"), - guestfs_last_error (g)); - - if (guestfs_part_init (g, device, data->params[5]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); - - off_t lastbootsect = 64 + bootsize/sector - 1; - if (guestfs_part_add (g, device, "primary", 64, lastbootsect) == -1) - prep_error (data, filename, _("failed to add boot partition: %s"), - guestfs_last_error (g)); - - if (guestfs_part_add (g, device, "primary", lastbootsect+1, -64) == -1) - prep_error (data, filename, _("failed to add root partition: %s"), - guestfs_last_error (g)); - - char *vg; - char *lv; - if (vg_lv_parse (data->params[0], &vg, &lv) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - char *part; - if (asprintf (&part, "%s1", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - if (guestfs_mkfs (g, data->params[1], part) == -1) - prep_error (data, filename, _("failed to create boot filesystem: %s"), - guestfs_last_error (g)); - free (part); - - if (asprintf (&part, "%s2", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - if (guestfs_pvcreate (g, part) == -1) - prep_error (data, filename, _("failed to create PV: %s: %s"), - part, guestfs_last_error (g)); - - char *parts[] = { part, NULL }; - if (guestfs_vgcreate (g, vg, parts) == -1) - prep_error (data, filename, _("failed to create VG: %s: %s"), - vg, guestfs_last_error (g)); - - /* Create the largest possible LV. */ - if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) - prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), - vg, lv, guestfs_last_error (g)); - - if (guestfs_mkfs (g, data->params[2], data->params[0]) == -1) - prep_error (data, filename, _("failed to create root filesystem: %s"), - guestfs_last_error (g)); - - free (part); - free (vg); - free (lv); -} diff --git a/fish/prep_disk.c b/fish/prep_disk.c deleted file mode 100644 index 1caee5f0..00000000 --- a/fish/prep_disk.c +++ /dev/null @@ -1,42 +0,0 @@ -/* guestfish - the filesystem interactive shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "fish.h" -#include "prepopts.h" - -void -prep_prelaunch_disk (const char *filename, prep_data *data) -{ - if (alloc_disk (filename, data->params[0], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_disk (const char *filename, prep_data *data, const char *device) -{ - /* nothing */ -} diff --git a/fish/prep_fs.c b/fish/prep_fs.c deleted file mode 100644 index a0373d9c..00000000 --- a/fish/prep_fs.c +++ /dev/null @@ -1,56 +0,0 @@ -/* guestfish - the filesystem interactive shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "fish.h" -#include "prepopts.h" - -void -prep_prelaunch_fs (const char *filename, prep_data *data) -{ - if (alloc_disk (filename, data->params[1], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_fs (const char *filename, prep_data *data, const char *device) -{ - if (guestfs_part_disk (g, device, data->params[2]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); - - char *part; - if (asprintf (&part, "%s1", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - - if (guestfs_mkfs (g, data->params[0], part) == -1) - prep_error (data, filename, _("failed to create filesystem (%s): %s"), - data->params[0], guestfs_last_error (g)); - - free (part); -} diff --git a/fish/prep_lv.c b/fish/prep_lv.c deleted file mode 100644 index f635ff9f..00000000 --- a/fish/prep_lv.c +++ /dev/null @@ -1,160 +0,0 @@ -/* guestfish - the filesystem interactive shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "fish.h" -#include "prepopts.h" - -/* Split "/dev/VG/LV" into "VG" and "LV". This function should - * probably do more checks. - */ -int -vg_lv_parse (const char *device, char **vg, char **lv) -{ - if (STRPREFIX (device, "/dev/")) - device += 5; - - const char *p = strchr (device, '/'); - if (p == NULL) - return -1; - - if (vg) { - *vg = strndup (device, p - device); - if (*vg == NULL) { - perror ("strndup"); - exit (EXIT_FAILURE); - } - } - - if (lv) { - *lv = strdup (p+1); - if (*lv == NULL) { - perror ("strndup"); - exit (EXIT_FAILURE); - } - } - - return 0; -} - -void -prep_prelaunch_lv (const char *filename, prep_data *data) -{ - if (vg_lv_parse (data->params[0], NULL, NULL) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - if (alloc_disk (filename, data->params[1], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_lv (const char *filename, prep_data *data, const char *device) -{ - if (guestfs_part_disk (g, device, data->params[2]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); - - char *vg; - char *lv; - if (vg_lv_parse (data->params[0], &vg, &lv) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - char *part; - if (asprintf (&part, "%s1", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - - if (guestfs_pvcreate (g, part) == -1) - prep_error (data, filename, _("failed to create PV: %s: %s"), - part, guestfs_last_error (g)); - - char *parts[] = { part, NULL }; - if (guestfs_vgcreate (g, vg, parts) == -1) - prep_error (data, filename, _("failed to create VG: %s: %s"), - vg, guestfs_last_error (g)); - - /* Create the largest possible LV. */ - if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) - prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), - vg, lv, guestfs_last_error (g)); - - free (part); - free (vg); - free (lv); -} - -void -prep_prelaunch_lvfs (const char *filename, prep_data *data) -{ - if (vg_lv_parse (data->params[0], NULL, NULL) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - if (alloc_disk (filename, data->params[2], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_lvfs (const char *filename, prep_data *data, const char *device) -{ - if (guestfs_part_disk (g, device, data->params[3]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); - - char *vg; - char *lv; - if (vg_lv_parse (data->params[0], &vg, &lv) == -1) - prep_error (data, filename, _("incorrect format for LV name, use '/dev/VG/LV'")); - - char *part; - if (asprintf (&part, "%s1", device) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } - - if (guestfs_pvcreate (g, part) == -1) - prep_error (data, filename, _("failed to create PV: %s: %s"), - part, guestfs_last_error (g)); - - char *parts[] = { part, NULL }; - if (guestfs_vgcreate (g, vg, parts) == -1) - prep_error (data, filename, _("failed to create VG: %s: %s"), - vg, guestfs_last_error (g)); - - /* Create the largest possible LV. */ - if (guestfs_lvcreate_free (g, lv, vg, 100) == -1) - prep_error (data, filename, _("failed to create LV: /dev/%s/%s: %s"), - vg, lv, guestfs_last_error (g)); - - /* Create the filesystem. */ - if (guestfs_mkfs (g, data->params[1], data->params[0]) == -1) - prep_error (data, filename, _("failed to create filesystem (%s): %s"), - data->params[1], guestfs_last_error (g)); - - free (part); - free (vg); - free (lv); -} diff --git a/fish/prep_part.c b/fish/prep_part.c deleted file mode 100644 index fc390143..00000000 --- a/fish/prep_part.c +++ /dev/null @@ -1,44 +0,0 @@ -/* guestfish - the filesystem interactive shell - * Copyright (C) 2010 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "fish.h" -#include "prepopts.h" - -void -prep_prelaunch_part (const char *filename, prep_data *data) -{ - if (alloc_disk (filename, data->params[0], 0, 1) == -1) - prep_error (data, filename, _("failed to allocate disk")); -} - -void -prep_postlaunch_part (const char *filename, prep_data *data, const char *device) -{ - if (guestfs_part_disk (g, device, data->params[1]) == -1) - prep_error (data, filename, _("failed to partition disk: %s"), - guestfs_last_error (g)); -} diff --git a/fish/test-read-file.sh b/fish/test-read-file.sh new file mode 100755 index 00000000..d0471333 --- /dev/null +++ b/fish/test-read-file.sh @@ -0,0 +1,34 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2009 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# Test read_file call. + +set -e + +rm -f test.out + +./guestfish <<'EOF' > test.out +add-ro ../tests/data/test.iso +run +mount-ro /dev/sda / +read-file /helloworld.tar +EOF + +cmp ../tests/data/helloworld.tar test.out + +rm -f test.out diff --git a/fish/test-read_file.sh b/fish/test-read_file.sh deleted file mode 100755 index d0471333..00000000 --- a/fish/test-read_file.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# libguestfs -# Copyright (C) 2009 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Test read_file call. - -set -e - -rm -f test.out - -./guestfish <<'EOF' > test.out -add-ro ../tests/data/test.iso -run -mount-ro /dev/sda / -read-file /helloworld.tar -EOF - -cmp ../tests/data/helloworld.tar test.out - -rm -f test.out diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml index aba46e96..a85d53d5 100644 --- a/generator/generator_fish.ml +++ b/generator/generator_fish.ml @@ -73,7 +73,7 @@ let generate_fish_cmds () = pr "#include \"fish.h\"\n"; pr "#include \"fish-cmds.h\"\n"; pr "#include \"options.h\"\n"; - pr "#include \"cmds_gperf.h\"\n"; + pr "#include \"cmds-gperf.h\"\n"; pr "\n"; pr "/* Valid suffixes allowed for numbers. See Gnulib xstrtol function. */\n"; pr "static const char *xstrtol_suffixes = \"0kKMGTPEZY\";\n"; @@ -684,7 +684,7 @@ and generate_fish_cmds_gperf () = #include #include -#include \"cmds_gperf.h\" +#include \"cmds-gperf.h\" "; diff --git a/generator/generator_main.ml b/generator/generator_main.ml index e51bf830..9a1da9b1 100644 --- a/generator/generator_main.ml +++ b/generator/generator_main.ml @@ -86,7 +86,7 @@ Run it from the top source directory using the command output_to "src/guestfs-structs.pod" generate_structs_pod; output_to "src/guestfs-actions.pod" generate_actions_pod; output_to "src/guestfs-availability.pod" generate_availability_pod; - output_to "src/errnostring_gperf.gperf" generate_errnostring_gperf; + output_to "src/errnostring-gperf.gperf" generate_errnostring_gperf; output_to "src/errnostring.c" generate_errnostring_c; output_to "src/errnostring.h" generate_errnostring_h; output_to "src/MAX_PROC_NR" generate_max_proc_nr; @@ -97,7 +97,7 @@ Run it from the top source directory using the command output_to "daemon/optgroups.c" generate_daemon_optgroups_c; output_to "daemon/optgroups.h" generate_daemon_optgroups_h; output_to "tests/c-api/tests.c" generate_tests; - output_to "fish/cmds_gperf.gperf" generate_fish_cmds_gperf; + output_to "fish/cmds-gperf.gperf" generate_fish_cmds_gperf; output_to "fish/cmds.c" generate_fish_cmds; output_to "fish/completion.c" generate_fish_completion; output_to "fish/event-names.c" generate_fish_event_names; @@ -108,7 +108,7 @@ Run it from the top source directory using the command output_to "fish/prepopts.h" generate_fish_prep_options_h; output_to "ocaml/guestfs.mli" generate_ocaml_mli; output_to "ocaml/guestfs.ml" generate_ocaml_ml; - output_to "ocaml/guestfs_c_actions.c" generate_ocaml_c; + output_to "ocaml/guestfs-c-actions.c" generate_ocaml_c; output_to "ocaml/bindtests.ml" generate_ocaml_bindtests; output_to "perl/Guestfs.xs" generate_perl_xs; output_to "perl/lib/Sys/Guestfs.pm" generate_perl_pm; diff --git a/generator/generator_ocaml.ml b/generator/generator_ocaml.ml index 392f9cb6..99a0fc6b 100644 --- a/generator/generator_ocaml.ml +++ b/generator/generator_ocaml.ml @@ -314,7 +314,7 @@ and generate_ocaml_c () = #include \"guestfs.h\" -#include \"guestfs_c.h\" +#include \"guestfs-c.h\" /* Copy a hashtable of string pairs into an assoc-list. We return * the list in reverse order, but hashtables aren't supposed to be diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index e2c4667b..d91eb5c1 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -26,13 +26,13 @@ include $(top_srcdir)/subdir-rules.mk generator_built = \ guestfs.mli \ guestfs.ml \ - guestfs_c_actions.c \ + guestfs-c-actions.c \ bindtests.ml EXTRA_DIST = \ $(generator_built) \ .depend \ - guestfs_c.c guestfs_c.h \ + guestfs-c.c guestfs-c.h \ html/.gitignore \ META.in \ run-bindtests \ @@ -68,7 +68,7 @@ libguestfsocaml_a_CFLAGS = \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -fPIC -libguestfsocaml_a_SOURCES = guestfs_c.c guestfs_c_actions.c +libguestfsocaml_a_SOURCES = guestfs-c.c guestfs-c-actions.c if HAVE_OCAMLDOC diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c new file mode 100644 index 00000000..469110dc --- /dev/null +++ b/ocaml/guestfs-c.c @@ -0,0 +1,423 @@ +/* libguestfs + * Copyright (C) 2009-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "guestfs-c.h" + +static value **get_all_event_callbacks (guestfs_h *g, size_t *len_rtn); +static void event_callback_wrapper (guestfs_h *g, void *data, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len); + +/* This macro was added in OCaml 3.10. Backport for earlier versions. */ +#ifndef CAMLreturnT +#define CAMLreturnT(type, result) do{ \ + type caml__temp_result = (result); \ + caml_local_roots = caml__frame; \ + return (caml__temp_result); \ +}while(0) +#endif + +/* These prototypes are solely to quiet gcc warning. */ +CAMLprim value ocaml_guestfs_create (value unitv); +CAMLprim value ocaml_guestfs_close (value gv); +CAMLprim value ocaml_guestfs_set_event_callback (value gv, value closure, value events); +CAMLprim value ocaml_guestfs_delete_event_callback (value gv, value eh); +value ocaml_guestfs_last_errno (value gv); +value ocaml_guestfs_user_cancel (value gv); + +/* Allocate handles and deal with finalization. */ +static void +guestfs_finalize (value gv) +{ + guestfs_h *g = Guestfs_val (gv); + + if (g) { + /* There is a nasty, difficult to solve case here where the + * user deletes events in one of the callbacks that we are + * about to invoke, resulting in a double-free. XXX + */ + size_t len, i; + value **roots = get_all_event_callbacks (g, &len); + + value *v = guestfs_get_private (g, "_ocaml_g"); + + /* Close the handle: this could invoke callbacks from the list + * above, which is why we don't want to delete them before + * closing the handle. + */ + guestfs_close (g); + + /* Now unregister the global roots. */ + for (i = 0; i < len; ++i) { + caml_remove_global_root (roots[i]); + free (roots[i]); + } + free (roots); + + caml_remove_global_root (v); + free (v); + } +} + +static struct custom_operations guestfs_custom_operations = { + (char *) "guestfs_custom_operations", + guestfs_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +static value +Val_guestfs (guestfs_h *g) +{ + CAMLparam0 (); + CAMLlocal1 (rv); + + rv = caml_alloc_custom (&guestfs_custom_operations, + sizeof (guestfs_h *), 0, 1); + Guestfs_val (rv) = g; + + CAMLreturn (rv); +} + +void +ocaml_guestfs_raise_error (guestfs_h *g, const char *func) +{ + CAMLparam0 (); + CAMLlocal1 (v); + const char *msg; + + msg = guestfs_last_error (g); + + if (msg) + v = caml_copy_string (msg); + else + v = caml_copy_string (func); + caml_raise_with_arg (*caml_named_value ("ocaml_guestfs_error"), v); + CAMLnoreturn; +} + +void +ocaml_guestfs_raise_closed (const char *func) +{ + CAMLparam0 (); + CAMLlocal1 (v); + + v = caml_copy_string (func); + caml_raise_with_arg (*caml_named_value ("ocaml_guestfs_closed"), v); + CAMLnoreturn; +} + +/* Guestfs.create */ +CAMLprim value +ocaml_guestfs_create (value unitv) +{ + CAMLparam1 (unitv); + CAMLlocal1 (gv); + guestfs_h *g; + value *v; + + g = guestfs_create (); + if (g == NULL) + caml_failwith ("failed to create guestfs handle"); + + guestfs_set_error_handler (g, NULL, NULL); + + gv = Val_guestfs (g); + + /* Store the OCaml handle into the C handle. This is only so we can + * map the C handle to the OCaml handle in event_callback_wrapper. + */ + v = guestfs_safe_malloc (g, sizeof *v); + *v = gv; + /* XXX This global root is generational, but we cannot rely on every + * user having the OCaml 3.11 version which supports this. + */ + caml_register_global_root (v); + guestfs_set_private (g, "_ocaml_g", v); + + CAMLreturn (gv); +} + +/* Guestfs.close */ +CAMLprim value +ocaml_guestfs_close (value gv) +{ + CAMLparam1 (gv); + + guestfs_finalize (gv); + + /* So we don't double-free in the finalizer. */ + Guestfs_val (gv) = NULL; + + CAMLreturn (Val_unit); +} + +/* Copy string array value. */ +char ** +ocaml_guestfs_strings_val (guestfs_h *g, value sv) +{ + CAMLparam1 (sv); + char **r; + size_t i; + + r = guestfs_safe_malloc (g, sizeof (char *) * (Wosize_val (sv) + 1)); + for (i = 0; i < Wosize_val (sv); ++i) + r[i] = guestfs_safe_strdup (g, String_val (Field (sv, i))); + r[i] = NULL; + + CAMLreturnT (char **, r); +} + +/* Free array of strings. */ +void +ocaml_guestfs_free_strings (char **argv) +{ + size_t i; + + for (i = 0; argv[i] != NULL; ++i) + free (argv[i]); + free (argv); +} + +static uint64_t +event_bitmask_of_event_list (value events) +{ + uint64_t r = 0; + + while (events != Val_int (0)) { + r |= UINT64_C(1) << Int_val (Field (events, 0)); + events = Field (events, 1); + } + + return r; +} + +/* Guestfs.set_event_callback */ +CAMLprim value +ocaml_guestfs_set_event_callback (value gv, value closure, value events) +{ + CAMLparam3 (gv, closure, events); + char key[64]; + int eh; + uint64_t event_bitmask; + + guestfs_h *g = Guestfs_val (gv); + + event_bitmask = event_bitmask_of_event_list (events); + + value *root = guestfs_safe_malloc (g, sizeof *root); + *root = closure; + + eh = guestfs_set_event_callback (g, event_callback_wrapper, + event_bitmask, 0, root); + + if (eh == -1) { + free (root); + ocaml_guestfs_raise_error (g, "set_event_callback"); + } + + /* XXX This global root is generational, but we cannot rely on every + * user having the OCaml 3.11 version which supports this. + */ + caml_register_global_root (root); + + snprintf (key, sizeof key, "_ocaml_event_%d", eh); + guestfs_set_private (g, key, root); + + CAMLreturn (Val_int (eh)); +} + +/* Guestfs.delete_event_callback */ +CAMLprim value +ocaml_guestfs_delete_event_callback (value gv, value ehv) +{ + CAMLparam2 (gv, ehv); + char key[64]; + int eh = Int_val (ehv); + + guestfs_h *g = Guestfs_val (gv); + + snprintf (key, sizeof key, "_ocaml_event_%d", eh); + + value *root = guestfs_get_private (g, key); + if (root) { + caml_remove_global_root (root); + free (root); + guestfs_set_private (g, key, NULL); + guestfs_delete_event_callback (g, eh); + } + + CAMLreturn (Val_unit); +} + +static value ** +get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) +{ + value **r; + size_t i; + const char *key; + value *root; + + /* Count the length of the array that will be needed. */ + *len_rtn = 0; + root = guestfs_first_private (g, &key); + while (root != NULL) { + if (strncmp (key, "_ocaml_event_", strlen ("_ocaml_event_")) == 0) + (*len_rtn)++; + root = guestfs_next_private (g, &key); + } + + /* Copy them into the return array. */ + r = guestfs_safe_malloc (g, sizeof (value *) * (*len_rtn)); + + i = 0; + root = guestfs_first_private (g, &key); + while (root != NULL) { + if (strncmp (key, "_ocaml_event_", strlen ("_ocaml_event_")) == 0) { + r[i] = root; + i++; + } + root = guestfs_next_private (g, &key); + } + + return r; +} + +/* Could do better: http://graphics.stanford.edu/~seander/bithacks.html */ +static int +event_bitmask_to_event (uint64_t event) +{ + int r = 0; + + while (event >>= 1) + r++; + + return r; +} + +static void +event_callback_wrapper_locked (guestfs_h *g, + void *data, + uint64_t event, + int event_handle, + int flags, + const char *buf, size_t buf_len, + const uint64_t *array, size_t array_len) +{ + CAMLparam0 (); + CAMLlocal5 (gv, evv, ehv, bufv, arrayv); + CAMLlocal2 (rv, v); + value *root; + size_t i; + + root = guestfs_get_private (g, "_ocaml_g"); + gv = *root; + + /* Only one bit should be set in 'event'. Which one? */ + evv = Val_int (event_bitmask_to_event (event)); + + ehv = Val_int (event_handle); + + bufv = caml_alloc_string (buf_len); + memcpy (String_val (bufv), buf, buf_len); + + arrayv = caml_alloc (array_len, 0); + for (i = 0; i < array_len; ++i) { + v = caml_copy_int64 (array[i]); + Store_field (arrayv, i, v); + } + + value args[5] = { gv, evv, ehv, bufv, arrayv }; + + rv = caml_callbackN_exn (*(value*)data, 5, args); + + /* Callbacks shouldn't throw exceptions. There's not much we can do + * except to print it. + */ + if (Is_exception_result (rv)) + fprintf (stderr, + "libguestfs: uncaught OCaml exception in event callback: %s", + caml_format_exception (Extract_exception (rv))); + + CAMLreturn0; +} + +static void +event_callback_wrapper (guestfs_h *g, + void *data, + uint64_t event, + int event_handle, + int flags, + const char *buf, size_t buf_len, + const uint64_t *array, size_t array_len) +{ + /* Ensure we are holding the GC lock before any GC operations are + * possible. (RHBZ#725824) + */ + caml_leave_blocking_section (); + + event_callback_wrapper_locked (g, data, event, event_handle, flags, + buf, buf_len, array, array_len); + + caml_enter_blocking_section (); +} + +value +ocaml_guestfs_last_errno (value gv) +{ + CAMLparam1 (gv); + CAMLlocal1 (rv); + int r; + guestfs_h *g; + + g = Guestfs_val (gv); + if (g == NULL) + ocaml_guestfs_raise_closed ("last_errno"); + + r = guestfs_last_errno (g); + + rv = Val_int (r); + CAMLreturn (rv); +} + +/* NB: This is and must remain a "noalloc" function. */ +value +ocaml_guestfs_user_cancel (value gv) +{ + guestfs_h *g = Guestfs_val (gv); + if (g) + guestfs_user_cancel (g); + return Val_unit; +} diff --git a/ocaml/guestfs-c.h b/ocaml/guestfs-c.h new file mode 100644 index 00000000..8d379210 --- /dev/null +++ b/ocaml/guestfs-c.h @@ -0,0 +1,40 @@ +/* libguestfs + * Copyright (C) 2009-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef GUESTFS_OCAML_C_H +#define GUESTFS_OCAML_C_H + +#define Guestfs_val(v) (*((guestfs_h **)Data_custom_val(v))) +extern void ocaml_guestfs_raise_error (guestfs_h *g, const char *func) + Noreturn; +extern void ocaml_guestfs_raise_closed (const char *func) + Noreturn; +extern char **ocaml_guestfs_strings_val (guestfs_h *g, value sv); +extern void ocaml_guestfs_free_strings (char **r); + +# ifdef __GNUC__ +# ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__((__unused__)) +# endif +#else +# ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED +# endif +#endif + +#endif /* GUESTFS_OCAML_C_H */ diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c deleted file mode 100644 index fc7f9d04..00000000 --- a/ocaml/guestfs_c.c +++ /dev/null @@ -1,423 +0,0 @@ -/* libguestfs - * Copyright (C) 2009-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "guestfs_c.h" - -static value **get_all_event_callbacks (guestfs_h *g, size_t *len_rtn); -static void event_callback_wrapper (guestfs_h *g, void *data, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len); - -/* This macro was added in OCaml 3.10. Backport for earlier versions. */ -#ifndef CAMLreturnT -#define CAMLreturnT(type, result) do{ \ - type caml__temp_result = (result); \ - caml_local_roots = caml__frame; \ - return (caml__temp_result); \ -}while(0) -#endif - -/* These prototypes are solely to quiet gcc warning. */ -CAMLprim value ocaml_guestfs_create (value unitv); -CAMLprim value ocaml_guestfs_close (value gv); -CAMLprim value ocaml_guestfs_set_event_callback (value gv, value closure, value events); -CAMLprim value ocaml_guestfs_delete_event_callback (value gv, value eh); -value ocaml_guestfs_last_errno (value gv); -value ocaml_guestfs_user_cancel (value gv); - -/* Allocate handles and deal with finalization. */ -static void -guestfs_finalize (value gv) -{ - guestfs_h *g = Guestfs_val (gv); - - if (g) { - /* There is a nasty, difficult to solve case here where the - * user deletes events in one of the callbacks that we are - * about to invoke, resulting in a double-free. XXX - */ - size_t len, i; - value **roots = get_all_event_callbacks (g, &len); - - value *v = guestfs_get_private (g, "_ocaml_g"); - - /* Close the handle: this could invoke callbacks from the list - * above, which is why we don't want to delete them before - * closing the handle. - */ - guestfs_close (g); - - /* Now unregister the global roots. */ - for (i = 0; i < len; ++i) { - caml_remove_global_root (roots[i]); - free (roots[i]); - } - free (roots); - - caml_remove_global_root (v); - free (v); - } -} - -static struct custom_operations guestfs_custom_operations = { - (char *) "guestfs_custom_operations", - guestfs_finalize, - custom_compare_default, - custom_hash_default, - custom_serialize_default, - custom_deserialize_default -}; - -static value -Val_guestfs (guestfs_h *g) -{ - CAMLparam0 (); - CAMLlocal1 (rv); - - rv = caml_alloc_custom (&guestfs_custom_operations, - sizeof (guestfs_h *), 0, 1); - Guestfs_val (rv) = g; - - CAMLreturn (rv); -} - -void -ocaml_guestfs_raise_error (guestfs_h *g, const char *func) -{ - CAMLparam0 (); - CAMLlocal1 (v); - const char *msg; - - msg = guestfs_last_error (g); - - if (msg) - v = caml_copy_string (msg); - else - v = caml_copy_string (func); - caml_raise_with_arg (*caml_named_value ("ocaml_guestfs_error"), v); - CAMLnoreturn; -} - -void -ocaml_guestfs_raise_closed (const char *func) -{ - CAMLparam0 (); - CAMLlocal1 (v); - - v = caml_copy_string (func); - caml_raise_with_arg (*caml_named_value ("ocaml_guestfs_closed"), v); - CAMLnoreturn; -} - -/* Guestfs.create */ -CAMLprim value -ocaml_guestfs_create (value unitv) -{ - CAMLparam1 (unitv); - CAMLlocal1 (gv); - guestfs_h *g; - value *v; - - g = guestfs_create (); - if (g == NULL) - caml_failwith ("failed to create guestfs handle"); - - guestfs_set_error_handler (g, NULL, NULL); - - gv = Val_guestfs (g); - - /* Store the OCaml handle into the C handle. This is only so we can - * map the C handle to the OCaml handle in event_callback_wrapper. - */ - v = guestfs_safe_malloc (g, sizeof *v); - *v = gv; - /* XXX This global root is generational, but we cannot rely on every - * user having the OCaml 3.11 version which supports this. - */ - caml_register_global_root (v); - guestfs_set_private (g, "_ocaml_g", v); - - CAMLreturn (gv); -} - -/* Guestfs.close */ -CAMLprim value -ocaml_guestfs_close (value gv) -{ - CAMLparam1 (gv); - - guestfs_finalize (gv); - - /* So we don't double-free in the finalizer. */ - Guestfs_val (gv) = NULL; - - CAMLreturn (Val_unit); -} - -/* Copy string array value. */ -char ** -ocaml_guestfs_strings_val (guestfs_h *g, value sv) -{ - CAMLparam1 (sv); - char **r; - size_t i; - - r = guestfs_safe_malloc (g, sizeof (char *) * (Wosize_val (sv) + 1)); - for (i = 0; i < Wosize_val (sv); ++i) - r[i] = guestfs_safe_strdup (g, String_val (Field (sv, i))); - r[i] = NULL; - - CAMLreturnT (char **, r); -} - -/* Free array of strings. */ -void -ocaml_guestfs_free_strings (char **argv) -{ - size_t i; - - for (i = 0; argv[i] != NULL; ++i) - free (argv[i]); - free (argv); -} - -static uint64_t -event_bitmask_of_event_list (value events) -{ - uint64_t r = 0; - - while (events != Val_int (0)) { - r |= UINT64_C(1) << Int_val (Field (events, 0)); - events = Field (events, 1); - } - - return r; -} - -/* Guestfs.set_event_callback */ -CAMLprim value -ocaml_guestfs_set_event_callback (value gv, value closure, value events) -{ - CAMLparam3 (gv, closure, events); - char key[64]; - int eh; - uint64_t event_bitmask; - - guestfs_h *g = Guestfs_val (gv); - - event_bitmask = event_bitmask_of_event_list (events); - - value *root = guestfs_safe_malloc (g, sizeof *root); - *root = closure; - - eh = guestfs_set_event_callback (g, event_callback_wrapper, - event_bitmask, 0, root); - - if (eh == -1) { - free (root); - ocaml_guestfs_raise_error (g, "set_event_callback"); - } - - /* XXX This global root is generational, but we cannot rely on every - * user having the OCaml 3.11 version which supports this. - */ - caml_register_global_root (root); - - snprintf (key, sizeof key, "_ocaml_event_%d", eh); - guestfs_set_private (g, key, root); - - CAMLreturn (Val_int (eh)); -} - -/* Guestfs.delete_event_callback */ -CAMLprim value -ocaml_guestfs_delete_event_callback (value gv, value ehv) -{ - CAMLparam2 (gv, ehv); - char key[64]; - int eh = Int_val (ehv); - - guestfs_h *g = Guestfs_val (gv); - - snprintf (key, sizeof key, "_ocaml_event_%d", eh); - - value *root = guestfs_get_private (g, key); - if (root) { - caml_remove_global_root (root); - free (root); - guestfs_set_private (g, key, NULL); - guestfs_delete_event_callback (g, eh); - } - - CAMLreturn (Val_unit); -} - -static value ** -get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) -{ - value **r; - size_t i; - const char *key; - value *root; - - /* Count the length of the array that will be needed. */ - *len_rtn = 0; - root = guestfs_first_private (g, &key); - while (root != NULL) { - if (strncmp (key, "_ocaml_event_", strlen ("_ocaml_event_")) == 0) - (*len_rtn)++; - root = guestfs_next_private (g, &key); - } - - /* Copy them into the return array. */ - r = guestfs_safe_malloc (g, sizeof (value *) * (*len_rtn)); - - i = 0; - root = guestfs_first_private (g, &key); - while (root != NULL) { - if (strncmp (key, "_ocaml_event_", strlen ("_ocaml_event_")) == 0) { - r[i] = root; - i++; - } - root = guestfs_next_private (g, &key); - } - - return r; -} - -/* Could do better: http://graphics.stanford.edu/~seander/bithacks.html */ -static int -event_bitmask_to_event (uint64_t event) -{ - int r = 0; - - while (event >>= 1) - r++; - - return r; -} - -static void -event_callback_wrapper_locked (guestfs_h *g, - void *data, - uint64_t event, - int event_handle, - int flags, - const char *buf, size_t buf_len, - const uint64_t *array, size_t array_len) -{ - CAMLparam0 (); - CAMLlocal5 (gv, evv, ehv, bufv, arrayv); - CAMLlocal2 (rv, v); - value *root; - size_t i; - - root = guestfs_get_private (g, "_ocaml_g"); - gv = *root; - - /* Only one bit should be set in 'event'. Which one? */ - evv = Val_int (event_bitmask_to_event (event)); - - ehv = Val_int (event_handle); - - bufv = caml_alloc_string (buf_len); - memcpy (String_val (bufv), buf, buf_len); - - arrayv = caml_alloc (array_len, 0); - for (i = 0; i < array_len; ++i) { - v = caml_copy_int64 (array[i]); - Store_field (arrayv, i, v); - } - - value args[5] = { gv, evv, ehv, bufv, arrayv }; - - rv = caml_callbackN_exn (*(value*)data, 5, args); - - /* Callbacks shouldn't throw exceptions. There's not much we can do - * except to print it. - */ - if (Is_exception_result (rv)) - fprintf (stderr, - "libguestfs: uncaught OCaml exception in event callback: %s", - caml_format_exception (Extract_exception (rv))); - - CAMLreturn0; -} - -static void -event_callback_wrapper (guestfs_h *g, - void *data, - uint64_t event, - int event_handle, - int flags, - const char *buf, size_t buf_len, - const uint64_t *array, size_t array_len) -{ - /* Ensure we are holding the GC lock before any GC operations are - * possible. (RHBZ#725824) - */ - caml_leave_blocking_section (); - - event_callback_wrapper_locked (g, data, event, event_handle, flags, - buf, buf_len, array, array_len); - - caml_enter_blocking_section (); -} - -value -ocaml_guestfs_last_errno (value gv) -{ - CAMLparam1 (gv); - CAMLlocal1 (rv); - int r; - guestfs_h *g; - - g = Guestfs_val (gv); - if (g == NULL) - ocaml_guestfs_raise_closed ("last_errno"); - - r = guestfs_last_errno (g); - - rv = Val_int (r); - CAMLreturn (rv); -} - -/* NB: This is and must remain a "noalloc" function. */ -value -ocaml_guestfs_user_cancel (value gv) -{ - guestfs_h *g = Guestfs_val (gv); - if (g) - guestfs_user_cancel (g); - return Val_unit; -} diff --git a/ocaml/guestfs_c.h b/ocaml/guestfs_c.h deleted file mode 100644 index 8d379210..00000000 --- a/ocaml/guestfs_c.h +++ /dev/null @@ -1,40 +0,0 @@ -/* libguestfs - * Copyright (C) 2009-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef GUESTFS_OCAML_C_H -#define GUESTFS_OCAML_C_H - -#define Guestfs_val(v) (*((guestfs_h **)Data_custom_val(v))) -extern void ocaml_guestfs_raise_error (guestfs_h *g, const char *func) - Noreturn; -extern void ocaml_guestfs_raise_closed (const char *func) - Noreturn; -extern char **ocaml_guestfs_strings_val (guestfs_h *g, value sv); -extern void ocaml_guestfs_free_strings (char **r); - -# ifdef __GNUC__ -# ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__((__unused__)) -# endif -#else -# ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED -# endif -#endif - -#endif /* GUESTFS_OCAML_C_H */ diff --git a/po-docs/ja.po b/po-docs/ja.po index 8756d693..5d042912 100644 --- a/po-docs/ja.po +++ b/po-docs/ja.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: libguestfs\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2012-07-18 21:04+0200\n" +"POT-Creation-Date: 2012-07-19 16:02+0200\n" "PO-Revision-Date: 2012-07-10 17:15+0000\n" "Last-Translator: rjones \n" "Language-Team: Japanese \n" @@ -3429,7 +3429,7 @@ msgstr "" "readable> ć‚Ŗćƒ—ć‚·ćƒ§ćƒ³ćŒęŒ‡å®šć•ć‚Œć¦ć„ćŖć‘ć‚Œć°ć€ćƒć‚¤ćƒˆå˜ä½ć§č”Øē¤ŗć•ć‚Œć¾ć™ć€‚" #. type: =head2 -#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5108 +#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5115 msgid "path" msgstr "ćƒ‘ć‚¹" @@ -9262,20 +9262,20 @@ msgstr "" #: ../fish/guestfish-actions.pod:1324 ../fish/guestfish-actions.pod:1851 #: ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:3068 #: ../fish/guestfish-actions.pod:3899 ../fish/guestfish-actions.pod:4315 -#: ../fish/guestfish-actions.pod:5043 ../fish/guestfish-actions.pod:5291 -#: ../fish/guestfish-actions.pod:5311 ../fish/guestfish-actions.pod:5330 -#: ../fish/guestfish-actions.pod:5368 ../fish/guestfish-actions.pod:6150 -#: ../fish/guestfish-actions.pod:6278 ../src/guestfs-actions.pod:10 +#: ../fish/guestfish-actions.pod:5050 ../fish/guestfish-actions.pod:5298 +#: ../fish/guestfish-actions.pod:5318 ../fish/guestfish-actions.pod:5337 +#: ../fish/guestfish-actions.pod:5375 ../fish/guestfish-actions.pod:6157 +#: ../fish/guestfish-actions.pod:6285 ../src/guestfs-actions.pod:10 #: ../src/guestfs-actions.pod:301 ../src/guestfs-actions.pod:322 #: ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1892 #: ../src/guestfs-actions.pod:2151 ../src/guestfs-actions.pod:2260 #: ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3002 #: ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:6059 -#: ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7961 -#: ../src/guestfs-actions.pod:8272 ../src/guestfs-actions.pod:8313 -#: ../src/guestfs-actions.pod:8344 ../src/guestfs-actions.pod:8404 -#: ../src/guestfs-actions.pod:9542 ../src/guestfs-actions.pod:9670 -#: ../src/guestfs-actions.pod:9892 +#: ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7968 +#: ../src/guestfs-actions.pod:8279 ../src/guestfs-actions.pod:8320 +#: ../src/guestfs-actions.pod:8351 ../src/guestfs-actions.pod:8411 +#: ../src/guestfs-actions.pod:9549 ../src/guestfs-actions.pod:9677 +#: ../src/guestfs-actions.pod:9899 msgid "" "Deprecated functions will not be removed from the API, but the fact that " "they are deprecated indicates that there are problems with correct use of " @@ -9456,8 +9456,8 @@ msgstr "" #: ../fish/guestfish-actions.pod:3882 ../fish/guestfish-actions.pod:3915 #: ../fish/guestfish-actions.pod:4078 ../fish/guestfish-actions.pod:4108 #: ../fish/guestfish-actions.pod:4251 ../fish/guestfish-actions.pod:4267 -#: ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5019 -#: ../fish/guestfish-actions.pod:5752 ../fish/guestfish-actions.pod:5834 +#: ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5026 +#: ../fish/guestfish-actions.pod:5759 ../fish/guestfish-actions.pod:5841 msgid "" "This command has one or more optional arguments. See L." msgstr "" @@ -10280,10 +10280,10 @@ msgstr "" #: ../fish/guestfish-actions.pod:985 ../fish/guestfish-actions.pod:1168 #: ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1610 #: ../fish/guestfish-actions.pod:4228 ../fish/guestfish-actions.pod:4249 -#: ../fish/guestfish-actions.pod:5608 ../fish/guestfish-actions.pod:5620 -#: ../fish/guestfish-actions.pod:5631 ../fish/guestfish-actions.pod:5642 -#: ../fish/guestfish-actions.pod:5773 ../fish/guestfish-actions.pod:5782 -#: ../fish/guestfish-actions.pod:5847 ../fish/guestfish-actions.pod:5870 +#: ../fish/guestfish-actions.pod:5615 ../fish/guestfish-actions.pod:5627 +#: ../fish/guestfish-actions.pod:5638 ../fish/guestfish-actions.pod:5649 +#: ../fish/guestfish-actions.pod:5780 ../fish/guestfish-actions.pod:5789 +#: ../fish/guestfish-actions.pod:5854 ../fish/guestfish-actions.pod:5877 msgid "Use C<-> instead of a filename to read/write from stdin/stdout." msgstr "" @@ -10727,9 +10727,9 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:3584 -#: ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5682 +#: ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5689 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:5563 -#: ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8914 +#: ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8921 msgid "The optional parameters are:" msgstr "ć‚Ŗćƒ—ć‚·ćƒ§ćƒ³ć®ćƒ‘ćƒ©ćƒ”ćƒ¼ć‚æćƒ¼ćÆę¬”ć®ćØćŠć‚Šć§ć™:" @@ -11099,13 +11099,13 @@ msgstr "" #: ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2145 #: ../fish/guestfish-actions.pod:4579 ../fish/guestfish-actions.pod:4594 #: ../fish/guestfish-actions.pod:4670 ../fish/guestfish-actions.pod:4687 -#: ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5449 -#: ../fish/guestfish-actions.pod:5495 ../fish/guestfish-actions.pod:5580 -#: ../fish/guestfish-actions.pod:5595 ../fish/guestfish-actions.pod:6114 -#: ../fish/guestfish-actions.pod:6126 ../fish/guestfish-actions.pod:6144 -#: ../fish/guestfish-actions.pod:6172 ../fish/guestfish-actions.pod:6182 -#: ../fish/guestfish-actions.pod:6250 ../fish/guestfish-actions.pod:6260 -#: ../fish/guestfish-actions.pod:6289 ../fish/guestfish-actions.pod:6299 +#: ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5456 +#: ../fish/guestfish-actions.pod:5502 ../fish/guestfish-actions.pod:5587 +#: ../fish/guestfish-actions.pod:5602 ../fish/guestfish-actions.pod:6121 +#: ../fish/guestfish-actions.pod:6133 ../fish/guestfish-actions.pod:6151 +#: ../fish/guestfish-actions.pod:6179 ../fish/guestfish-actions.pod:6189 +#: ../fish/guestfish-actions.pod:6257 ../fish/guestfish-actions.pod:6267 +#: ../fish/guestfish-actions.pod:6296 ../fish/guestfish-actions.pod:6306 #: ../src/guestfs-actions.pod:1256 ../src/guestfs-actions.pod:1435 #: ../src/guestfs-actions.pod:1455 ../src/guestfs-actions.pod:2195 #: ../src/guestfs-actions.pod:2214 ../src/guestfs-actions.pod:2317 @@ -11115,13 +11115,13 @@ msgstr "" #: ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:3444 #: ../src/guestfs-actions.pod:7248 ../src/guestfs-actions.pod:7274 #: ../src/guestfs-actions.pod:7405 ../src/guestfs-actions.pod:7431 -#: ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8542 -#: ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8743 -#: ../src/guestfs-actions.pod:8767 ../src/guestfs-actions.pod:9634 -#: ../src/guestfs-actions.pod:9654 ../src/guestfs-actions.pod:9687 -#: ../src/guestfs-actions.pod:9723 ../src/guestfs-actions.pod:9742 -#: ../src/guestfs-actions.pod:9858 ../src/guestfs-actions.pod:9877 -#: ../src/guestfs-actions.pod:9923 ../src/guestfs-actions.pod:9942 +#: ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8549 +#: ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8750 +#: ../src/guestfs-actions.pod:8774 ../src/guestfs-actions.pod:9641 +#: ../src/guestfs-actions.pod:9661 ../src/guestfs-actions.pod:9694 +#: ../src/guestfs-actions.pod:9730 ../src/guestfs-actions.pod:9749 +#: ../src/guestfs-actions.pod:9865 ../src/guestfs-actions.pod:9884 +#: ../src/guestfs-actions.pod:9930 ../src/guestfs-actions.pod:9949 msgid "" "Because of the message protocol, there is a transfer limit of somewhere " "between 2MB and 4MB. See L." @@ -11927,8 +11927,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5843 -#: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9166 +#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5850 +#: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9173 msgid "C can also be a named pipe." msgstr "C ćÆåå‰ä»˜ććƒ‘ć‚¤ćƒ—ć‚’ä½æćˆć¾ć™ć€‚" @@ -13151,8 +13151,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5015 -#: ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7904 +#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5022 +#: ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7911 msgid "" "These attributes are only present when the file is located on an ext2/3/4 " "filesystem. Using this call on other filesystem types will result in an " @@ -13508,9 +13508,9 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1937 -#: ../fish/guestfish-actions.pod:5088 ../fish/guestfish-actions.pod:5192 +#: ../fish/guestfish-actions.pod:5095 ../fish/guestfish-actions.pod:5199 #: ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3118 -#: ../src/guestfs-actions.pod:8031 ../src/guestfs-actions.pod:8159 +#: ../src/guestfs-actions.pod:8038 ../src/guestfs-actions.pod:8166 msgid "" "For more information on the architecture of libguestfs, see L." msgstr "" @@ -14098,8 +14098,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5593 -#: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8761 +#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5600 +#: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8768 msgid "If the parameter C is zero, this returns an empty list." msgstr "ćƒ‘ćƒ©ćƒ”ćƒ¼ć‚æćƒ¼ C が 0 ならば、空の一覧を返します。" @@ -16752,8 +16752,8 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5428 -#: ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8501 +#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5435 +#: ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8508 msgid "Returns file information for the given C." msgstr "äøŽćˆć‚‰ć‚ŒćŸ C ć®ćƒ•ć‚”ć‚¤ćƒ«ęƒ…å ±ć‚’čæ”ć—ć¾ć™ć€‚" @@ -18734,8 +18734,8 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4130 -#: ../fish/guestfish-actions.pod:5832 ../src/guestfs-actions.pod:6441 -#: ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9130 +#: ../fish/guestfish-actions.pod:5839 ../src/guestfs-actions.pod:6441 +#: ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9137 msgid "See L for full documentation." msgstr "å®Œå…ØćŖćƒ‰ć‚­ćƒ„ćƒ”ćƒ³ćƒˆćÆ L ć‚’å‚ē…§ć—ć¦ćć ć•ć„ć€‚" @@ -19173,8 +19173,8 @@ msgid "" msgstr "" #. type: =item -#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5686 -#: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8918 +#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5693 +#: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8925 msgid "C" msgstr "C" @@ -20766,16 +20766,35 @@ msgstr "" #. type: =item #: ../fish/guestfish-actions.pod:4952 ../src/guestfs-actions.pod:7818 +#, fuzzy +#| msgid "B<-d libvirt-domain>" +msgid "C" +msgstr "B<-d libvirt-domain>" + +#. type: =item +#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +msgid "C>" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +msgid "" +"Use libvirt to launch the appliance. The optional I is the libvirt " +"connection URI to use (see L)." +msgstr "" + +#. type: =item +#: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7825 msgid "C>" msgstr "C>" #. type: textblock -#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +#: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7827 msgid "Connect to the Unix domain socket I." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +#: ../fish/guestfish-actions.pod:4963 ../src/guestfs-actions.pod:7829 msgid "" "This method lets you connect to an existing daemon or (using virtio-serial) " "to a live guest. For more information, see L is true, this enables autosync. Libguestfs will make a best " "effort attempt to make filesystems consistent and synchronized when the " @@ -20811,7 +20830,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4973 ../src/guestfs-actions.pod:7843 +#: ../fish/guestfish-actions.pod:4980 ../src/guestfs-actions.pod:7850 msgid "" "This is enabled by default (since libguestfs 1.5.24, previously it was " "disabled by default)." @@ -20820,17 +20839,17 @@ msgstr "" "ćŸļ¼‰ć€‚" #. type: =head2 -#: ../fish/guestfish-actions.pod:4976 +#: ../fish/guestfish-actions.pod:4983 msgid "set-direct" msgstr "set-direct" #. type: =head2 -#: ../fish/guestfish-actions.pod:4978 +#: ../fish/guestfish-actions.pod:4985 msgid "direct" msgstr "direct" #. type: verbatim -#: ../fish/guestfish-actions.pod:4980 +#: ../fish/guestfish-actions.pod:4987 #, no-wrap msgid "" " set-direct true|false\n" @@ -20840,36 +20859,36 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7856 +#: ../fish/guestfish-actions.pod:4989 ../src/guestfs-actions.pod:7863 msgid "" "If the direct appliance mode flag is enabled, then stdin and stdout are " "passed directly through to the appliance once it is launched." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4986 +#: ../fish/guestfish-actions.pod:4993 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by L, but go straight to stdout." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4990 ../src/guestfs-actions.pod:7864 +#: ../fish/guestfish-actions.pod:4997 ../src/guestfs-actions.pod:7871 msgid "You probably don't want to use this unless you know what you are doing." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4993 ../src/guestfs-actions.pod:7867 +#: ../fish/guestfish-actions.pod:5000 ../src/guestfs-actions.pod:7874 msgid "The default is disabled." msgstr "ćƒ‡ćƒ•ć‚©ćƒ«ćƒˆćÆē„”åŠ¹ć§ć™ć€‚" #. type: =head2 -#: ../fish/guestfish-actions.pod:4995 +#: ../fish/guestfish-actions.pod:5002 msgid "set-e2attrs" msgstr "set-e2attrs" #. type: verbatim -#: ../fish/guestfish-actions.pod:4997 +#: ../fish/guestfish-actions.pod:5004 #, no-wrap msgid "" " set-e2attrs file attrs [clear:true|false]\n" @@ -20879,14 +20898,14 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7888 +#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 msgid "" "This sets or clears the file attributes C associated with the inode " "C." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5002 +#: ../fish/guestfish-actions.pod:5009 msgid "" "C is a string of characters representing file attributes. See L for a list of possible attributes. Not all attributes can be " @@ -20894,31 +20913,31 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 +#: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7902 msgid "" "If optional boolean C is not present or false, then the C " "listed are set in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5009 ../src/guestfs-actions.pod:7898 +#: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7905 msgid "If C is true, then the C listed are cleared in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5012 ../src/guestfs-actions.pod:7901 +#: ../fish/guestfish-actions.pod:5019 ../src/guestfs-actions.pod:7908 msgid "" "In both cases, other attributes not present in the C string are left " "unchanged." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:5021 +#: ../fish/guestfish-actions.pod:5028 msgid "set-e2generation" msgstr "set-e2generation" #. type: verbatim -#: ../fish/guestfish-actions.pod:5023 +#: ../fish/guestfish-actions.pod:5030 #, no-wrap msgid "" " set-e2generation file generation\n" @@ -20928,22 +20947,22 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:5025 ../src/guestfs-actions.pod:7943 +#: ../fish/guestfish-actions.pod:5032 ../src/guestfs-actions.pod:7950 msgid "This sets the ext2 file generation of a file." msgstr "ć“ć‚ŒćÆćƒ•ć‚”ć‚¤ćƒ«ć® ext2 ćƒ•ć‚”ć‚¤ćƒ«äø–ä»£ć‚’čØ­å®šć—ć¾ć™ć€‚" #. type: textblock -#: ../fish/guestfish-actions.pod:5027 +#: ../fish/guestfish-actions.pod:5034 msgid "See L." msgstr "L ć‚’å‚ē…§ć—ć¦ćć ć•ć„ć€‚" #. type: =head2 -#: ../fish/guestfish-actions.pod:5029 +#: ../fish/guestfish-actions.pod:5036 msgid "set-e2label" msgstr "set-e2label" #. type: verbatim -#: ../fish/guestfish-actions.pod:5031 +#: ../fish/guestfish-actions.pod:5038 #, no-wrap msgid "" " set-e2label device label\n" @@ -20953,21 +20972,21 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:7965 +#: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7972 msgid "" "This sets the ext2/3/4 filesystem label of the filesystem on C to " "C call instead." msgstr "" @@ -23976,12 +23995,12 @@ msgstr "" "恏恠恕恄怂" #. type: =head2 -#: ../fish/guestfish-actions.pod:6282 +#: ../fish/guestfish-actions.pod:6289 msgid "zgrep" msgstr "zgrep" #. type: verbatim -#: ../fish/guestfish-actions.pod:6284 +#: ../fish/guestfish-actions.pod:6291 #, no-wrap msgid "" " zgrep regex path\n" @@ -23991,18 +24010,18 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:6286 ../src/guestfs-actions.pod:9916 +#: ../fish/guestfish-actions.pod:6293 ../src/guestfs-actions.pod:9923 msgid "" "This calls the external C program and returns the matching lines." msgstr "å¤–éƒØ C ćƒ—ćƒ­ć‚°ćƒ©ćƒ ć‚’å‘¼ć³å‡ŗć—ć€äø€č‡“ć™ć‚‹č”Œć‚’čæ”ć—ć¾ć™ć€‚" #. type: =head2 -#: ../fish/guestfish-actions.pod:6292 +#: ../fish/guestfish-actions.pod:6299 msgid "zgrepi" msgstr "zgrepi" #. type: verbatim -#: ../fish/guestfish-actions.pod:6294 +#: ../fish/guestfish-actions.pod:6301 #, no-wrap msgid "" " zgrepi regex path\n" @@ -24012,7 +24031,7 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:6296 ../src/guestfs-actions.pod:9935 +#: ../fish/guestfish-actions.pod:6303 ../src/guestfs-actions.pod:9942 msgid "" "This calls the external C program and returns the matching lines." msgstr "å¤–éƒØ C ćƒ—ćƒ­ć‚°ćƒ©ćƒ ć‚’å‘¼ć³å‡ŗć—ć€äø€č‡“ć™ć‚‹č”Œć‚’čæ”ć—ć¾ć™ć€‚" @@ -33170,39 +33189,39 @@ msgstr "" #: ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7726 #: ../src/guestfs-actions.pod:7742 ../src/guestfs-actions.pod:7760 #: ../src/guestfs-actions.pod:7779 ../src/guestfs-actions.pod:7798 -#: ../src/guestfs-actions.pod:7828 ../src/guestfs-actions.pod:7846 -#: ../src/guestfs-actions.pod:7869 ../src/guestfs-actions.pod:7908 -#: ../src/guestfs-actions.pod:7947 ../src/guestfs-actions.pod:7972 -#: ../src/guestfs-actions.pod:7991 ../src/guestfs-actions.pod:8013 -#: ../src/guestfs-actions.pod:8034 ../src/guestfs-actions.pod:8053 -#: ../src/guestfs-actions.pod:8070 ../src/guestfs-actions.pod:8091 -#: ../src/guestfs-actions.pod:8119 ../src/guestfs-actions.pod:8143 -#: ../src/guestfs-actions.pod:8162 ../src/guestfs-actions.pod:8178 -#: ../src/guestfs-actions.pod:8202 ../src/guestfs-actions.pod:8221 -#: ../src/guestfs-actions.pod:8236 ../src/guestfs-actions.pod:8255 -#: ../src/guestfs-actions.pod:8299 ../src/guestfs-actions.pod:8326 -#: ../src/guestfs-actions.pod:8356 ../src/guestfs-actions.pod:8481 -#: ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8612 -#: ../src/guestfs-actions.pod:8624 ../src/guestfs-actions.pod:8637 -#: ../src/guestfs-actions.pod:8650 ../src/guestfs-actions.pod:8672 -#: ../src/guestfs-actions.pod:8685 ../src/guestfs-actions.pod:8698 -#: ../src/guestfs-actions.pod:8711 ../src/guestfs-actions.pod:8726 -#: ../src/guestfs-actions.pod:8785 ../src/guestfs-actions.pod:8802 -#: ../src/guestfs-actions.pod:8818 ../src/guestfs-actions.pod:8834 -#: ../src/guestfs-actions.pod:8851 ../src/guestfs-actions.pod:8864 -#: ../src/guestfs-actions.pod:8884 ../src/guestfs-actions.pod:8984 -#: ../src/guestfs-actions.pod:9042 ../src/guestfs-actions.pod:9056 -#: ../src/guestfs-actions.pod:9097 ../src/guestfs-actions.pod:9110 -#: ../src/guestfs-actions.pod:9132 ../src/guestfs-actions.pod:9170 -#: ../src/guestfs-actions.pod:9204 ../src/guestfs-actions.pod:9240 -#: ../src/guestfs-actions.pod:9356 ../src/guestfs-actions.pod:9371 -#: ../src/guestfs-actions.pod:9385 ../src/guestfs-actions.pod:9459 -#: ../src/guestfs-actions.pod:9472 ../src/guestfs-actions.pod:9517 -#: ../src/guestfs-actions.pod:9557 ../src/guestfs-actions.pod:9615 -#: ../src/guestfs-actions.pod:9632 ../src/guestfs-actions.pod:9652 -#: ../src/guestfs-actions.pod:9685 ../src/guestfs-actions.pod:9766 -#: ../src/guestfs-actions.pod:9789 ../src/guestfs-actions.pod:9814 -#: ../src/guestfs-actions.pod:9840 +#: ../src/guestfs-actions.pod:7835 ../src/guestfs-actions.pod:7853 +#: ../src/guestfs-actions.pod:7876 ../src/guestfs-actions.pod:7915 +#: ../src/guestfs-actions.pod:7954 ../src/guestfs-actions.pod:7979 +#: ../src/guestfs-actions.pod:7998 ../src/guestfs-actions.pod:8020 +#: ../src/guestfs-actions.pod:8041 ../src/guestfs-actions.pod:8060 +#: ../src/guestfs-actions.pod:8077 ../src/guestfs-actions.pod:8098 +#: ../src/guestfs-actions.pod:8126 ../src/guestfs-actions.pod:8150 +#: ../src/guestfs-actions.pod:8169 ../src/guestfs-actions.pod:8185 +#: ../src/guestfs-actions.pod:8209 ../src/guestfs-actions.pod:8228 +#: ../src/guestfs-actions.pod:8243 ../src/guestfs-actions.pod:8262 +#: ../src/guestfs-actions.pod:8306 ../src/guestfs-actions.pod:8333 +#: ../src/guestfs-actions.pod:8363 ../src/guestfs-actions.pod:8488 +#: ../src/guestfs-actions.pod:8498 ../src/guestfs-actions.pod:8619 +#: ../src/guestfs-actions.pod:8631 ../src/guestfs-actions.pod:8644 +#: ../src/guestfs-actions.pod:8657 ../src/guestfs-actions.pod:8679 +#: ../src/guestfs-actions.pod:8692 ../src/guestfs-actions.pod:8705 +#: ../src/guestfs-actions.pod:8718 ../src/guestfs-actions.pod:8733 +#: ../src/guestfs-actions.pod:8792 ../src/guestfs-actions.pod:8809 +#: ../src/guestfs-actions.pod:8825 ../src/guestfs-actions.pod:8841 +#: ../src/guestfs-actions.pod:8858 ../src/guestfs-actions.pod:8871 +#: ../src/guestfs-actions.pod:8891 ../src/guestfs-actions.pod:8991 +#: ../src/guestfs-actions.pod:9049 ../src/guestfs-actions.pod:9063 +#: ../src/guestfs-actions.pod:9104 ../src/guestfs-actions.pod:9117 +#: ../src/guestfs-actions.pod:9139 ../src/guestfs-actions.pod:9177 +#: ../src/guestfs-actions.pod:9211 ../src/guestfs-actions.pod:9247 +#: ../src/guestfs-actions.pod:9363 ../src/guestfs-actions.pod:9378 +#: ../src/guestfs-actions.pod:9392 ../src/guestfs-actions.pod:9466 +#: ../src/guestfs-actions.pod:9479 ../src/guestfs-actions.pod:9524 +#: ../src/guestfs-actions.pod:9564 ../src/guestfs-actions.pod:9622 +#: ../src/guestfs-actions.pod:9639 ../src/guestfs-actions.pod:9659 +#: ../src/guestfs-actions.pod:9692 ../src/guestfs-actions.pod:9773 +#: ../src/guestfs-actions.pod:9796 ../src/guestfs-actions.pod:9821 +#: ../src/guestfs-actions.pod:9847 msgid "This function returns 0 on success or -1 on error." msgstr "ć“ć®é–¢ę•°ćÆć€ęˆåŠŸć®ćØć 0 ć‚’ć€ć‚Øćƒ©ćƒ¼ć®ćØć -1 を返します。" @@ -33211,10 +33230,10 @@ msgstr "ć“ć®é–¢ę•°ćÆć€ęˆåŠŸć®ćØć 0 ć‚’ć€ć‚Øćƒ©ćƒ¼ć®ćØć -1 ć‚’čæ” #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:2820 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3182 #: ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4730 -#: ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7848 -#: ../src/guestfs-actions.pod:8072 ../src/guestfs-actions.pod:8223 -#: ../src/guestfs-actions.pod:8728 ../src/guestfs-actions.pod:8853 -#: ../src/guestfs-actions.pod:9559 +#: ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7855 +#: ../src/guestfs-actions.pod:8079 ../src/guestfs-actions.pod:8230 +#: ../src/guestfs-actions.pod:8735 ../src/guestfs-actions.pod:8860 +#: ../src/guestfs-actions.pod:9566 msgid "(Added in 0.3)" msgstr "(0.3 ć«ćŠć„ć¦čæ½åŠ )" @@ -33250,8 +33269,8 @@ msgstr "" #: ../src/guestfs-actions.pod:5969 ../src/guestfs-actions.pod:6082 #: ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6409 #: ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6732 -#: ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7881 -#: ../src/guestfs-actions.pod:8895 ../src/guestfs-actions.pod:9120 +#: ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7888 +#: ../src/guestfs-actions.pod:8902 ../src/guestfs-actions.pod:9127 msgid "" "You may supply a list of optional arguments to this call. Use zero or more " "of the following pairs of parameters, and terminate the list with C<-1> on " @@ -33308,9 +33327,9 @@ msgstr "" #: ../src/guestfs-actions.pod:5537 ../src/guestfs-actions.pod:6623 #: ../src/guestfs-actions.pod:6644 ../src/guestfs-actions.pod:6971 #: ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7403 -#: ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9083 -#: ../src/guestfs-actions.pod:9570 ../src/guestfs-actions.pod:9583 -#: ../src/guestfs-actions.pod:9596 +#: ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9090 +#: ../src/guestfs-actions.pod:9577 ../src/guestfs-actions.pod:9590 +#: ../src/guestfs-actions.pod:9603 msgid "On error this function returns -1." msgstr "ć“ć®é–¢ę•°ćÆć‚Øćƒ©ćƒ¼ć®ćØć -1 を返します。" @@ -33367,9 +33386,9 @@ msgstr "ć“ć‚ŒćÆ L 恮 \"va_list variant\" 恧恙怂" #: ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6723 #: ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:6773 #: ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6855 -#: ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:7934 -#: ../src/guestfs-actions.pod:8997 ../src/guestfs-actions.pod:9008 -#: ../src/guestfs-actions.pod:9144 ../src/guestfs-actions.pod:9154 +#: ../src/guestfs-actions.pod:7929 ../src/guestfs-actions.pod:7941 +#: ../src/guestfs-actions.pod:9004 ../src/guestfs-actions.pod:9015 +#: ../src/guestfs-actions.pod:9151 ../src/guestfs-actions.pod:9161 msgid "See L." msgstr "L å‚ē…§ć€‚" @@ -33793,11 +33812,11 @@ msgstr "" #: ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6989 #: ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7378 #: ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7605 -#: ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8390 -#: ../src/guestfs-actions.pod:8414 ../src/guestfs-actions.pod:8438 -#: ../src/guestfs-actions.pod:9299 ../src/guestfs-actions.pod:9318 -#: ../src/guestfs-actions.pod:9336 ../src/guestfs-actions.pod:9529 -#: ../src/guestfs-actions.pod:9904 +#: ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8397 +#: ../src/guestfs-actions.pod:8421 ../src/guestfs-actions.pod:8445 +#: ../src/guestfs-actions.pod:9306 ../src/guestfs-actions.pod:9325 +#: ../src/guestfs-actions.pod:9343 ../src/guestfs-actions.pod:9536 +#: ../src/guestfs-actions.pod:9911 msgid "" "This function returns a string, or NULL on error. I." @@ -33932,13 +33951,13 @@ msgstr "" #: ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5455 #: ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7350 #: ../src/guestfs-actions.pod:7476 ../src/guestfs-actions.pod:7590 -#: ../src/guestfs-actions.pod:8454 ../src/guestfs-actions.pod:8538 -#: ../src/guestfs-actions.pod:8593 ../src/guestfs-actions.pod:8739 -#: ../src/guestfs-actions.pod:8763 ../src/guestfs-actions.pod:9403 -#: ../src/guestfs-actions.pod:9442 ../src/guestfs-actions.pod:9489 -#: ../src/guestfs-actions.pod:9719 ../src/guestfs-actions.pod:9738 -#: ../src/guestfs-actions.pod:9854 ../src/guestfs-actions.pod:9873 -#: ../src/guestfs-actions.pod:9919 ../src/guestfs-actions.pod:9938 +#: ../src/guestfs-actions.pod:8461 ../src/guestfs-actions.pod:8545 +#: ../src/guestfs-actions.pod:8600 ../src/guestfs-actions.pod:8746 +#: ../src/guestfs-actions.pod:8770 ../src/guestfs-actions.pod:9410 +#: ../src/guestfs-actions.pod:9449 ../src/guestfs-actions.pod:9496 +#: ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 +#: ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 +#: ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 msgid "" "This function returns a NULL-terminated array of strings (like L), or NULL if there was an error. I, where " @@ -34946,7 +34965,7 @@ msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9321 +#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9328 msgid "(Added in 1.0.75)" msgstr "(1.0.75 ć«ćŠć„ć¦čæ½åŠ )" @@ -34983,8 +35002,8 @@ msgstr "" #: ../src/guestfs-actions.pod:4922 ../src/guestfs-actions.pod:4939 #: ../src/guestfs-actions.pod:5043 ../src/guestfs-actions.pod:5459 #: ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:7354 -#: ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9493 -#: ../src/guestfs-actions.pod:9507 +#: ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9500 +#: ../src/guestfs-actions.pod:9514 msgid "(Added in 0.4)" msgstr "(0.4 ć«ćŠć„ć¦čæ½åŠ )" @@ -35027,7 +35046,7 @@ msgstr "" #: ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:2001 #: ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:4504 #: ../src/guestfs-actions.pod:4565 ../src/guestfs-actions.pod:4592 -#: ../src/guestfs-actions.pod:9177 +#: ../src/guestfs-actions.pod:9184 msgid "(Added in 1.0.2)" msgstr "(1.0.2 ć«ćŠć„ć¦čæ½åŠ )" @@ -35064,8 +35083,8 @@ msgstr "" #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:6785 #: ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:6955 #: ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:7155 -#: ../src/guestfs-actions.pod:9044 ../src/guestfs-actions.pod:9058 -#: ../src/guestfs-actions.pod:9519 +#: ../src/guestfs-actions.pod:9051 ../src/guestfs-actions.pod:9065 +#: ../src/guestfs-actions.pod:9526 msgid "(Added in 1.3.2)" msgstr "(1.3.2 ć«ćŠć„ć¦čæ½åŠ )" @@ -35253,7 +35272,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1543 -#: ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8180 +#: ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8187 msgid "(Added in 1.13.15)" msgstr "(1.13.15 ć«ćŠć„ć¦čæ½åŠ )" @@ -35489,9 +35508,9 @@ msgstr "" #: ../src/guestfs-actions.pod:1847 ../src/guestfs-actions.pod:1996 #: ../src/guestfs-actions.pod:2027 ../src/guestfs-actions.pod:2072 #: ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2561 -#: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9172 -#: ../src/guestfs-actions.pod:9206 ../src/guestfs-actions.pod:9768 -#: ../src/guestfs-actions.pod:9791 ../src/guestfs-actions.pod:9816 +#: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9179 +#: ../src/guestfs-actions.pod:9213 ../src/guestfs-actions.pod:9775 +#: ../src/guestfs-actions.pod:9798 ../src/guestfs-actions.pod:9823 msgid "" "This long-running command can generate progress notification messages so " "that the caller can display a progress bar or indicator. To receive these " @@ -35892,8 +35911,8 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:5486 -#: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9407 -#: ../src/guestfs-actions.pod:9446 ../src/guestfs-actions.pod:9532 +#: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9414 +#: ../src/guestfs-actions.pod:9453 ../src/guestfs-actions.pod:9539 msgid "(Added in 1.0.87)" msgstr "(1.0.87 ć«ćŠć„ć¦čæ½åŠ )" @@ -36033,9 +36052,9 @@ msgstr "" #: ../src/guestfs-actions.pod:2077 ../src/guestfs-actions.pod:3377 #: ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3469 #: ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:6509 -#: ../src/guestfs-actions.pod:8746 ../src/guestfs-actions.pod:8770 -#: ../src/guestfs-actions.pod:9572 ../src/guestfs-actions.pod:9585 -#: ../src/guestfs-actions.pod:9598 +#: ../src/guestfs-actions.pod:8753 ../src/guestfs-actions.pod:8777 +#: ../src/guestfs-actions.pod:9579 ../src/guestfs-actions.pod:9592 +#: ../src/guestfs-actions.pod:9605 msgid "(Added in 1.0.54)" msgstr "(1.0.54 ć«ćŠć„ć¦čæ½åŠ )" @@ -36146,7 +36165,7 @@ msgid "See also C, C." msgstr "C, C å‚ē…§ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9211 +#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9218 msgid "(Added in 1.5.17)" msgstr "(1.5.17 ć«ćŠć„ć¦čæ½åŠ )" @@ -36337,7 +36356,7 @@ msgstr "C å‚ē…§ć€‚" #. type: textblock #: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:3159 -#: ../src/guestfs-actions.pod:8204 +#: ../src/guestfs-actions.pod:8211 msgid "(Added in 1.0.69)" msgstr "(1.0.69 ć«ćŠć„ć¦čæ½åŠ )" @@ -36373,13 +36392,13 @@ msgstr "" #: ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4995 #: ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:6303 #: ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7608 -#: ../src/guestfs-actions.pod:8614 ../src/guestfs-actions.pod:8626 -#: ../src/guestfs-actions.pod:8639 ../src/guestfs-actions.pod:8652 -#: ../src/guestfs-actions.pod:8674 ../src/guestfs-actions.pod:8687 -#: ../src/guestfs-actions.pod:8700 ../src/guestfs-actions.pod:8713 -#: ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 -#: ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 -#: ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 +#: ../src/guestfs-actions.pod:8621 ../src/guestfs-actions.pod:8633 +#: ../src/guestfs-actions.pod:8646 ../src/guestfs-actions.pod:8659 +#: ../src/guestfs-actions.pod:8681 ../src/guestfs-actions.pod:8694 +#: ../src/guestfs-actions.pod:8707 ../src/guestfs-actions.pod:8720 +#: ../src/guestfs-actions.pod:9733 ../src/guestfs-actions.pod:9752 +#: ../src/guestfs-actions.pod:9868 ../src/guestfs-actions.pod:9887 +#: ../src/guestfs-actions.pod:9933 ../src/guestfs-actions.pod:9952 msgid "(Added in 1.0.66)" msgstr "(1.0.66 ć«ćŠć„ć¦čæ½åŠ )" @@ -36899,7 +36918,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9773 +#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9780 msgid "(Added in 1.0.16)" msgstr "(1.0.16 ć«ćŠć„ć¦čæ½åŠ )" @@ -37012,10 +37031,10 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:7321 -#: ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8358 -#: ../src/guestfs-actions.pod:8377 ../src/guestfs-actions.pod:8393 -#: ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:9358 -#: ../src/guestfs-actions.pod:9373 ../src/guestfs-actions.pod:9842 +#: ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8365 +#: ../src/guestfs-actions.pod:8384 ../src/guestfs-actions.pod:8400 +#: ../src/guestfs-actions.pod:8424 ../src/guestfs-actions.pod:9365 +#: ../src/guestfs-actions.pod:9380 ../src/guestfs-actions.pod:9849 msgid "(Added in 1.0.26)" msgstr "(1.0.26 ć«ćŠć„ć¦čæ½åŠ )" @@ -37042,7 +37061,7 @@ msgid "Return the current attach method. See C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7830 +#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7837 msgid "(Added in 1.9.8)" msgstr "(1.9.8 ć«ćŠć„ć¦čæ½åŠ )" @@ -37081,7 +37100,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7871 +#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7878 msgid "(Added in 1.0.72)" msgstr "(1.0.72 ć«ćŠć„ć¦čæ½åŠ )" @@ -37118,7 +37137,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2970 -#: ../src/guestfs-actions.pod:7910 ../src/guestfs-actions.pod:7949 +#: ../src/guestfs-actions.pod:7917 ../src/guestfs-actions.pod:7956 msgid "(Added in 1.17.31)" msgstr "(1.17.31 にて追加)" @@ -37176,7 +37195,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2991 ../src/guestfs-actions.pod:3012 -#: ../src/guestfs-actions.pod:7974 ../src/guestfs-actions.pod:7993 +#: ../src/guestfs-actions.pod:7981 ../src/guestfs-actions.pod:8000 msgid "(Added in 1.0.15)" msgstr "(1.0.15 ć«ćŠć„ć¦čæ½åŠ )" @@ -37238,8 +37257,8 @@ msgstr "" #: ../src/guestfs-actions.pod:6208 ../src/guestfs-actions.pod:6227 #: ../src/guestfs-actions.pod:6246 ../src/guestfs-actions.pod:6258 #: ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6288 -#: ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8036 -#: ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:9085 +#: ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8043 +#: ../src/guestfs-actions.pod:8335 ../src/guestfs-actions.pod:9092 msgid "(Added in 1.0.55)" msgstr "(1.0.55 ć«ćŠć„ć¦čæ½åŠ )" @@ -37261,7 +37280,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8055 +#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8062 msgid "(Added in 1.5.4)" msgstr "(1.5.4 ć«ćŠć„ć¦čæ½åŠ )" @@ -37307,8 +37326,8 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8093 -#: ../src/guestfs-actions.pod:9657 +#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8100 +#: ../src/guestfs-actions.pod:9664 msgid "(Added in 1.11.18)" msgstr "(1.11.18 ć«ćŠć„ć¦čæ½åŠ )" @@ -37352,7 +37371,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8121 +#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8128 msgid "(Added in 1.0.6)" msgstr "(1.0.6 ć«ćŠć„ć¦čæ½åŠ )" @@ -37377,9 +37396,9 @@ msgstr "" #: ../src/guestfs-actions.pod:3108 ../src/guestfs-actions.pod:4750 #: ../src/guestfs-actions.pod:5110 ../src/guestfs-actions.pod:5521 #: ../src/guestfs-actions.pod:5784 ../src/guestfs-actions.pod:7251 -#: ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8145 -#: ../src/guestfs-actions.pod:8866 ../src/guestfs-actions.pod:8886 -#: ../src/guestfs-actions.pod:9242 +#: ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8152 +#: ../src/guestfs-actions.pod:8873 ../src/guestfs-actions.pod:8893 +#: ../src/guestfs-actions.pod:9249 msgid "(Added in 1.0.77)" msgstr "(1.0.77 ć«ćŠć„ć¦čæ½åŠ )" @@ -37409,7 +37428,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:3197 -#: ../src/guestfs-actions.pod:8164 ../src/guestfs-actions.pod:8238 +#: ../src/guestfs-actions.pod:8171 ../src/guestfs-actions.pod:8245 msgid "(Added in 1.0.67)" msgstr "(1.0.67 ć«ćŠć„ć¦čæ½åŠ )" @@ -37580,7 +37599,7 @@ msgstr "関連項目: C, C, L" #: ../src/guestfs-actions.pod:3223 ../src/guestfs-actions.pod:3440 #: ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:4776 #: ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7270 -#: ../src/guestfs-actions.pod:7451 ../src/guestfs-actions.pod:9422 +#: ../src/guestfs-actions.pod:7451 ../src/guestfs-actions.pod:9429 msgid "" "This function returns a buffer, or NULL on error. The size of the returned " "buffer is written to C<*size_r>. I, or NULL if there was an " "error. I after use>." @@ -39595,8 +39614,8 @@ msgstr "" "å‘¼ć³å‡ŗć—å…ƒćÆä½æē”Øå¾Œć« C ć‚’å‘¼ć³å‡ŗć™åæ…č¦ćŒć‚ć‚Šć¾ć™>怂" #. type: textblock -#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8509 -#: ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:9030 +#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8516 +#: ../src/guestfs-actions.pod:8534 ../src/guestfs-actions.pod:9037 msgid "(Added in 0.9.2)" msgstr "(0.9.2 ć«ćŠć„ć¦čæ½åŠ )" @@ -39925,7 +39944,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9821 +#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9828 msgid "(Added in 1.17.18)" msgstr "(1.17.18 にて追加)" @@ -40039,7 +40058,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:7308 -#: ../src/guestfs-actions.pod:9461 +#: ../src/guestfs-actions.pod:9468 msgid "(Added in 1.0.13)" msgstr "(1.0.13 ć«ćŠć„ć¦čæ½åŠ )" @@ -40065,7 +40084,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9474 +#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9481 msgid "(Added in 1.0.83)" msgstr "(1.0.83 ć«ćŠć„ć¦čæ½åŠ )" @@ -41411,7 +41430,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6494 -#: ../src/guestfs-actions.pod:9134 +#: ../src/guestfs-actions.pod:9141 msgid "(Added in 1.17.22)" msgstr "(1.17.22 にて追加)" @@ -41779,7 +41798,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6699 -#: ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8015 +#: ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8022 msgid "(Added in 1.17.9)" msgstr "(1.17.9 ć«ćŠć„ć¦čæ½åŠ )" @@ -42139,7 +42158,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6876 ../src/guestfs-actions.pod:7335 #: ../src/guestfs-actions.pod:7408 ../src/guestfs-actions.pod:7676 -#: ../src/guestfs-actions.pod:9637 +#: ../src/guestfs-actions.pod:9644 msgid "(Added in 1.3.14)" msgstr "(1.3.14 ć«ćŠć„ć¦čæ½åŠ )" @@ -43273,12 +43292,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:7832 +#: ../src/guestfs-actions.pod:7839 msgid "guestfs_set_autosync" msgstr "guestfs_set_autosync" #. type: verbatim -#: ../src/guestfs-actions.pod:7834 +#: ../src/guestfs-actions.pod:7841 #, no-wrap msgid "" " int\n" @@ -43292,12 +43311,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:7850 +#: ../src/guestfs-actions.pod:7857 msgid "guestfs_set_direct" msgstr "guestfs_set_direct" #. type: verbatim -#: ../src/guestfs-actions.pod:7852 +#: ../src/guestfs-actions.pod:7859 #, no-wrap msgid "" " int\n" @@ -43311,7 +43330,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7860 +#: ../src/guestfs-actions.pod:7867 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by C, but go straight to " @@ -43319,12 +43338,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7873 +#: ../src/guestfs-actions.pod:7880 msgid "guestfs_set_e2attrs" msgstr "guestfs_set_e2attrs" #. type: verbatim -#: ../src/guestfs-actions.pod:7875 +#: ../src/guestfs-actions.pod:7882 #, no-wrap msgid "" " int\n" @@ -43342,7 +43361,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:7886 +#: ../src/guestfs-actions.pod:7893 #, no-wrap msgid "" " GUESTFS_SET_E2ATTRS_CLEAR, int clear,\n" @@ -43352,7 +43371,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7891 +#: ../src/guestfs-actions.pod:7898 msgid "" "C is a string of characters representing file attributes. See " "C for a list of possible attributes. Not all " @@ -43363,12 +43382,12 @@ msgstr "" "ć‚Šć¾ć›ć‚“ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:7912 +#: ../src/guestfs-actions.pod:7919 msgid "guestfs_set_e2attrs_va" msgstr "guestfs_set_e2attrs_va" #. type: verbatim -#: ../src/guestfs-actions.pod:7914 +#: ../src/guestfs-actions.pod:7921 #, no-wrap msgid "" " int\n" @@ -43386,17 +43405,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7920 +#: ../src/guestfs-actions.pod:7927 msgid "This is the \"va_list variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"va_list variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:7924 +#: ../src/guestfs-actions.pod:7931 msgid "guestfs_set_e2attrs_argv" msgstr "guestfs_set_e2attrs_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:7926 +#: ../src/guestfs-actions.pod:7933 #, no-wrap msgid "" " int\n" @@ -43414,17 +43433,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7932 +#: ../src/guestfs-actions.pod:7939 msgid "This is the \"argv variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"argv variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:7936 +#: ../src/guestfs-actions.pod:7943 msgid "guestfs_set_e2generation" msgstr "guestfs_set_e2generation" #. type: verbatim -#: ../src/guestfs-actions.pod:7938 +#: ../src/guestfs-actions.pod:7945 #, no-wrap msgid "" " int\n" @@ -43440,17 +43459,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7945 +#: ../src/guestfs-actions.pod:7952 msgid "See C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:7951 +#: ../src/guestfs-actions.pod:7958 msgid "guestfs_set_e2label" msgstr "guestfs_set_e2label" #. type: verbatim -#: ../src/guestfs-actions.pod:7953 +#: ../src/guestfs-actions.pod:7960 #, no-wrap msgid "" " int\n" @@ -43466,7 +43485,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7958 +#: ../src/guestfs-actions.pod:7965 msgid "" "I In new code, use the L " "call instead." @@ -43475,19 +43494,19 @@ msgstr "" "guestfs_set_label> ć‚’ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:7969 +#: ../src/guestfs-actions.pod:7976 msgid "" "You can use either C or C to return " "the existing label on a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7976 +#: ../src/guestfs-actions.pod:7983 msgid "guestfs_set_e2uuid" msgstr "guestfs_set_e2uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:7978 +#: ../src/guestfs-actions.pod:7985 #, no-wrap msgid "" " int\n" @@ -43503,19 +43522,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7988 +#: ../src/guestfs-actions.pod:7995 msgid "" "You can use either C or C to return " "the existing UUID of a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7995 +#: ../src/guestfs-actions.pod:8002 msgid "guestfs_set_label" msgstr "guestfs_set_label" #. type: verbatim -#: ../src/guestfs-actions.pod:7997 +#: ../src/guestfs-actions.pod:8004 #, no-wrap msgid "" " int\n" @@ -43531,19 +43550,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8011 +#: ../src/guestfs-actions.pod:8018 msgid "To read the label on a filesystem, call C." msgstr "" "ćƒ•ć‚”ć‚¤ćƒ«ć‚·ć‚¹ćƒ†ćƒ ć«ć‚ć‚‹ćƒ©ćƒ™ćƒ«ć‚’čŖ­ćæč¾¼ć‚€ć«ćÆ C を呼び出しま" "恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:8017 +#: ../src/guestfs-actions.pod:8024 msgid "guestfs_set_memsize" msgstr "guestfs_set_memsize" #. type: verbatim -#: ../src/guestfs-actions.pod:8019 +#: ../src/guestfs-actions.pod:8026 #, no-wrap msgid "" " int\n" @@ -43557,19 +43576,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8023 +#: ../src/guestfs-actions.pod:8030 msgid "" "This sets the memory size in megabytes allocated to the qemu subprocess. " "This only has any effect if called before C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8038 +#: ../src/guestfs-actions.pod:8045 msgid "guestfs_set_network" msgstr "guestfs_set_network" #. type: verbatim -#: ../src/guestfs-actions.pod:8040 +#: ../src/guestfs-actions.pod:8047 #, no-wrap msgid "" " int\n" @@ -43583,19 +43602,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8050 +#: ../src/guestfs-actions.pod:8057 msgid "" "You must call this before calling C, otherwise it has no " "effect." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8057 +#: ../src/guestfs-actions.pod:8064 msgid "guestfs_set_path" msgstr "guestfs_set_path" #. type: verbatim -#: ../src/guestfs-actions.pod:8059 +#: ../src/guestfs-actions.pod:8066 #, no-wrap msgid "" " int\n" @@ -43609,12 +43628,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8074 +#: ../src/guestfs-actions.pod:8081 msgid "guestfs_set_pgroup" msgstr "guestfs_set_pgroup" #. type: verbatim -#: ../src/guestfs-actions.pod:8076 +#: ../src/guestfs-actions.pod:8083 #, no-wrap msgid "" " int\n" @@ -43628,7 +43647,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8086 +#: ../src/guestfs-actions.pod:8093 msgid "" "The default for this flag is false, because usually you want C<^C> to kill " "the subprocess. Guestfish sets this flag to true when used interactively, " @@ -43637,12 +43656,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8095 +#: ../src/guestfs-actions.pod:8102 msgid "guestfs_set_qemu" msgstr "guestfs_set_qemu" #. type: verbatim -#: ../src/guestfs-actions.pod:8097 +#: ../src/guestfs-actions.pod:8104 #, no-wrap msgid "" " int\n" @@ -43656,12 +43675,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8123 +#: ../src/guestfs-actions.pod:8130 msgid "guestfs_set_recovery_proc" msgstr "guestfs_set_recovery_proc" #. type: verbatim -#: ../src/guestfs-actions.pod:8125 +#: ../src/guestfs-actions.pod:8132 #, no-wrap msgid "" " int\n" @@ -43675,7 +43694,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8129 +#: ../src/guestfs-actions.pod:8136 msgid "" "If this is called with the parameter C then C does " "not create a recovery process. The purpose of the recovery process is to " @@ -43684,19 +43703,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8134 +#: ../src/guestfs-actions.pod:8141 msgid "" "This only has any effect if called before C, and the default " "is true." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8147 +#: ../src/guestfs-actions.pod:8154 msgid "guestfs_set_selinux" msgstr "guestfs_set_selinux" #. type: verbatim -#: ../src/guestfs-actions.pod:8149 +#: ../src/guestfs-actions.pod:8156 #, no-wrap msgid "" " int\n" @@ -43710,12 +43729,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8166 +#: ../src/guestfs-actions.pod:8173 msgid "guestfs_set_smp" msgstr "guestfs_set_smp" #. type: verbatim -#: ../src/guestfs-actions.pod:8168 +#: ../src/guestfs-actions.pod:8175 #, no-wrap msgid "" " int\n" @@ -43729,17 +43748,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8176 +#: ../src/guestfs-actions.pod:8183 msgid "This function must be called before C." msgstr "この関数は C ć®å‰ć«å‘¼ć³å‡ŗć™åæ…č¦ćŒć‚ć‚Šć¾ć™ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:8182 +#: ../src/guestfs-actions.pod:8189 msgid "guestfs_set_trace" msgstr "guestfs_set_trace" #. type: verbatim -#: ../src/guestfs-actions.pod:8184 +#: ../src/guestfs-actions.pod:8191 #, no-wrap msgid "" " int\n" @@ -43753,19 +43772,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8198 +#: ../src/guestfs-actions.pod:8205 msgid "" "Trace messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8206 +#: ../src/guestfs-actions.pod:8213 msgid "guestfs_set_verbose" msgstr "guestfs_set_verbose" #. type: verbatim -#: ../src/guestfs-actions.pod:8208 +#: ../src/guestfs-actions.pod:8215 #, no-wrap msgid "" " int\n" @@ -43779,19 +43798,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8217 +#: ../src/guestfs-actions.pod:8224 msgid "" "Verbose messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8225 +#: ../src/guestfs-actions.pod:8232 msgid "guestfs_setcon" msgstr "guestfs_setcon" #. type: verbatim -#: ../src/guestfs-actions.pod:8227 +#: ../src/guestfs-actions.pod:8234 #, no-wrap msgid "" " int\n" @@ -43805,12 +43824,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8240 +#: ../src/guestfs-actions.pod:8247 msgid "guestfs_setxattr" msgstr "guestfs_setxattr" #. type: verbatim -#: ../src/guestfs-actions.pod:8242 +#: ../src/guestfs-actions.pod:8249 #, no-wrap msgid "" " int\n" @@ -43830,17 +43849,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8253 +#: ../src/guestfs-actions.pod:8260 msgid "See also: C, L." msgstr "関連項目: C, L" #. type: =head2 -#: ../src/guestfs-actions.pod:8259 +#: ../src/guestfs-actions.pod:8266 msgid "guestfs_sfdisk" msgstr "guestfs_sfdisk" #. type: verbatim -#: ../src/guestfs-actions.pod:8261 +#: ../src/guestfs-actions.pod:8268 #, no-wrap msgid "" " int\n" @@ -43862,8 +43881,8 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8310 -#: ../src/guestfs-actions.pod:8341 +#: ../src/guestfs-actions.pod:8276 ../src/guestfs-actions.pod:8317 +#: ../src/guestfs-actions.pod:8348 msgid "" "I In new code, use the L " "call instead." @@ -43872,19 +43891,19 @@ msgstr "" "guestfs_part_add> ć‚’ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:8296 +#: ../src/guestfs-actions.pod:8303 msgid "" "See also: C, C, C" msgstr "" "関連項目: C, C, C" #. type: =head2 -#: ../src/guestfs-actions.pod:8303 +#: ../src/guestfs-actions.pod:8310 msgid "guestfs_sfdiskM" msgstr "guestfs_sfdiskM" #. type: verbatim -#: ../src/guestfs-actions.pod:8305 +#: ../src/guestfs-actions.pod:8312 #, no-wrap msgid "" " int\n" @@ -43900,7 +43919,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8317 +#: ../src/guestfs-actions.pod:8324 msgid "" "This is a simplified interface to the C command, where " "partition sizes are specified in megabytes only (rounded to the nearest " @@ -43909,7 +43928,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8323 +#: ../src/guestfs-actions.pod:8330 msgid "" "See also: C, the L manpage and " "C" @@ -43918,12 +43937,12 @@ msgstr "" "C" #. type: =head2 -#: ../src/guestfs-actions.pod:8330 +#: ../src/guestfs-actions.pod:8337 msgid "guestfs_sfdisk_N" msgstr "guestfs_sfdisk_N" #. type: verbatim -#: ../src/guestfs-actions.pod:8332 +#: ../src/guestfs-actions.pod:8339 #, no-wrap msgid "" " int\n" @@ -43947,24 +43966,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8351 +#: ../src/guestfs-actions.pod:8358 msgid "" "For other parameters, see C. You should usually pass C<0> " "for the cyls/heads/sectors parameters." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8354 +#: ../src/guestfs-actions.pod:8361 msgid "See also: C" msgstr "関連項目: C" #. type: =head2 -#: ../src/guestfs-actions.pod:8360 +#: ../src/guestfs-actions.pod:8367 msgid "guestfs_sfdisk_disk_geometry" msgstr "guestfs_sfdisk_disk_geometry" #. type: verbatim -#: ../src/guestfs-actions.pod:8362 +#: ../src/guestfs-actions.pod:8369 #, no-wrap msgid "" " char *\n" @@ -43978,7 +43997,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8366 +#: ../src/guestfs-actions.pod:8373 msgid "" "This displays the disk geometry of C read from the partition table. " "Especially in the case where the underlying block device has been resized, " @@ -43987,12 +44006,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8379 +#: ../src/guestfs-actions.pod:8386 msgid "guestfs_sfdisk_kernel_geometry" msgstr "guestfs_sfdisk_kernel_geometry" #. type: verbatim -#: ../src/guestfs-actions.pod:8381 +#: ../src/guestfs-actions.pod:8388 #, no-wrap msgid "" " char *\n" @@ -44006,12 +44025,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8395 +#: ../src/guestfs-actions.pod:8402 msgid "guestfs_sfdisk_l" msgstr "guestfs_sfdisk_l" #. type: verbatim -#: ../src/guestfs-actions.pod:8397 +#: ../src/guestfs-actions.pod:8404 #, no-wrap msgid "" " char *\n" @@ -44025,7 +44044,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8401 +#: ../src/guestfs-actions.pod:8408 msgid "" "I In new code, use the L " "call instead." @@ -44034,17 +44053,17 @@ msgstr "" "guestfs_part_list> ć‚’ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:8412 +#: ../src/guestfs-actions.pod:8419 msgid "See also: C" msgstr "関連項目: C" #. type: =head2 -#: ../src/guestfs-actions.pod:8419 +#: ../src/guestfs-actions.pod:8426 msgid "guestfs_sh" msgstr "guestfs_sh" #. type: verbatim -#: ../src/guestfs-actions.pod:8421 +#: ../src/guestfs-actions.pod:8428 #, no-wrap msgid "" " char *\n" @@ -44058,22 +44077,22 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8428 +#: ../src/guestfs-actions.pod:8435 msgid "This is like C, but passes the command to:" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8436 +#: ../src/guestfs-actions.pod:8443 msgid "All the provisos about C apply to this call." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8443 +#: ../src/guestfs-actions.pod:8450 msgid "guestfs_sh_lines" msgstr "guestfs_sh_lines" #. type: verbatim -#: ../src/guestfs-actions.pod:8445 +#: ../src/guestfs-actions.pod:8452 #, no-wrap msgid "" " char **\n" @@ -44087,24 +44106,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8449 +#: ../src/guestfs-actions.pod:8456 msgid "" "This is the same as C, but splits the result into a list of " "lines." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8452 +#: ../src/guestfs-actions.pod:8459 msgid "See also: C" msgstr "関連項目: C" #. type: =head2 -#: ../src/guestfs-actions.pod:8460 +#: ../src/guestfs-actions.pod:8467 msgid "guestfs_shutdown" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8462 +#: ../src/guestfs-actions.pod:8469 #, no-wrap msgid "" " int\n" @@ -44113,7 +44132,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8465 +#: ../src/guestfs-actions.pod:8472 msgid "" "This is the opposite of C. It performs an orderly shutdown " "of the backend process(es). If the autosync flag is set (which is the " @@ -44121,26 +44140,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8475 +#: ../src/guestfs-actions.pod:8482 msgid "" "This call does I close or free up the handle. You still need to call " "C afterwards." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8478 +#: ../src/guestfs-actions.pod:8485 msgid "" "C will call this if you don't do it explicitly, but note that " "any errors are ignored in that case." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8483 +#: ../src/guestfs-actions.pod:8490 msgid "guestfs_sleep" msgstr "guestfs_sleep" #. type: verbatim -#: ../src/guestfs-actions.pod:8485 +#: ../src/guestfs-actions.pod:8492 #, no-wrap msgid "" " int\n" @@ -44154,17 +44173,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8493 +#: ../src/guestfs-actions.pod:8500 msgid "(Added in 1.0.41)" msgstr "(1.0.41 ć«ćŠć„ć¦čæ½åŠ )" #. type: =head2 -#: ../src/guestfs-actions.pod:8495 ../src/guestfs-structs.pod:109 +#: ../src/guestfs-actions.pod:8502 ../src/guestfs-structs.pod:109 msgid "guestfs_stat" msgstr "guestfs_stat" #. type: verbatim -#: ../src/guestfs-actions.pod:8497 +#: ../src/guestfs-actions.pod:8504 #, no-wrap msgid "" " struct guestfs_stat *\n" @@ -44178,12 +44197,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8511 ../src/guestfs-structs.pod:135 +#: ../src/guestfs-actions.pod:8518 ../src/guestfs-structs.pod:135 msgid "guestfs_statvfs" msgstr "guestfs_statvfs" #. type: verbatim -#: ../src/guestfs-actions.pod:8513 +#: ../src/guestfs-actions.pod:8520 #, no-wrap msgid "" " struct guestfs_statvfs *\n" @@ -44197,19 +44216,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8523 +#: ../src/guestfs-actions.pod:8530 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8529 +#: ../src/guestfs-actions.pod:8536 msgid "guestfs_strings" msgstr "guestfs_strings" #. type: verbatim -#: ../src/guestfs-actions.pod:8531 +#: ../src/guestfs-actions.pod:8538 #, no-wrap msgid "" " char **\n" @@ -44223,12 +44242,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8547 +#: ../src/guestfs-actions.pod:8554 msgid "guestfs_strings_e" msgstr "guestfs_strings_e" #. type: verbatim -#: ../src/guestfs-actions.pod:8549 +#: ../src/guestfs-actions.pod:8556 #, no-wrap msgid "" " char **\n" @@ -44244,14 +44263,14 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8554 +#: ../src/guestfs-actions.pod:8561 msgid "" "This is like the C command, but allows you to specify the " "encoding of strings that are looked for in the source file C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8564 +#: ../src/guestfs-actions.pod:8571 msgid "" "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of " "ISO-8859-X (this is what C uses)." @@ -44260,12 +44279,12 @@ msgstr "" "恙) ć®ć‚ˆć†ćŖå˜äø€ć® 7 ćƒ“ćƒƒćƒˆć®ćƒć‚¤ćƒˆę–‡å­—ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:8602 +#: ../src/guestfs-actions.pod:8609 msgid "guestfs_swapoff_device" msgstr "guestfs_swapoff_device" #. type: verbatim -#: ../src/guestfs-actions.pod:8604 +#: ../src/guestfs-actions.pod:8611 #, no-wrap msgid "" " int\n" @@ -44279,7 +44298,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8608 +#: ../src/guestfs-actions.pod:8615 msgid "" "This command disables the libguestfs appliance swap device or partition " "named C. See C." @@ -44288,12 +44307,12 @@ msgstr "" "ć†åå‰ć®ćƒ‘ćƒ¼ćƒ†ć‚£ć‚·ćƒ§ćƒ³ć‚’ē„”åŠ¹ć«ć—ć¾ć™ć€‚ C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:8616 +#: ../src/guestfs-actions.pod:8623 msgid "guestfs_swapoff_file" msgstr "guestfs_swapoff_file" #. type: verbatim -#: ../src/guestfs-actions.pod:8618 +#: ../src/guestfs-actions.pod:8625 #, no-wrap msgid "" " int\n" @@ -44307,12 +44326,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8628 +#: ../src/guestfs-actions.pod:8635 msgid "guestfs_swapoff_label" msgstr "guestfs_swapoff_label" #. type: verbatim -#: ../src/guestfs-actions.pod:8630 +#: ../src/guestfs-actions.pod:8637 #, no-wrap msgid "" " int\n" @@ -44326,12 +44345,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8641 +#: ../src/guestfs-actions.pod:8648 msgid "guestfs_swapoff_uuid" msgstr "guestfs_swapoff_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:8643 +#: ../src/guestfs-actions.pod:8650 #, no-wrap msgid "" " int\n" @@ -44345,12 +44364,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8654 +#: ../src/guestfs-actions.pod:8661 msgid "guestfs_swapon_device" msgstr "guestfs_swapon_device" #. type: verbatim -#: ../src/guestfs-actions.pod:8656 +#: ../src/guestfs-actions.pod:8663 #, no-wrap msgid "" " int\n" @@ -44364,7 +44383,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8660 +#: ../src/guestfs-actions.pod:8667 msgid "" "This command enables the libguestfs appliance to use the swap device or " "partition named C. The increased memory is made available for all " @@ -44372,12 +44391,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8676 +#: ../src/guestfs-actions.pod:8683 msgid "guestfs_swapon_file" msgstr "guestfs_swapon_file" #. type: verbatim -#: ../src/guestfs-actions.pod:8678 +#: ../src/guestfs-actions.pod:8685 #, no-wrap msgid "" " int\n" @@ -44391,19 +44410,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8682 +#: ../src/guestfs-actions.pod:8689 msgid "" "This command enables swap to a file. See C for other " "notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8689 +#: ../src/guestfs-actions.pod:8696 msgid "guestfs_swapon_label" msgstr "guestfs_swapon_label" #. type: verbatim -#: ../src/guestfs-actions.pod:8691 +#: ../src/guestfs-actions.pod:8698 #, no-wrap msgid "" " int\n" @@ -44417,19 +44436,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8695 +#: ../src/guestfs-actions.pod:8702 msgid "" "This command enables swap to a labeled swap partition. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8702 +#: ../src/guestfs-actions.pod:8709 msgid "guestfs_swapon_uuid" msgstr "guestfs_swapon_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:8704 +#: ../src/guestfs-actions.pod:8711 #, no-wrap msgid "" " int\n" @@ -44443,19 +44462,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8708 +#: ../src/guestfs-actions.pod:8715 msgid "" "This command enables swap to a swap partition with the given UUID. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8715 +#: ../src/guestfs-actions.pod:8722 msgid "guestfs_sync" msgstr "guestfs_sync" #. type: verbatim -#: ../src/guestfs-actions.pod:8717 +#: ../src/guestfs-actions.pod:8724 #, no-wrap msgid "" " int\n" @@ -44467,12 +44486,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8730 +#: ../src/guestfs-actions.pod:8737 msgid "guestfs_tail" msgstr "guestfs_tail" #. type: verbatim -#: ../src/guestfs-actions.pod:8732 +#: ../src/guestfs-actions.pod:8739 #, no-wrap msgid "" " char **\n" @@ -44486,12 +44505,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8748 +#: ../src/guestfs-actions.pod:8755 msgid "guestfs_tail_n" msgstr "guestfs_tail_n" #. type: verbatim -#: ../src/guestfs-actions.pod:8750 +#: ../src/guestfs-actions.pod:8757 #, no-wrap msgid "" " char **\n" @@ -44507,12 +44526,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8772 +#: ../src/guestfs-actions.pod:8779 msgid "guestfs_tar_in" msgstr "guestfs_tar_in" #. type: verbatim -#: ../src/guestfs-actions.pod:8774 +#: ../src/guestfs-actions.pod:8781 #, no-wrap msgid "" " int\n" @@ -44528,24 +44547,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8782 +#: ../src/guestfs-actions.pod:8789 msgid "" "To upload a compressed tarball, use C or C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8787 ../src/guestfs-actions.pod:8804 -#: ../src/guestfs-actions.pod:8820 ../src/guestfs-actions.pod:8836 +#: ../src/guestfs-actions.pod:8794 ../src/guestfs-actions.pod:8811 +#: ../src/guestfs-actions.pod:8827 ../src/guestfs-actions.pod:8843 msgid "(Added in 1.0.3)" msgstr "(1.0.3 ć«ćŠć„ć¦čæ½åŠ )" #. type: =head2 -#: ../src/guestfs-actions.pod:8789 +#: ../src/guestfs-actions.pod:8796 msgid "guestfs_tar_out" msgstr "guestfs_tar_out" #. type: verbatim -#: ../src/guestfs-actions.pod:8791 +#: ../src/guestfs-actions.pod:8798 #, no-wrap msgid "" " int\n" @@ -44561,19 +44580,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8799 +#: ../src/guestfs-actions.pod:8806 msgid "" "To download a compressed tarball, use C or " "C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8806 +#: ../src/guestfs-actions.pod:8813 msgid "guestfs_tgz_in" msgstr "guestfs_tgz_in" #. type: verbatim -#: ../src/guestfs-actions.pod:8808 +#: ../src/guestfs-actions.pod:8815 #, no-wrap msgid "" " int\n" @@ -44589,18 +44608,18 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8816 +#: ../src/guestfs-actions.pod:8823 msgid "To upload an uncompressed tarball, use C." msgstr "" "éžåœ§ēø® tar ćƒ•ć‚”ć‚¤ćƒ«ć‚’ć‚¢ćƒƒćƒ—ćƒ­ćƒ¼ćƒ‰ć™ć‚‹ć«ćÆ C を使用します。" #. type: =head2 -#: ../src/guestfs-actions.pod:8822 +#: ../src/guestfs-actions.pod:8829 msgid "guestfs_tgz_out" msgstr "guestfs_tgz_out" #. type: verbatim -#: ../src/guestfs-actions.pod:8824 +#: ../src/guestfs-actions.pod:8831 #, no-wrap msgid "" " int\n" @@ -44616,18 +44635,18 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8832 +#: ../src/guestfs-actions.pod:8839 msgid "To download an uncompressed tarball, use C." msgstr "" "éžåœ§ēø® tar ćƒ•ć‚”ć‚¤ćƒ«ć‚’ćƒ€ć‚¦ćƒ³ćƒ­ćƒ¼ćƒ‰ć™ć‚‹ć«ćÆ C を使用します。" #. type: =head2 -#: ../src/guestfs-actions.pod:8838 +#: ../src/guestfs-actions.pod:8845 msgid "guestfs_touch" msgstr "guestfs_touch" #. type: verbatim -#: ../src/guestfs-actions.pod:8840 +#: ../src/guestfs-actions.pod:8847 #, no-wrap msgid "" " int\n" @@ -44641,12 +44660,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8855 +#: ../src/guestfs-actions.pod:8862 msgid "guestfs_truncate" msgstr "guestfs_truncate" #. type: verbatim -#: ../src/guestfs-actions.pod:8857 +#: ../src/guestfs-actions.pod:8864 #, no-wrap msgid "" " int\n" @@ -44660,12 +44679,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8868 +#: ../src/guestfs-actions.pod:8875 msgid "guestfs_truncate_size" msgstr "guestfs_truncate_size" #. type: verbatim -#: ../src/guestfs-actions.pod:8870 +#: ../src/guestfs-actions.pod:8877 #, no-wrap msgid "" " int\n" @@ -44681,7 +44700,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8878 +#: ../src/guestfs-actions.pod:8885 msgid "" "If the current file size is less than C then the file is extended to " "the required size with zero bytes. This creates a sparse file (ie. disk " @@ -44690,12 +44709,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8888 +#: ../src/guestfs-actions.pod:8895 msgid "guestfs_tune2fs" msgstr "guestfs_tune2fs" #. type: verbatim -#: ../src/guestfs-actions.pod:8890 +#: ../src/guestfs-actions.pod:8897 #, no-wrap msgid "" " int\n" @@ -44711,7 +44730,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:8900 +#: ../src/guestfs-actions.pod:8907 #, no-wrap msgid "" " GUESTFS_TUNE2FS_FORCE, int force,\n" @@ -44739,7 +44758,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8980 +#: ../src/guestfs-actions.pod:8987 msgid "" "To get the current values of filesystem parameters, see " "C. For precise details of how tune2fs works, see the " @@ -44747,12 +44766,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8988 +#: ../src/guestfs-actions.pod:8995 msgid "guestfs_tune2fs_va" msgstr "guestfs_tune2fs_va" #. type: verbatim -#: ../src/guestfs-actions.pod:8990 +#: ../src/guestfs-actions.pod:8997 #, no-wrap msgid "" " int\n" @@ -44768,17 +44787,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8995 +#: ../src/guestfs-actions.pod:9002 msgid "This is the \"va_list variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"va_list variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:8999 +#: ../src/guestfs-actions.pod:9006 msgid "guestfs_tune2fs_argv" msgstr "guestfs_tune2fs_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:9001 +#: ../src/guestfs-actions.pod:9008 #, no-wrap msgid "" " int\n" @@ -44794,17 +44813,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9006 +#: ../src/guestfs-actions.pod:9013 msgid "This is the \"argv variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"argv variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:9010 +#: ../src/guestfs-actions.pod:9017 msgid "guestfs_tune2fs_l" msgstr "guestfs_tune2fs_l" #. type: verbatim -#: ../src/guestfs-actions.pod:9012 +#: ../src/guestfs-actions.pod:9019 #, no-wrap msgid "" " char **\n" @@ -44818,12 +44837,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9032 +#: ../src/guestfs-actions.pod:9039 msgid "guestfs_txz_in" msgstr "guestfs_txz_in" #. type: verbatim -#: ../src/guestfs-actions.pod:9034 +#: ../src/guestfs-actions.pod:9041 #, no-wrap msgid "" " int\n" @@ -44839,12 +44858,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9046 +#: ../src/guestfs-actions.pod:9053 msgid "guestfs_txz_out" msgstr "guestfs_txz_out" #. type: verbatim -#: ../src/guestfs-actions.pod:9048 +#: ../src/guestfs-actions.pod:9055 #, no-wrap msgid "" " int\n" @@ -44860,12 +44879,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9060 +#: ../src/guestfs-actions.pod:9067 msgid "guestfs_umask" msgstr "guestfs_umask" #. type: verbatim -#: ../src/guestfs-actions.pod:9062 +#: ../src/guestfs-actions.pod:9069 #, no-wrap msgid "" " int\n" @@ -44879,7 +44898,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9078 +#: ../src/guestfs-actions.pod:9085 msgid "" "See also C, L, C, " "C." @@ -44887,12 +44906,12 @@ msgstr "" "C, L, C, C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9087 +#: ../src/guestfs-actions.pod:9094 msgid "guestfs_umount" msgstr "guestfs_umount" #. type: verbatim -#: ../src/guestfs-actions.pod:9089 +#: ../src/guestfs-actions.pod:9096 #, no-wrap msgid "" " int\n" @@ -44906,12 +44925,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9101 +#: ../src/guestfs-actions.pod:9108 msgid "guestfs_umount_all" msgstr "guestfs_umount_all" #. type: verbatim -#: ../src/guestfs-actions.pod:9103 +#: ../src/guestfs-actions.pod:9110 #, no-wrap msgid "" " int\n" @@ -44923,12 +44942,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9114 +#: ../src/guestfs-actions.pod:9121 msgid "guestfs_umount_local" msgstr "guestfs_umount_local" #. type: verbatim -#: ../src/guestfs-actions.pod:9116 +#: ../src/guestfs-actions.pod:9123 #, no-wrap msgid "" " int\n" @@ -44942,7 +44961,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:9125 +#: ../src/guestfs-actions.pod:9132 #, no-wrap msgid "" " GUESTFS_UMOUNT_LOCAL_RETRY, int retry,\n" @@ -44952,12 +44971,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9136 +#: ../src/guestfs-actions.pod:9143 msgid "guestfs_umount_local_va" msgstr "guestfs_umount_local_va" #. type: verbatim -#: ../src/guestfs-actions.pod:9138 +#: ../src/guestfs-actions.pod:9145 #, no-wrap msgid "" " int\n" @@ -44971,17 +44990,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9142 +#: ../src/guestfs-actions.pod:9149 msgid "This is the \"va_list variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"va_list variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:9146 +#: ../src/guestfs-actions.pod:9153 msgid "guestfs_umount_local_argv" msgstr "guestfs_umount_local_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:9148 +#: ../src/guestfs-actions.pod:9155 #, no-wrap msgid "" " int\n" @@ -44995,17 +45014,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9152 +#: ../src/guestfs-actions.pod:9159 msgid "This is the \"argv variant\" of L." msgstr "ć“ć‚ŒćÆ L 恮 \"argv variant\" 恧恙怂" #. type: =head2 -#: ../src/guestfs-actions.pod:9156 +#: ../src/guestfs-actions.pod:9163 msgid "guestfs_upload" msgstr "guestfs_upload" #. type: verbatim -#: ../src/guestfs-actions.pod:9158 +#: ../src/guestfs-actions.pod:9165 #, no-wrap msgid "" " int\n" @@ -45021,17 +45040,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9168 +#: ../src/guestfs-actions.pod:9175 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9179 +#: ../src/guestfs-actions.pod:9186 msgid "guestfs_upload_offset" msgstr "guestfs_upload_offset" #. type: verbatim -#: ../src/guestfs-actions.pod:9181 +#: ../src/guestfs-actions.pod:9188 #, no-wrap msgid "" " int\n" @@ -45049,7 +45068,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9197 +#: ../src/guestfs-actions.pod:9204 msgid "" "Note that there is no limit on the amount of data that can be uploaded with " "this call, unlike with C, and this call always writes the " @@ -45057,17 +45076,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9202 +#: ../src/guestfs-actions.pod:9209 msgid "See also C, C." msgstr "C, C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9213 +#: ../src/guestfs-actions.pod:9220 msgid "guestfs_utimens" msgstr "guestfs_utimens" #. type: verbatim -#: ../src/guestfs-actions.pod:9215 +#: ../src/guestfs-actions.pod:9222 #, no-wrap msgid "" " int\n" @@ -45089,12 +45108,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9244 ../src/guestfs-structs.pod:175 +#: ../src/guestfs-actions.pod:9251 ../src/guestfs-structs.pod:175 msgid "guestfs_version" msgstr "guestfs_version" #. type: verbatim -#: ../src/guestfs-actions.pod:9246 +#: ../src/guestfs-actions.pod:9253 #, no-wrap msgid "" " struct guestfs_version *\n" @@ -45106,7 +45125,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9274 +#: ../src/guestfs-actions.pod:9281 msgid "" "I Don't use this call to test for availability of features. In " "enterprise distributions we backport features from later versions into " @@ -45115,24 +45134,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9280 +#: ../src/guestfs-actions.pod:9287 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9284 +#: ../src/guestfs-actions.pod:9291 msgid "(Added in 1.0.58)" msgstr "(1.0.58 ć«ćŠć„ć¦čæ½åŠ )" #. type: =head2 -#: ../src/guestfs-actions.pod:9286 +#: ../src/guestfs-actions.pod:9293 msgid "guestfs_vfs_label" msgstr "guestfs_vfs_label" #. type: verbatim -#: ../src/guestfs-actions.pod:9288 +#: ../src/guestfs-actions.pod:9295 #, no-wrap msgid "" " char *\n" @@ -45146,24 +45165,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9297 +#: ../src/guestfs-actions.pod:9304 msgid "To find a filesystem from the label, use C." msgstr "" "ćƒ©ćƒ™ćƒ«ć‹ć‚‰ćƒ•ć‚”ć‚¤ćƒ«ć‚·ć‚¹ćƒ†ćƒ ć‚’ę¤œē“¢ć™ć‚‹ć«ćÆ C を使用しま" "恙怂" #. type: textblock -#: ../src/guestfs-actions.pod:9302 ../src/guestfs-actions.pod:9339 +#: ../src/guestfs-actions.pod:9309 ../src/guestfs-actions.pod:9346 msgid "(Added in 1.3.18)" msgstr "(1.3.18 ć«ćŠć„ć¦čæ½åŠ )" #. type: =head2 -#: ../src/guestfs-actions.pod:9304 +#: ../src/guestfs-actions.pod:9311 msgid "guestfs_vfs_type" msgstr "guestfs_vfs_type" #. type: verbatim -#: ../src/guestfs-actions.pod:9306 +#: ../src/guestfs-actions.pod:9313 #, no-wrap msgid "" " char *\n" @@ -45177,12 +45196,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9323 +#: ../src/guestfs-actions.pod:9330 msgid "guestfs_vfs_uuid" msgstr "guestfs_vfs_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:9325 +#: ../src/guestfs-actions.pod:9332 #, no-wrap msgid "" " char *\n" @@ -45196,18 +45215,18 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9334 +#: ../src/guestfs-actions.pod:9341 msgid "To find a filesystem from the UUID, use C." msgstr "" "UUID ć‹ć‚‰ćƒ•ć‚”ć‚¤ćƒ«ć‚·ć‚¹ćƒ†ćƒ ć‚’ę¤œē“¢ć™ć‚‹ć«ćÆ C を使用します。" #. type: =head2 -#: ../src/guestfs-actions.pod:9341 +#: ../src/guestfs-actions.pod:9348 msgid "guestfs_vg_activate" msgstr "guestfs_vg_activate" #. type: verbatim -#: ../src/guestfs-actions.pod:9343 +#: ../src/guestfs-actions.pod:9350 #, no-wrap msgid "" " int\n" @@ -45223,12 +45242,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9360 +#: ../src/guestfs-actions.pod:9367 msgid "guestfs_vg_activate_all" msgstr "guestfs_vg_activate_all" #. type: verbatim -#: ../src/guestfs-actions.pod:9362 +#: ../src/guestfs-actions.pod:9369 #, no-wrap msgid "" " int\n" @@ -45242,12 +45261,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9375 +#: ../src/guestfs-actions.pod:9382 msgid "guestfs_vgcreate" msgstr "guestfs_vgcreate" #. type: verbatim -#: ../src/guestfs-actions.pod:9377 +#: ../src/guestfs-actions.pod:9384 #, no-wrap msgid "" " int\n" @@ -45263,12 +45282,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9389 +#: ../src/guestfs-actions.pod:9396 msgid "guestfs_vglvuuids" msgstr "guestfs_vglvuuids" #. type: verbatim -#: ../src/guestfs-actions.pod:9391 +#: ../src/guestfs-actions.pod:9398 #, no-wrap msgid "" " char **\n" @@ -45282,24 +45301,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9398 +#: ../src/guestfs-actions.pod:9405 msgid "" "You can use this along with C and C calls to " "associate logical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9401 +#: ../src/guestfs-actions.pod:9408 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9409 +#: ../src/guestfs-actions.pod:9416 msgid "guestfs_vgmeta" msgstr "guestfs_vgmeta" #. type: verbatim -#: ../src/guestfs-actions.pod:9411 +#: ../src/guestfs-actions.pod:9418 #, no-wrap msgid "" " char *\n" @@ -45315,17 +45334,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9426 +#: ../src/guestfs-actions.pod:9433 msgid "(Added in 1.17.20)" msgstr "(1.17.20 にて追加)" #. type: =head2 -#: ../src/guestfs-actions.pod:9428 +#: ../src/guestfs-actions.pod:9435 msgid "guestfs_vgpvuuids" msgstr "guestfs_vgpvuuids" #. type: verbatim -#: ../src/guestfs-actions.pod:9430 +#: ../src/guestfs-actions.pod:9437 #, no-wrap msgid "" " char **\n" @@ -45339,24 +45358,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9437 +#: ../src/guestfs-actions.pod:9444 msgid "" "You can use this along with C and C calls to " "associate physical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9440 +#: ../src/guestfs-actions.pod:9447 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9448 +#: ../src/guestfs-actions.pod:9455 msgid "guestfs_vgremove" msgstr "guestfs_vgremove" #. type: verbatim -#: ../src/guestfs-actions.pod:9450 +#: ../src/guestfs-actions.pod:9457 #, no-wrap msgid "" " int\n" @@ -45370,12 +45389,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9463 +#: ../src/guestfs-actions.pod:9470 msgid "guestfs_vgrename" msgstr "guestfs_vgrename" #. type: verbatim -#: ../src/guestfs-actions.pod:9465 +#: ../src/guestfs-actions.pod:9472 #, no-wrap msgid "" " int\n" @@ -45391,12 +45410,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9476 +#: ../src/guestfs-actions.pod:9483 msgid "guestfs_vgs" msgstr "guestfs_vgs" #. type: verbatim -#: ../src/guestfs-actions.pod:9478 +#: ../src/guestfs-actions.pod:9485 #, no-wrap msgid "" " char **\n" @@ -45408,17 +45427,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9487 +#: ../src/guestfs-actions.pod:9494 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9495 +#: ../src/guestfs-actions.pod:9502 msgid "guestfs_vgs_full" msgstr "guestfs_vgs_full" #. type: verbatim -#: ../src/guestfs-actions.pod:9497 +#: ../src/guestfs-actions.pod:9504 #, no-wrap msgid "" " struct guestfs_lvm_vg_list *\n" @@ -45430,19 +45449,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9503 +#: ../src/guestfs-actions.pod:9510 msgid "" "This function returns a C, or NULL if there " "was an error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9509 +#: ../src/guestfs-actions.pod:9516 msgid "guestfs_vgscan" msgstr "guestfs_vgscan" #. type: verbatim -#: ../src/guestfs-actions.pod:9511 +#: ../src/guestfs-actions.pod:9518 #, no-wrap msgid "" " int\n" @@ -45454,12 +45473,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9521 +#: ../src/guestfs-actions.pod:9528 msgid "guestfs_vguuid" msgstr "guestfs_vguuid" #. type: verbatim -#: ../src/guestfs-actions.pod:9523 +#: ../src/guestfs-actions.pod:9530 #, no-wrap msgid "" " char *\n" @@ -45473,12 +45492,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9534 +#: ../src/guestfs-actions.pod:9541 msgid "guestfs_wait_ready" msgstr "guestfs_wait_ready" #. type: verbatim -#: ../src/guestfs-actions.pod:9536 +#: ../src/guestfs-actions.pod:9543 #, no-wrap msgid "" " int\n" @@ -45490,7 +45509,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9539 +#: ../src/guestfs-actions.pod:9546 msgid "" "I In new code, use the L call " "instead." @@ -45499,12 +45518,12 @@ msgstr "" "ć‚’ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:9546 +#: ../src/guestfs-actions.pod:9553 msgid "This function is a no op." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9548 +#: ../src/guestfs-actions.pod:9555 msgid "" "In versions of the API E 1.0.71 you had to call this function just after " "calling C to wait for the launch to complete. However this " @@ -45512,19 +45531,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9553 +#: ../src/guestfs-actions.pod:9560 msgid "" "If you see any calls to this function in code then you can just remove them, " "unless you want to retain compatibility with older versions of the API." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9561 +#: ../src/guestfs-actions.pod:9568 msgid "guestfs_wc_c" msgstr "guestfs_wc_c" #. type: verbatim -#: ../src/guestfs-actions.pod:9563 +#: ../src/guestfs-actions.pod:9570 #, no-wrap msgid "" " int\n" @@ -45538,12 +45557,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9574 +#: ../src/guestfs-actions.pod:9581 msgid "guestfs_wc_l" msgstr "guestfs_wc_l" #. type: verbatim -#: ../src/guestfs-actions.pod:9576 +#: ../src/guestfs-actions.pod:9583 #, no-wrap msgid "" " int\n" @@ -45557,12 +45576,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9587 +#: ../src/guestfs-actions.pod:9594 msgid "guestfs_wc_w" msgstr "guestfs_wc_w" #. type: verbatim -#: ../src/guestfs-actions.pod:9589 +#: ../src/guestfs-actions.pod:9596 #, no-wrap msgid "" " int\n" @@ -45576,12 +45595,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9600 +#: ../src/guestfs-actions.pod:9607 msgid "guestfs_wipefs" msgstr "guestfs_wipefs" #. type: verbatim -#: ../src/guestfs-actions.pod:9602 +#: ../src/guestfs-actions.pod:9609 #, no-wrap msgid "" " int\n" @@ -45595,19 +45614,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9612 +#: ../src/guestfs-actions.pod:9619 msgid "" "Compare with C which zeroes the first few blocks of a device." msgstr "" "ćƒ‡ćƒć‚¤ć‚¹ć®å…ˆé ­ę•°ćƒ–ćƒ­ćƒƒć‚Æć«ć‚¼ćƒ­ć‚’ę›øćč¾¼ć‚€ C ćØęÆ”č¼ƒć—ć¾ć™ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9619 +#: ../src/guestfs-actions.pod:9626 msgid "guestfs_write" msgstr "guestfs_write" #. type: verbatim -#: ../src/guestfs-actions.pod:9621 +#: ../src/guestfs-actions.pod:9628 #, no-wrap msgid "" " int\n" @@ -45625,17 +45644,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9630 +#: ../src/guestfs-actions.pod:9637 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9639 +#: ../src/guestfs-actions.pod:9646 msgid "guestfs_write_append" msgstr "guestfs_write_append" #. type: verbatim -#: ../src/guestfs-actions.pod:9641 +#: ../src/guestfs-actions.pod:9648 #, no-wrap msgid "" " int\n" @@ -45653,17 +45672,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9650 +#: ../src/guestfs-actions.pod:9657 msgid "See also C." msgstr "C å‚ē…§ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9659 +#: ../src/guestfs-actions.pod:9666 msgid "guestfs_write_file" msgstr "guestfs_write_file" #. type: verbatim -#: ../src/guestfs-actions.pod:9661 +#: ../src/guestfs-actions.pod:9668 #, no-wrap msgid "" " int\n" @@ -45681,7 +45700,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9667 +#: ../src/guestfs-actions.pod:9674 msgid "" "I In new code, use the L call " "instead." @@ -45690,14 +45709,14 @@ msgstr "" "ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: =head2 -#: ../src/guestfs-actions.pod:9692 +#: ../src/guestfs-actions.pod:9699 #, fuzzy #| msgid "guestfs_isoinfo" msgid "guestfs_xfs_info" msgstr "guestfs_isoinfo" #. type: verbatim -#: ../src/guestfs-actions.pod:9694 +#: ../src/guestfs-actions.pod:9701 #, fuzzy, no-wrap #| msgid "" #| " struct guestfs_isoinfo *\n" @@ -45716,7 +45735,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9705 +#: ../src/guestfs-actions.pod:9712 #, fuzzy #| msgid "" #| "This function returns a C, or NULL if there was an " @@ -45729,12 +45748,12 @@ msgstr "" "å‘¼ć³å‡ŗć—å…ƒćÆä½æē”Øå¾Œć« C ć‚’å‘¼ć³å‡ŗć™åæ…č¦ćŒć‚ć‚Šć¾ć™>怂" #. type: =head2 -#: ../src/guestfs-actions.pod:9709 +#: ../src/guestfs-actions.pod:9716 msgid "guestfs_zegrep" msgstr "guestfs_zegrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9711 +#: ../src/guestfs-actions.pod:9718 #, no-wrap msgid "" " char **\n" @@ -45750,12 +45769,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9728 +#: ../src/guestfs-actions.pod:9735 msgid "guestfs_zegrepi" msgstr "guestfs_zegrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9730 +#: ../src/guestfs-actions.pod:9737 #, no-wrap msgid "" " char **\n" @@ -45771,12 +45790,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9747 +#: ../src/guestfs-actions.pod:9754 msgid "guestfs_zero" msgstr "guestfs_zero" #. type: verbatim -#: ../src/guestfs-actions.pod:9749 +#: ../src/guestfs-actions.pod:9756 #, no-wrap msgid "" " int\n" @@ -45790,7 +45809,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9763 +#: ../src/guestfs-actions.pod:9770 msgid "" "See also: C, C, " "C" @@ -45799,12 +45818,12 @@ msgstr "" "C" #. type: =head2 -#: ../src/guestfs-actions.pod:9775 +#: ../src/guestfs-actions.pod:9782 msgid "guestfs_zero_device" msgstr "guestfs_zero_device" #. type: verbatim -#: ../src/guestfs-actions.pod:9777 +#: ../src/guestfs-actions.pod:9784 #, no-wrap msgid "" " int\n" @@ -45818,24 +45837,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9781 +#: ../src/guestfs-actions.pod:9788 msgid "" "This command writes zeroes over the entire C. Compare with " "C which just zeroes the first few blocks of a device." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9796 +#: ../src/guestfs-actions.pod:9803 msgid "(Added in 1.3.1)" msgstr "(1.3.1 ć«ćŠć„ć¦čæ½åŠ )" #. type: =head2 -#: ../src/guestfs-actions.pod:9798 +#: ../src/guestfs-actions.pod:9805 msgid "guestfs_zero_free_space" msgstr "guestfs_zero_free_space" #. type: verbatim -#: ../src/guestfs-actions.pod:9800 +#: ../src/guestfs-actions.pod:9807 #, no-wrap msgid "" " int\n" @@ -45849,7 +45868,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9810 +#: ../src/guestfs-actions.pod:9817 msgid "" "Free space is not \"trimmed\". You may want to call C " "either as an alternative to this, or after calling this, depending on your " @@ -45857,12 +45876,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9823 +#: ../src/guestfs-actions.pod:9830 msgid "guestfs_zerofree" msgstr "guestfs_zerofree" #. type: verbatim -#: ../src/guestfs-actions.pod:9825 +#: ../src/guestfs-actions.pod:9832 #, no-wrap msgid "" " int\n" @@ -45876,12 +45895,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9844 +#: ../src/guestfs-actions.pod:9851 msgid "guestfs_zfgrep" msgstr "guestfs_zfgrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9846 +#: ../src/guestfs-actions.pod:9853 #, no-wrap msgid "" " char **\n" @@ -45897,12 +45916,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9863 +#: ../src/guestfs-actions.pod:9870 msgid "guestfs_zfgrepi" msgstr "guestfs_zfgrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9865 +#: ../src/guestfs-actions.pod:9872 #, no-wrap msgid "" " char **\n" @@ -45918,12 +45937,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9882 +#: ../src/guestfs-actions.pod:9889 msgid "guestfs_zfile" msgstr "guestfs_zfile" #. type: verbatim -#: ../src/guestfs-actions.pod:9884 +#: ../src/guestfs-actions.pod:9891 #, no-wrap msgid "" " char *\n" @@ -45939,7 +45958,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9889 +#: ../src/guestfs-actions.pod:9896 msgid "" "I In new code, use the L call " "instead." @@ -45948,19 +45967,19 @@ msgstr "" "ä½æē”Øć—ć¦ćć ć•ć„ć€‚" #. type: textblock -#: ../src/guestfs-actions.pod:9901 +#: ../src/guestfs-actions.pod:9908 msgid "" "Since 1.0.63, use C instead which can now process compressed " "files." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9909 +#: ../src/guestfs-actions.pod:9916 msgid "guestfs_zgrep" msgstr "guestfs_zgrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9911 +#: ../src/guestfs-actions.pod:9918 #, no-wrap msgid "" " char **\n" @@ -45976,12 +45995,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9928 +#: ../src/guestfs-actions.pod:9935 msgid "guestfs_zgrepi" msgstr "guestfs_zgrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9930 +#: ../src/guestfs-actions.pod:9937 #, no-wrap msgid "" " char **\n" diff --git a/po-docs/libguestfs-docs.pot b/po-docs/libguestfs-docs.pot index dd4c6173..07aadf5e 100644 --- a/po-docs/libguestfs-docs.pot +++ b/po-docs/libguestfs-docs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libguestfs 1.19.22\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2012-07-19 13:50+0200\n" +"POT-Creation-Date: 2012-07-19 16:02+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2570,7 +2570,7 @@ msgid "" msgstr "" #. type: =head2 -#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5108 +#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5115 msgid "path" msgstr "" @@ -7608,7 +7608,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:208 ../fish/guestfish-actions.pod:222 ../fish/guestfish-actions.pod:1072 ../fish/guestfish-actions.pod:1107 ../fish/guestfish-actions.pod:1256 ../fish/guestfish-actions.pod:1324 ../fish/guestfish-actions.pod:1851 ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:3068 ../fish/guestfish-actions.pod:3899 ../fish/guestfish-actions.pod:4315 ../fish/guestfish-actions.pod:5043 ../fish/guestfish-actions.pod:5291 ../fish/guestfish-actions.pod:5311 ../fish/guestfish-actions.pod:5330 ../fish/guestfish-actions.pod:5368 ../fish/guestfish-actions.pod:6150 ../fish/guestfish-actions.pod:6278 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:301 ../src/guestfs-actions.pod:322 ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1892 ../src/guestfs-actions.pod:2151 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3002 ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:6059 ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7961 ../src/guestfs-actions.pod:8272 ../src/guestfs-actions.pod:8313 ../src/guestfs-actions.pod:8344 ../src/guestfs-actions.pod:8404 ../src/guestfs-actions.pod:9542 ../src/guestfs-actions.pod:9670 ../src/guestfs-actions.pod:9892 +#: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:208 ../fish/guestfish-actions.pod:222 ../fish/guestfish-actions.pod:1072 ../fish/guestfish-actions.pod:1107 ../fish/guestfish-actions.pod:1256 ../fish/guestfish-actions.pod:1324 ../fish/guestfish-actions.pod:1851 ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:3068 ../fish/guestfish-actions.pod:3899 ../fish/guestfish-actions.pod:4315 ../fish/guestfish-actions.pod:5050 ../fish/guestfish-actions.pod:5298 ../fish/guestfish-actions.pod:5318 ../fish/guestfish-actions.pod:5337 ../fish/guestfish-actions.pod:5375 ../fish/guestfish-actions.pod:6157 ../fish/guestfish-actions.pod:6285 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:301 ../src/guestfs-actions.pod:322 ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1892 ../src/guestfs-actions.pod:2151 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3002 ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:6059 ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7968 ../src/guestfs-actions.pod:8279 ../src/guestfs-actions.pod:8320 ../src/guestfs-actions.pod:8351 ../src/guestfs-actions.pod:8411 ../src/guestfs-actions.pod:9549 ../src/guestfs-actions.pod:9677 ../src/guestfs-actions.pod:9899 msgid "" "Deprecated functions will not be removed from the API, but the fact that " "they are deprecated indicates that there are problems with correct use of " @@ -7772,7 +7772,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:185 ../fish/guestfish-actions.pod:669 ../fish/guestfish-actions.pod:684 ../fish/guestfish-actions.pod:966 ../fish/guestfish-actions.pod:987 ../fish/guestfish-actions.pod:1025 ../fish/guestfish-actions.pod:1034 ../fish/guestfish-actions.pod:1043 ../fish/guestfish-actions.pod:1057 ../fish/guestfish-actions.pod:1243 ../fish/guestfish-actions.pod:1686 ../fish/guestfish-actions.pod:2527 ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3882 ../fish/guestfish-actions.pod:3915 ../fish/guestfish-actions.pod:4078 ../fish/guestfish-actions.pod:4108 ../fish/guestfish-actions.pod:4251 ../fish/guestfish-actions.pod:4267 ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5019 ../fish/guestfish-actions.pod:5752 ../fish/guestfish-actions.pod:5834 +#: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:185 ../fish/guestfish-actions.pod:669 ../fish/guestfish-actions.pod:684 ../fish/guestfish-actions.pod:966 ../fish/guestfish-actions.pod:987 ../fish/guestfish-actions.pod:1025 ../fish/guestfish-actions.pod:1034 ../fish/guestfish-actions.pod:1043 ../fish/guestfish-actions.pod:1057 ../fish/guestfish-actions.pod:1243 ../fish/guestfish-actions.pod:1686 ../fish/guestfish-actions.pod:2527 ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3882 ../fish/guestfish-actions.pod:3915 ../fish/guestfish-actions.pod:4078 ../fish/guestfish-actions.pod:4108 ../fish/guestfish-actions.pod:4251 ../fish/guestfish-actions.pod:4267 ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5026 ../fish/guestfish-actions.pod:5759 ../fish/guestfish-actions.pod:5841 msgid "" "This command has one or more optional arguments. See L." @@ -8532,7 +8532,7 @@ msgid "This command uploads base64-encoded data from C to C instead of a filename to read/write from stdin/stdout." msgstr "" @@ -8929,7 +8929,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:3584 ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5682 ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8914 +#: ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:3584 ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5689 ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8921 msgid "The optional parameters are:" msgstr "" @@ -9265,7 +9265,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:804 ../fish/guestfish-actions.pod:939 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1278 ../fish/guestfish-actions.pod:1288 ../fish/guestfish-actions.pod:1355 ../fish/guestfish-actions.pod:1365 ../fish/guestfish-actions.pod:1574 ../fish/guestfish-actions.pod:2041 ../fish/guestfish-actions.pod:2051 ../fish/guestfish-actions.pod:2101 ../fish/guestfish-actions.pod:2116 ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2145 ../fish/guestfish-actions.pod:4579 ../fish/guestfish-actions.pod:4594 ../fish/guestfish-actions.pod:4670 ../fish/guestfish-actions.pod:4687 ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5449 ../fish/guestfish-actions.pod:5495 ../fish/guestfish-actions.pod:5580 ../fish/guestfish-actions.pod:5595 ../fish/guestfish-actions.pod:6114 ../fish/guestfish-actions.pod:6126 ../fish/guestfish-actions.pod:6144 ../fish/guestfish-actions.pod:6172 ../fish/guestfish-actions.pod:6182 ../fish/guestfish-actions.pod:6250 ../fish/guestfish-actions.pod:6260 ../fish/guestfish-actions.pod:6289 ../fish/guestfish-actions.pod:6299 ../src/guestfs-actions.pod:1256 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1455 ../src/guestfs-actions.pod:2195 ../src/guestfs-actions.pod:2214 ../src/guestfs-actions.pod:2317 ../src/guestfs-actions.pod:2336 ../src/guestfs-actions.pod:2605 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3309 ../src/guestfs-actions.pod:3374 ../src/guestfs-actions.pod:3398 ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:3444 ../src/guestfs-actions.pod:7248 ../src/guestfs-actions.pod:7274 ../src/guestfs-actions.pod:7405 ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8542 ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8743 ../src/guestfs-actions.pod:8767 ../src/guestfs-actions.pod:9634 ../src/guestfs-actions.pod:9654 ../src/guestfs-actions.pod:9687 ../src/guestfs-actions.pod:9723 ../src/guestfs-actions.pod:9742 ../src/guestfs-actions.pod:9858 ../src/guestfs-actions.pod:9877 ../src/guestfs-actions.pod:9923 ../src/guestfs-actions.pod:9942 +#: ../fish/guestfish-actions.pod:804 ../fish/guestfish-actions.pod:939 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1278 ../fish/guestfish-actions.pod:1288 ../fish/guestfish-actions.pod:1355 ../fish/guestfish-actions.pod:1365 ../fish/guestfish-actions.pod:1574 ../fish/guestfish-actions.pod:2041 ../fish/guestfish-actions.pod:2051 ../fish/guestfish-actions.pod:2101 ../fish/guestfish-actions.pod:2116 ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2145 ../fish/guestfish-actions.pod:4579 ../fish/guestfish-actions.pod:4594 ../fish/guestfish-actions.pod:4670 ../fish/guestfish-actions.pod:4687 ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5456 ../fish/guestfish-actions.pod:5502 ../fish/guestfish-actions.pod:5587 ../fish/guestfish-actions.pod:5602 ../fish/guestfish-actions.pod:6121 ../fish/guestfish-actions.pod:6133 ../fish/guestfish-actions.pod:6151 ../fish/guestfish-actions.pod:6179 ../fish/guestfish-actions.pod:6189 ../fish/guestfish-actions.pod:6257 ../fish/guestfish-actions.pod:6267 ../fish/guestfish-actions.pod:6296 ../fish/guestfish-actions.pod:6306 ../src/guestfs-actions.pod:1256 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1455 ../src/guestfs-actions.pod:2195 ../src/guestfs-actions.pod:2214 ../src/guestfs-actions.pod:2317 ../src/guestfs-actions.pod:2336 ../src/guestfs-actions.pod:2605 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3309 ../src/guestfs-actions.pod:3374 ../src/guestfs-actions.pod:3398 ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:3444 ../src/guestfs-actions.pod:7248 ../src/guestfs-actions.pod:7274 ../src/guestfs-actions.pod:7405 ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8549 ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8750 ../src/guestfs-actions.pod:8774 ../src/guestfs-actions.pod:9641 ../src/guestfs-actions.pod:9661 ../src/guestfs-actions.pod:9694 ../src/guestfs-actions.pod:9730 ../src/guestfs-actions.pod:9749 ../src/guestfs-actions.pod:9865 ../src/guestfs-actions.pod:9884 ../src/guestfs-actions.pod:9930 ../src/guestfs-actions.pod:9949 msgid "" "Because of the message protocol, there is a transfer limit of somewhere " "between 2MB and 4MB. See L." @@ -9997,7 +9997,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5843 ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9166 +#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5850 ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9173 msgid "C can also be a named pipe." msgstr "" @@ -11124,7 +11124,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7904 +#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5022 ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7911 msgid "" "These attributes are only present when the file is located on an ext2/3/4 " "filesystem. Using this call on other filesystem types will result in an " @@ -11459,7 +11459,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:5088 ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3118 ../src/guestfs-actions.pod:8031 ../src/guestfs-actions.pod:8159 +#: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:5095 ../fish/guestfish-actions.pod:5199 ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3118 ../src/guestfs-actions.pod:8038 ../src/guestfs-actions.pod:8166 msgid "For more information on the architecture of libguestfs, see L." msgstr "" @@ -11995,7 +11995,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5593 ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8761 +#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5600 ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8768 msgid "If the parameter C is zero, this returns an empty list." msgstr "" @@ -14445,7 +14445,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5428 ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8501 +#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5435 ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8508 msgid "Returns file information for the given C." msgstr "" @@ -16260,7 +16260,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4130 ../fish/guestfish-actions.pod:5832 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9130 +#: ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4130 ../fish/guestfish-actions.pod:5839 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9137 msgid "See L for full documentation." msgstr "" @@ -16658,7 +16658,7 @@ msgid "" msgstr "" #. type: =item -#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5686 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8918 +#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5693 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8925 msgid "C" msgstr "" @@ -18134,16 +18134,33 @@ msgstr "" #. type: =item #: ../fish/guestfish-actions.pod:4952 ../src/guestfs-actions.pod:7818 +msgid "C" +msgstr "" + +#. type: =item +#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +msgid "C>" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +msgid "" +"Use libvirt to launch the appliance. The optional I is the libvirt " +"connection URI to use (see L)." +msgstr "" + +#. type: =item +#: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7825 msgid "C>" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +#: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7827 msgid "Connect to the Unix domain socket I." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +#: ../fish/guestfish-actions.pod:4963 ../src/guestfs-actions.pod:7829 msgid "" "This method lets you connect to an existing daemon or (using virtio-serial) " "to a live guest. For more information, see L is true, this enables autosync. Libguestfs will make a best " "effort attempt to make filesystems consistent and synchronized when the " @@ -18177,24 +18194,24 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4973 ../src/guestfs-actions.pod:7843 +#: ../fish/guestfish-actions.pod:4980 ../src/guestfs-actions.pod:7850 msgid "" "This is enabled by default (since libguestfs 1.5.24, previously it was " "disabled by default)." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:4976 +#: ../fish/guestfish-actions.pod:4983 msgid "set-direct" msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:4978 +#: ../fish/guestfish-actions.pod:4985 msgid "direct" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:4980 +#: ../fish/guestfish-actions.pod:4987 #, no-wrap msgid "" " set-direct true|false\n" @@ -18202,36 +18219,36 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7856 +#: ../fish/guestfish-actions.pod:4989 ../src/guestfs-actions.pod:7863 msgid "" "If the direct appliance mode flag is enabled, then stdin and stdout are " "passed directly through to the appliance once it is launched." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4986 +#: ../fish/guestfish-actions.pod:4993 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by L, but go straight to stdout." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4990 ../src/guestfs-actions.pod:7864 +#: ../fish/guestfish-actions.pod:4997 ../src/guestfs-actions.pod:7871 msgid "You probably don't want to use this unless you know what you are doing." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4993 ../src/guestfs-actions.pod:7867 +#: ../fish/guestfish-actions.pod:5000 ../src/guestfs-actions.pod:7874 msgid "The default is disabled." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:4995 +#: ../fish/guestfish-actions.pod:5002 msgid "set-e2attrs" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:4997 +#: ../fish/guestfish-actions.pod:5004 #, no-wrap msgid "" " set-e2attrs file attrs [clear:true|false]\n" @@ -18239,14 +18256,14 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7888 +#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 msgid "" "This sets or clears the file attributes C associated with the inode " "C." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5002 +#: ../fish/guestfish-actions.pod:5009 msgid "" "C is a string of characters representing file attributes. See " "L for a list of possible attributes. Not all attributes can " @@ -18254,31 +18271,31 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 +#: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7902 msgid "" "If optional boolean C is not present or false, then the C " "listed are set in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5009 ../src/guestfs-actions.pod:7898 +#: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7905 msgid "If C is true, then the C listed are cleared in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5012 ../src/guestfs-actions.pod:7901 +#: ../fish/guestfish-actions.pod:5019 ../src/guestfs-actions.pod:7908 msgid "" "In both cases, other attributes not present in the C string are left " "unchanged." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:5021 +#: ../fish/guestfish-actions.pod:5028 msgid "set-e2generation" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:5023 +#: ../fish/guestfish-actions.pod:5030 #, no-wrap msgid "" " set-e2generation file generation\n" @@ -18286,22 +18303,22 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5025 ../src/guestfs-actions.pod:7943 +#: ../fish/guestfish-actions.pod:5032 ../src/guestfs-actions.pod:7950 msgid "This sets the ext2 file generation of a file." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5027 +#: ../fish/guestfish-actions.pod:5034 msgid "See L." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:5029 +#: ../fish/guestfish-actions.pod:5036 msgid "set-e2label" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:5031 +#: ../fish/guestfish-actions.pod:5038 #, no-wrap msgid "" " set-e2label device label\n" @@ -18309,33 +18326,33 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:7965 +#: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7972 msgid "" "This sets the ext2/3/4 filesystem label of the filesystem on C to " "C call instead." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:6282 +#: ../fish/guestfish-actions.pod:6289 msgid "zgrep" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:6284 +#: ../fish/guestfish-actions.pod:6291 #, no-wrap msgid "" " zgrep regex path\n" @@ -21082,17 +21099,17 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:6286 ../src/guestfs-actions.pod:9916 +#: ../fish/guestfish-actions.pod:6293 ../src/guestfs-actions.pod:9923 msgid "This calls the external C program and returns the matching lines." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:6292 +#: ../fish/guestfish-actions.pod:6299 msgid "zgrepi" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:6294 +#: ../fish/guestfish-actions.pod:6301 #, no-wrap msgid "" " zgrepi regex path\n" @@ -21100,7 +21117,7 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:6296 ../src/guestfs-actions.pod:9935 +#: ../fish/guestfish-actions.pod:6303 ../src/guestfs-actions.pod:9942 msgid "This calls the external C program and returns the matching lines." msgstr "" @@ -29156,12 +29173,12 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:250 ../src/guestfs-actions.pod:287 ../src/guestfs-actions.pod:308 ../src/guestfs-actions.pod:329 ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:356 ../src/guestfs-actions.pod:476 ../src/guestfs-actions.pod:496 ../src/guestfs-actions.pod:510 ../src/guestfs-actions.pod:555 ../src/guestfs-actions.pod:583 ../src/guestfs-actions.pod:601 ../src/guestfs-actions.pod:670 ../src/guestfs-actions.pod:703 ../src/guestfs-actions.pod:717 ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:904 ../src/guestfs-actions.pod:918 ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:959 ../src/guestfs-actions.pod:996 ../src/guestfs-actions.pod:1030 ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1088 ../src/guestfs-actions.pod:1101 ../src/guestfs-actions.pod:1113 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1158 ../src/guestfs-actions.pod:1354 ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1392 ../src/guestfs-actions.pod:1482 ../src/guestfs-actions.pod:1541 ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1680 ../src/guestfs-actions.pod:1733 ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1845 ../src/guestfs-actions.pod:1864 ../src/guestfs-actions.pod:1878 ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:2025 ../src/guestfs-actions.pod:2050 ../src/guestfs-actions.pod:2116 ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2537 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2646 ../src/guestfs-actions.pod:2757 ../src/guestfs-actions.pod:3357 ../src/guestfs-actions.pod:3501 ../src/guestfs-actions.pod:3560 ../src/guestfs-actions.pod:3595 ../src/guestfs-actions.pod:4708 ../src/guestfs-actions.pod:4723 ../src/guestfs-actions.pod:4748 ../src/guestfs-actions.pod:4966 ../src/guestfs-actions.pod:4980 ../src/guestfs-actions.pod:4993 ../src/guestfs-actions.pod:5007 ../src/guestfs-actions.pod:5022 ../src/guestfs-actions.pod:5058 ../src/guestfs-actions.pod:5130 ../src/guestfs-actions.pod:5150 ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5187 ../src/guestfs-actions.pod:5207 ../src/guestfs-actions.pod:5242 ../src/guestfs-actions.pod:5261 ../src/guestfs-actions.pod:5280 ../src/guestfs-actions.pod:5297 ../src/guestfs-actions.pod:5332 ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5377 ../src/guestfs-actions.pod:5393 ../src/guestfs-actions.pod:5406 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5750 ../src/guestfs-actions.pod:5762 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5795 ../src/guestfs-actions.pod:5846 ../src/guestfs-actions.pod:5864 ../src/guestfs-actions.pod:5882 ../src/guestfs-actions.pod:5898 ../src/guestfs-actions.pod:5912 ../src/guestfs-actions.pod:5926 ../src/guestfs-actions.pod:5943 ../src/guestfs-actions.pod:6020 ../src/guestfs-actions.pod:6071 ../src/guestfs-actions.pod:6104 ../src/guestfs-actions.pod:6175 ../src/guestfs-actions.pod:6206 ../src/guestfs-actions.pod:6225 ../src/guestfs-actions.pod:6244 ../src/guestfs-actions.pod:6256 ../src/guestfs-actions.pod:6273 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6301 ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6348 ../src/guestfs-actions.pod:6374 ../src/guestfs-actions.pod:6443 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:6527 ../src/guestfs-actions.pod:6541 ../src/guestfs-actions.pod:6558 ../src/guestfs-actions.pod:6607 ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6697 ../src/guestfs-actions.pod:6749 ../src/guestfs-actions.pod:6831 ../src/guestfs-actions.pod:6874 ../src/guestfs-actions.pod:6902 ../src/guestfs-actions.pod:6919 ../src/guestfs-actions.pod:6937 ../src/guestfs-actions.pod:7074 ../src/guestfs-actions.pod:7131 ../src/guestfs-actions.pod:7153 ../src/guestfs-actions.pod:7171 ../src/guestfs-actions.pod:7223 ../src/guestfs-actions.pod:7289 ../src/guestfs-actions.pod:7306 ../src/guestfs-actions.pod:7319 ../src/guestfs-actions.pod:7333 ../src/guestfs-actions.pod:7622 ../src/guestfs-actions.pod:7637 ../src/guestfs-actions.pod:7658 ../src/guestfs-actions.pod:7674 ../src/guestfs-actions.pod:7686 ../src/guestfs-actions.pod:7700 ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7726 ../src/guestfs-actions.pod:7742 ../src/guestfs-actions.pod:7760 ../src/guestfs-actions.pod:7779 ../src/guestfs-actions.pod:7798 ../src/guestfs-actions.pod:7828 ../src/guestfs-actions.pod:7846 ../src/guestfs-actions.pod:7869 ../src/guestfs-actions.pod:7908 ../src/guestfs-actions.pod:7947 ../src/guestfs-actions.pod:7972 ../src/guestfs-actions.pod:7991 ../src/guestfs-actions.pod:8013 ../src/guestfs-actions.pod:8034 ../src/guestfs-actions.pod:8053 ../src/guestfs-actions.pod:8070 ../src/guestfs-actions.pod:8091 ../src/guestfs-actions.pod:8119 ../src/guestfs-actions.pod:8143 ../src/guestfs-actions.pod:8162 ../src/guestfs-actions.pod:8178 ../src/guestfs-actions.pod:8202 ../src/guestfs-actions.pod:8221 ../src/guestfs-actions.pod:8236 ../src/guestfs-actions.pod:8255 ../src/guestfs-actions.pod:8299 ../src/guestfs-actions.pod:8326 ../src/guestfs-actions.pod:8356 ../src/guestfs-actions.pod:8481 ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8612 ../src/guestfs-actions.pod:8624 ../src/guestfs-actions.pod:8637 ../src/guestfs-actions.pod:8650 ../src/guestfs-actions.pod:8672 ../src/guestfs-actions.pod:8685 ../src/guestfs-actions.pod:8698 ../src/guestfs-actions.pod:8711 ../src/guestfs-actions.pod:8726 ../src/guestfs-actions.pod:8785 ../src/guestfs-actions.pod:8802 ../src/guestfs-actions.pod:8818 ../src/guestfs-actions.pod:8834 ../src/guestfs-actions.pod:8851 ../src/guestfs-actions.pod:8864 ../src/guestfs-actions.pod:8884 ../src/guestfs-actions.pod:8984 ../src/guestfs-actions.pod:9042 ../src/guestfs-actions.pod:9056 ../src/guestfs-actions.pod:9097 ../src/guestfs-actions.pod:9110 ../src/guestfs-actions.pod:9132 ../src/guestfs-actions.pod:9170 ../src/guestfs-actions.pod:9204 ../src/guestfs-actions.pod:9240 ../src/guestfs-actions.pod:9356 ../src/guestfs-actions.pod:9371 ../src/guestfs-actions.pod:9385 ../src/guestfs-actions.pod:9459 ../src/guestfs-actions.pod:9472 ../src/guestfs-actions.pod:9517 ../src/guestfs-actions.pod:9557 ../src/guestfs-actions.pod:9615 ../src/guestfs-actions.pod:9632 ../src/guestfs-actions.pod:9652 ../src/guestfs-actions.pod:9685 ../src/guestfs-actions.pod:9766 ../src/guestfs-actions.pod:9789 ../src/guestfs-actions.pod:9814 ../src/guestfs-actions.pod:9840 +#: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:250 ../src/guestfs-actions.pod:287 ../src/guestfs-actions.pod:308 ../src/guestfs-actions.pod:329 ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:356 ../src/guestfs-actions.pod:476 ../src/guestfs-actions.pod:496 ../src/guestfs-actions.pod:510 ../src/guestfs-actions.pod:555 ../src/guestfs-actions.pod:583 ../src/guestfs-actions.pod:601 ../src/guestfs-actions.pod:670 ../src/guestfs-actions.pod:703 ../src/guestfs-actions.pod:717 ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:904 ../src/guestfs-actions.pod:918 ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:959 ../src/guestfs-actions.pod:996 ../src/guestfs-actions.pod:1030 ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1088 ../src/guestfs-actions.pod:1101 ../src/guestfs-actions.pod:1113 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1158 ../src/guestfs-actions.pod:1354 ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1392 ../src/guestfs-actions.pod:1482 ../src/guestfs-actions.pod:1541 ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1680 ../src/guestfs-actions.pod:1733 ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1845 ../src/guestfs-actions.pod:1864 ../src/guestfs-actions.pod:1878 ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:2025 ../src/guestfs-actions.pod:2050 ../src/guestfs-actions.pod:2116 ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2537 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2646 ../src/guestfs-actions.pod:2757 ../src/guestfs-actions.pod:3357 ../src/guestfs-actions.pod:3501 ../src/guestfs-actions.pod:3560 ../src/guestfs-actions.pod:3595 ../src/guestfs-actions.pod:4708 ../src/guestfs-actions.pod:4723 ../src/guestfs-actions.pod:4748 ../src/guestfs-actions.pod:4966 ../src/guestfs-actions.pod:4980 ../src/guestfs-actions.pod:4993 ../src/guestfs-actions.pod:5007 ../src/guestfs-actions.pod:5022 ../src/guestfs-actions.pod:5058 ../src/guestfs-actions.pod:5130 ../src/guestfs-actions.pod:5150 ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5187 ../src/guestfs-actions.pod:5207 ../src/guestfs-actions.pod:5242 ../src/guestfs-actions.pod:5261 ../src/guestfs-actions.pod:5280 ../src/guestfs-actions.pod:5297 ../src/guestfs-actions.pod:5332 ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5377 ../src/guestfs-actions.pod:5393 ../src/guestfs-actions.pod:5406 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5750 ../src/guestfs-actions.pod:5762 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5795 ../src/guestfs-actions.pod:5846 ../src/guestfs-actions.pod:5864 ../src/guestfs-actions.pod:5882 ../src/guestfs-actions.pod:5898 ../src/guestfs-actions.pod:5912 ../src/guestfs-actions.pod:5926 ../src/guestfs-actions.pod:5943 ../src/guestfs-actions.pod:6020 ../src/guestfs-actions.pod:6071 ../src/guestfs-actions.pod:6104 ../src/guestfs-actions.pod:6175 ../src/guestfs-actions.pod:6206 ../src/guestfs-actions.pod:6225 ../src/guestfs-actions.pod:6244 ../src/guestfs-actions.pod:6256 ../src/guestfs-actions.pod:6273 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6301 ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6348 ../src/guestfs-actions.pod:6374 ../src/guestfs-actions.pod:6443 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:6527 ../src/guestfs-actions.pod:6541 ../src/guestfs-actions.pod:6558 ../src/guestfs-actions.pod:6607 ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6697 ../src/guestfs-actions.pod:6749 ../src/guestfs-actions.pod:6831 ../src/guestfs-actions.pod:6874 ../src/guestfs-actions.pod:6902 ../src/guestfs-actions.pod:6919 ../src/guestfs-actions.pod:6937 ../src/guestfs-actions.pod:7074 ../src/guestfs-actions.pod:7131 ../src/guestfs-actions.pod:7153 ../src/guestfs-actions.pod:7171 ../src/guestfs-actions.pod:7223 ../src/guestfs-actions.pod:7289 ../src/guestfs-actions.pod:7306 ../src/guestfs-actions.pod:7319 ../src/guestfs-actions.pod:7333 ../src/guestfs-actions.pod:7622 ../src/guestfs-actions.pod:7637 ../src/guestfs-actions.pod:7658 ../src/guestfs-actions.pod:7674 ../src/guestfs-actions.pod:7686 ../src/guestfs-actions.pod:7700 ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7726 ../src/guestfs-actions.pod:7742 ../src/guestfs-actions.pod:7760 ../src/guestfs-actions.pod:7779 ../src/guestfs-actions.pod:7798 ../src/guestfs-actions.pod:7835 ../src/guestfs-actions.pod:7853 ../src/guestfs-actions.pod:7876 ../src/guestfs-actions.pod:7915 ../src/guestfs-actions.pod:7954 ../src/guestfs-actions.pod:7979 ../src/guestfs-actions.pod:7998 ../src/guestfs-actions.pod:8020 ../src/guestfs-actions.pod:8041 ../src/guestfs-actions.pod:8060 ../src/guestfs-actions.pod:8077 ../src/guestfs-actions.pod:8098 ../src/guestfs-actions.pod:8126 ../src/guestfs-actions.pod:8150 ../src/guestfs-actions.pod:8169 ../src/guestfs-actions.pod:8185 ../src/guestfs-actions.pod:8209 ../src/guestfs-actions.pod:8228 ../src/guestfs-actions.pod:8243 ../src/guestfs-actions.pod:8262 ../src/guestfs-actions.pod:8306 ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8363 ../src/guestfs-actions.pod:8488 ../src/guestfs-actions.pod:8498 ../src/guestfs-actions.pod:8619 ../src/guestfs-actions.pod:8631 ../src/guestfs-actions.pod:8644 ../src/guestfs-actions.pod:8657 ../src/guestfs-actions.pod:8679 ../src/guestfs-actions.pod:8692 ../src/guestfs-actions.pod:8705 ../src/guestfs-actions.pod:8718 ../src/guestfs-actions.pod:8733 ../src/guestfs-actions.pod:8792 ../src/guestfs-actions.pod:8809 ../src/guestfs-actions.pod:8825 ../src/guestfs-actions.pod:8841 ../src/guestfs-actions.pod:8858 ../src/guestfs-actions.pod:8871 ../src/guestfs-actions.pod:8891 ../src/guestfs-actions.pod:8991 ../src/guestfs-actions.pod:9049 ../src/guestfs-actions.pod:9063 ../src/guestfs-actions.pod:9104 ../src/guestfs-actions.pod:9117 ../src/guestfs-actions.pod:9139 ../src/guestfs-actions.pod:9177 ../src/guestfs-actions.pod:9211 ../src/guestfs-actions.pod:9247 ../src/guestfs-actions.pod:9363 ../src/guestfs-actions.pod:9378 ../src/guestfs-actions.pod:9392 ../src/guestfs-actions.pod:9466 ../src/guestfs-actions.pod:9479 ../src/guestfs-actions.pod:9524 ../src/guestfs-actions.pod:9564 ../src/guestfs-actions.pod:9622 ../src/guestfs-actions.pod:9639 ../src/guestfs-actions.pod:9659 ../src/guestfs-actions.pod:9692 ../src/guestfs-actions.pod:9773 ../src/guestfs-actions.pod:9796 ../src/guestfs-actions.pod:9821 ../src/guestfs-actions.pod:9847 msgid "This function returns 0 on success or -1 on error." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:180 ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:2820 ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3182 ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4730 ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7848 ../src/guestfs-actions.pod:8072 ../src/guestfs-actions.pod:8223 ../src/guestfs-actions.pod:8728 ../src/guestfs-actions.pod:8853 ../src/guestfs-actions.pod:9559 +#: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:180 ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:2820 ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3182 ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4730 ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7855 ../src/guestfs-actions.pod:8079 ../src/guestfs-actions.pod:8230 ../src/guestfs-actions.pod:8735 ../src/guestfs-actions.pod:8860 ../src/guestfs-actions.pod:9566 msgid "(Added in 0.3)" msgstr "" @@ -29182,7 +29199,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:190 ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1469 ../src/guestfs-actions.pod:1521 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1668 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:1774 ../src/guestfs-actions.pod:2086 ../src/guestfs-actions.pod:2730 ../src/guestfs-actions.pod:3864 ../src/guestfs-actions.pod:5549 ../src/guestfs-actions.pod:5969 ../src/guestfs-actions.pod:6082 ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6409 ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6732 ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7881 ../src/guestfs-actions.pod:8895 ../src/guestfs-actions.pod:9120 +#: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:190 ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1469 ../src/guestfs-actions.pod:1521 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1668 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:1774 ../src/guestfs-actions.pod:2086 ../src/guestfs-actions.pod:2730 ../src/guestfs-actions.pod:3864 ../src/guestfs-actions.pod:5549 ../src/guestfs-actions.pod:5969 ../src/guestfs-actions.pod:6082 ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6409 ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6732 ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7888 ../src/guestfs-actions.pod:8902 ../src/guestfs-actions.pod:9127 msgid "" "You may supply a list of optional arguments to this call. Use zero or more " "of the following pairs of parameters, and terminate the list with C<-1> on " @@ -29219,7 +29236,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:399 ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:790 ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:839 ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:2070 ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2719 ../src/guestfs-actions.pod:2968 ../src/guestfs-actions.pod:3029 ../src/guestfs-actions.pod:3080 ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3146 ../src/guestfs-actions.pod:3169 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:4000 ../src/guestfs-actions.pod:5537 ../src/guestfs-actions.pod:6623 ../src/guestfs-actions.pod:6644 ../src/guestfs-actions.pod:6971 ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7403 ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9083 ../src/guestfs-actions.pod:9570 ../src/guestfs-actions.pod:9583 ../src/guestfs-actions.pod:9596 +#: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:399 ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:790 ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:839 ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:2070 ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2719 ../src/guestfs-actions.pod:2968 ../src/guestfs-actions.pod:3029 ../src/guestfs-actions.pod:3080 ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3146 ../src/guestfs-actions.pod:3169 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:4000 ../src/guestfs-actions.pod:5537 ../src/guestfs-actions.pod:6623 ../src/guestfs-actions.pod:6644 ../src/guestfs-actions.pod:6971 ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7403 ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9090 ../src/guestfs-actions.pod:9577 ../src/guestfs-actions.pod:9590 ../src/guestfs-actions.pod:9603 msgid "On error this function returns -1." msgstr "" @@ -29250,7 +29267,7 @@ msgid "This is the \"va_list variant\" of L." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:263 ../src/guestfs-actions.pod:274 ../src/guestfs-actions.pod:1009 ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1065 ../src/guestfs-actions.pod:1076 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1556 ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1646 ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1699 ../src/guestfs-actions.pod:1711 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1764 ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:1822 ../src/guestfs-actions.pod:2129 ../src/guestfs-actions.pod:2140 ../src/guestfs-actions.pod:2770 ../src/guestfs-actions.pod:2781 ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3960 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5640 ../src/guestfs-actions.pod:6034 ../src/guestfs-actions.pod:6046 ../src/guestfs-actions.pod:6117 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6400 ../src/guestfs-actions.pod:6456 ../src/guestfs-actions.pod:6467 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6855 ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:7934 ../src/guestfs-actions.pod:8997 ../src/guestfs-actions.pod:9008 ../src/guestfs-actions.pod:9144 ../src/guestfs-actions.pod:9154 +#: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:263 ../src/guestfs-actions.pod:274 ../src/guestfs-actions.pod:1009 ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1065 ../src/guestfs-actions.pod:1076 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1556 ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1646 ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1699 ../src/guestfs-actions.pod:1711 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1764 ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:1822 ../src/guestfs-actions.pod:2129 ../src/guestfs-actions.pod:2140 ../src/guestfs-actions.pod:2770 ../src/guestfs-actions.pod:2781 ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3960 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5640 ../src/guestfs-actions.pod:6034 ../src/guestfs-actions.pod:6046 ../src/guestfs-actions.pod:6117 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6400 ../src/guestfs-actions.pod:6456 ../src/guestfs-actions.pod:6467 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6855 ../src/guestfs-actions.pod:7929 ../src/guestfs-actions.pod:7941 ../src/guestfs-actions.pod:9004 ../src/guestfs-actions.pod:9015 ../src/guestfs-actions.pod:9151 ../src/guestfs-actions.pod:9161 msgid "See L." msgstr "" @@ -29578,7 +29595,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:1192 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1253 ../src/guestfs-actions.pod:1313 ../src/guestfs-actions.pod:1329 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1939 ../src/guestfs-actions.pod:1956 ../src/guestfs-actions.pod:1975 ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2364 ../src/guestfs-actions.pod:2476 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2679 ../src/guestfs-actions.pod:2806 ../src/guestfs-actions.pod:2947 ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3009 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3614 ../src/guestfs-actions.pod:3728 ../src/guestfs-actions.pod:3832 ../src/guestfs-actions.pod:3851 ../src/guestfs-actions.pod:4066 ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4115 ../src/guestfs-actions.pod:4149 ../src/guestfs-actions.pod:4220 ../src/guestfs-actions.pod:4240 ../src/guestfs-actions.pod:4260 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:5316 ../src/guestfs-actions.pod:5483 ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6989 ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7378 ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7605 ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8390 ../src/guestfs-actions.pod:8414 ../src/guestfs-actions.pod:8438 ../src/guestfs-actions.pod:9299 ../src/guestfs-actions.pod:9318 ../src/guestfs-actions.pod:9336 ../src/guestfs-actions.pod:9529 ../src/guestfs-actions.pod:9904 +#: ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:1192 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1253 ../src/guestfs-actions.pod:1313 ../src/guestfs-actions.pod:1329 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1939 ../src/guestfs-actions.pod:1956 ../src/guestfs-actions.pod:1975 ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2364 ../src/guestfs-actions.pod:2476 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2679 ../src/guestfs-actions.pod:2806 ../src/guestfs-actions.pod:2947 ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3009 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3614 ../src/guestfs-actions.pod:3728 ../src/guestfs-actions.pod:3832 ../src/guestfs-actions.pod:3851 ../src/guestfs-actions.pod:4066 ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4115 ../src/guestfs-actions.pod:4149 ../src/guestfs-actions.pod:4220 ../src/guestfs-actions.pod:4240 ../src/guestfs-actions.pod:4260 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:5316 ../src/guestfs-actions.pod:5483 ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6989 ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7378 ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7605 ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8397 ../src/guestfs-actions.pod:8421 ../src/guestfs-actions.pod:8445 ../src/guestfs-actions.pod:9306 ../src/guestfs-actions.pod:9325 ../src/guestfs-actions.pod:9343 ../src/guestfs-actions.pod:9536 ../src/guestfs-actions.pod:9911 msgid "" "This function returns a string, or NULL on error. I." @@ -29678,7 +29695,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:523 ../src/guestfs-actions.pod:539 ../src/guestfs-actions.pod:687 ../src/guestfs-actions.pod:1451 ../src/guestfs-actions.pod:2191 ../src/guestfs-actions.pod:2210 ../src/guestfs-actions.pod:2313 ../src/guestfs-actions.pod:2332 ../src/guestfs-actions.pod:2601 ../src/guestfs-actions.pod:3270 ../src/guestfs-actions.pod:3286 ../src/guestfs-actions.pod:3305 ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3465 ../src/guestfs-actions.pod:3514 ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:4168 ../src/guestfs-actions.pod:4456 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:4823 ../src/guestfs-actions.pod:4843 ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4918 ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5455 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7350 ../src/guestfs-actions.pod:7476 ../src/guestfs-actions.pod:7590 ../src/guestfs-actions.pod:8454 ../src/guestfs-actions.pod:8538 ../src/guestfs-actions.pod:8593 ../src/guestfs-actions.pod:8739 ../src/guestfs-actions.pod:8763 ../src/guestfs-actions.pod:9403 ../src/guestfs-actions.pod:9442 ../src/guestfs-actions.pod:9489 ../src/guestfs-actions.pod:9719 ../src/guestfs-actions.pod:9738 ../src/guestfs-actions.pod:9854 ../src/guestfs-actions.pod:9873 ../src/guestfs-actions.pod:9919 ../src/guestfs-actions.pod:9938 +#: ../src/guestfs-actions.pod:523 ../src/guestfs-actions.pod:539 ../src/guestfs-actions.pod:687 ../src/guestfs-actions.pod:1451 ../src/guestfs-actions.pod:2191 ../src/guestfs-actions.pod:2210 ../src/guestfs-actions.pod:2313 ../src/guestfs-actions.pod:2332 ../src/guestfs-actions.pod:2601 ../src/guestfs-actions.pod:3270 ../src/guestfs-actions.pod:3286 ../src/guestfs-actions.pod:3305 ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3465 ../src/guestfs-actions.pod:3514 ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:4168 ../src/guestfs-actions.pod:4456 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:4823 ../src/guestfs-actions.pod:4843 ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4918 ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5455 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7350 ../src/guestfs-actions.pod:7476 ../src/guestfs-actions.pod:7590 ../src/guestfs-actions.pod:8461 ../src/guestfs-actions.pod:8545 ../src/guestfs-actions.pod:8600 ../src/guestfs-actions.pod:8746 ../src/guestfs-actions.pod:8770 ../src/guestfs-actions.pod:9410 ../src/guestfs-actions.pod:9449 ../src/guestfs-actions.pod:9496 ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 msgid "" "This function returns a NULL-terminated array of strings (like " "L), or NULL if there was an error. I, where " @@ -30479,7 +30496,7 @@ msgid "See also C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9321 +#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9328 msgid "(Added in 1.0.75)" msgstr "" @@ -30508,7 +30525,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1259 ../src/guestfs-actions.pod:4827 ../src/guestfs-actions.pod:4922 ../src/guestfs-actions.pod:4939 ../src/guestfs-actions.pod:5043 ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:7354 ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9493 ../src/guestfs-actions.pod:9507 +#: ../src/guestfs-actions.pod:1259 ../src/guestfs-actions.pod:4827 ../src/guestfs-actions.pod:4922 ../src/guestfs-actions.pod:4939 ../src/guestfs-actions.pod:5043 ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:7354 ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9500 ../src/guestfs-actions.pod:9514 msgid "(Added in 0.4)" msgstr "" @@ -30539,7 +30556,7 @@ msgid "To get the checksums for many files, use C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:2001 ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:4504 ../src/guestfs-actions.pod:4565 ../src/guestfs-actions.pod:4592 ../src/guestfs-actions.pod:9177 +#: ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:2001 ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:4504 ../src/guestfs-actions.pod:4565 ../src/guestfs-actions.pod:4592 ../src/guestfs-actions.pod:9184 msgid "(Added in 1.0.2)" msgstr "" @@ -30568,7 +30585,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:6785 ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:6955 ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:7155 ../src/guestfs-actions.pod:9044 ../src/guestfs-actions.pod:9058 ../src/guestfs-actions.pod:9519 +#: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:6785 ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:6955 ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:7155 ../src/guestfs-actions.pod:9051 ../src/guestfs-actions.pod:9065 ../src/guestfs-actions.pod:9526 msgid "(Added in 1.3.2)" msgstr "" @@ -30718,7 +30735,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8180 +#: ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8187 msgid "(Added in 1.13.15)" msgstr "" @@ -30895,7 +30912,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1735 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:1847 ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2027 ../src/guestfs-actions.pod:2072 ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9172 ../src/guestfs-actions.pod:9206 ../src/guestfs-actions.pod:9768 ../src/guestfs-actions.pod:9791 ../src/guestfs-actions.pod:9816 +#: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1735 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:1847 ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2027 ../src/guestfs-actions.pod:2072 ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9179 ../src/guestfs-actions.pod:9213 ../src/guestfs-actions.pod:9775 ../src/guestfs-actions.pod:9798 ../src/guestfs-actions.pod:9823 msgid "" "This long-running command can generate progress notification messages so " "that the caller can display a progress bar or indicator. To receive these " @@ -31207,7 +31224,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9407 ../src/guestfs-actions.pod:9446 ../src/guestfs-actions.pod:9532 +#: ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9414 ../src/guestfs-actions.pod:9453 ../src/guestfs-actions.pod:9539 msgid "(Added in 1.0.87)" msgstr "" @@ -31322,7 +31339,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:1942 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2077 ../src/guestfs-actions.pod:3377 ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3469 ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:6509 ../src/guestfs-actions.pod:8746 ../src/guestfs-actions.pod:8770 ../src/guestfs-actions.pod:9572 ../src/guestfs-actions.pod:9585 ../src/guestfs-actions.pod:9598 +#: ../src/guestfs-actions.pod:1942 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2077 ../src/guestfs-actions.pod:3377 ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3469 ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:6509 ../src/guestfs-actions.pod:8753 ../src/guestfs-actions.pod:8777 ../src/guestfs-actions.pod:9579 ../src/guestfs-actions.pod:9592 ../src/guestfs-actions.pod:9605 msgid "(Added in 1.0.54)" msgstr "" @@ -31415,7 +31432,7 @@ msgid "See also C, C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9211 +#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9218 msgid "(Added in 1.5.17)" msgstr "" @@ -31569,7 +31586,7 @@ msgid "See also C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:3159 ../src/guestfs-actions.pod:8204 +#: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:3159 ../src/guestfs-actions.pod:8211 msgid "(Added in 1.0.69)" msgstr "" @@ -31590,7 +31607,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2274 ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2339 ../src/guestfs-actions.pod:3293 ../src/guestfs-actions.pod:3312 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3503 ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3562 ../src/guestfs-actions.pod:3584 ../src/guestfs-actions.pod:3597 ../src/guestfs-actions.pod:4968 ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4995 ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:6303 ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7608 ../src/guestfs-actions.pod:8614 ../src/guestfs-actions.pod:8626 ../src/guestfs-actions.pod:8639 ../src/guestfs-actions.pod:8652 ../src/guestfs-actions.pod:8674 ../src/guestfs-actions.pod:8687 ../src/guestfs-actions.pod:8700 ../src/guestfs-actions.pod:8713 ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 +#: ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2274 ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2339 ../src/guestfs-actions.pod:3293 ../src/guestfs-actions.pod:3312 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3503 ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3562 ../src/guestfs-actions.pod:3584 ../src/guestfs-actions.pod:3597 ../src/guestfs-actions.pod:4968 ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4995 ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:6303 ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7608 ../src/guestfs-actions.pod:8621 ../src/guestfs-actions.pod:8633 ../src/guestfs-actions.pod:8646 ../src/guestfs-actions.pod:8659 ../src/guestfs-actions.pod:8681 ../src/guestfs-actions.pod:8694 ../src/guestfs-actions.pod:8707 ../src/guestfs-actions.pod:8720 ../src/guestfs-actions.pod:9733 ../src/guestfs-actions.pod:9752 ../src/guestfs-actions.pod:9868 ../src/guestfs-actions.pod:9887 ../src/guestfs-actions.pod:9933 ../src/guestfs-actions.pod:9952 msgid "(Added in 1.0.66)" msgstr "" @@ -32013,7 +32030,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9773 +#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9780 msgid "(Added in 1.0.16)" msgstr "" @@ -32122,7 +32139,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:7321 ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8358 ../src/guestfs-actions.pod:8377 ../src/guestfs-actions.pod:8393 ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:9358 ../src/guestfs-actions.pod:9373 ../src/guestfs-actions.pod:9842 +#: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:7321 ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8365 ../src/guestfs-actions.pod:8384 ../src/guestfs-actions.pod:8400 ../src/guestfs-actions.pod:8424 ../src/guestfs-actions.pod:9365 ../src/guestfs-actions.pod:9380 ../src/guestfs-actions.pod:9849 msgid "(Added in 1.0.26)" msgstr "" @@ -32146,7 +32163,7 @@ msgid "Return the current attach method. See C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7830 +#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7837 msgid "(Added in 1.9.8)" msgstr "" @@ -32179,7 +32196,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7871 +#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7878 msgid "(Added in 1.0.72)" msgstr "" @@ -32211,7 +32228,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2970 ../src/guestfs-actions.pod:7910 ../src/guestfs-actions.pod:7949 +#: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2970 ../src/guestfs-actions.pod:7917 ../src/guestfs-actions.pod:7956 msgid "(Added in 1.17.31)" msgstr "" @@ -32258,7 +32275,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2991 ../src/guestfs-actions.pod:3012 ../src/guestfs-actions.pod:7974 ../src/guestfs-actions.pod:7993 +#: ../src/guestfs-actions.pod:2991 ../src/guestfs-actions.pod:3012 ../src/guestfs-actions.pod:7981 ../src/guestfs-actions.pod:8000 msgid "(Added in 1.0.15)" msgstr "" @@ -32307,7 +32324,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:5945 ../src/guestfs-actions.pod:6208 ../src/guestfs-actions.pod:6227 ../src/guestfs-actions.pod:6246 ../src/guestfs-actions.pod:6258 ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8036 ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:9085 +#: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:5945 ../src/guestfs-actions.pod:6208 ../src/guestfs-actions.pod:6227 ../src/guestfs-actions.pod:6246 ../src/guestfs-actions.pod:6258 ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8043 ../src/guestfs-actions.pod:8335 ../src/guestfs-actions.pod:9092 msgid "(Added in 1.0.55)" msgstr "" @@ -32326,7 +32343,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8055 +#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8062 msgid "(Added in 1.5.4)" msgstr "" @@ -32366,7 +32383,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8093 ../src/guestfs-actions.pod:9657 +#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8100 ../src/guestfs-actions.pod:9664 msgid "(Added in 1.11.18)" msgstr "" @@ -32404,7 +32421,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8121 +#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8128 msgid "(Added in 1.0.6)" msgstr "" @@ -32423,7 +32440,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3108 ../src/guestfs-actions.pod:4750 ../src/guestfs-actions.pod:5110 ../src/guestfs-actions.pod:5521 ../src/guestfs-actions.pod:5784 ../src/guestfs-actions.pod:7251 ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8145 ../src/guestfs-actions.pod:8866 ../src/guestfs-actions.pod:8886 ../src/guestfs-actions.pod:9242 +#: ../src/guestfs-actions.pod:3108 ../src/guestfs-actions.pod:4750 ../src/guestfs-actions.pod:5110 ../src/guestfs-actions.pod:5521 ../src/guestfs-actions.pod:5784 ../src/guestfs-actions.pod:7251 ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8152 ../src/guestfs-actions.pod:8873 ../src/guestfs-actions.pod:8893 ../src/guestfs-actions.pod:9249 msgid "(Added in 1.0.77)" msgstr "" @@ -32449,7 +32466,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:3197 ../src/guestfs-actions.pod:8164 ../src/guestfs-actions.pod:8238 +#: ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:3197 ../src/guestfs-actions.pod:8171 ../src/guestfs-actions.pod:8245 msgid "(Added in 1.0.67)" msgstr "" @@ -32590,7 +32607,7 @@ msgid "See also: C, C, L." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:3223 ../src/guestfs-actions.pod:3440 ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:4776 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7270 ../src/guestfs-actions.pod:7451 ../src/guestfs-actions.pod:9422 +#: ../src/guestfs-actions.pod:3223 ../src/guestfs-actions.pod:3440 ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:4776 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7270 ../src/guestfs-actions.pod:7451 ../src/guestfs-actions.pod:9429 msgid "" "This function returns a buffer, or NULL on error. The size of the returned " "buffer is written to C<*size_r>. I, or NULL if there was an " "error. I after use>." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8509 ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:9030 +#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8516 ../src/guestfs-actions.pod:8534 ../src/guestfs-actions.pod:9037 msgid "(Added in 0.9.2)" msgstr "" @@ -34511,7 +34528,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9821 +#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9828 msgid "(Added in 1.17.18)" msgstr "" @@ -34606,7 +34623,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:7308 ../src/guestfs-actions.pod:9461 +#: ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:7308 ../src/guestfs-actions.pod:9468 msgid "(Added in 1.0.13)" msgstr "" @@ -34627,7 +34644,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9474 +#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9481 msgid "(Added in 1.0.83)" msgstr "" @@ -35691,7 +35708,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:9134 +#: ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:9141 msgid "(Added in 1.17.22)" msgstr "" @@ -35999,7 +36016,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8015 +#: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8022 msgid "(Added in 1.17.9)" msgstr "" @@ -36280,7 +36297,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:6876 ../src/guestfs-actions.pod:7335 ../src/guestfs-actions.pod:7408 ../src/guestfs-actions.pod:7676 ../src/guestfs-actions.pod:9637 +#: ../src/guestfs-actions.pod:6876 ../src/guestfs-actions.pod:7335 ../src/guestfs-actions.pod:7408 ../src/guestfs-actions.pod:7676 ../src/guestfs-actions.pod:9644 msgid "(Added in 1.3.14)" msgstr "" @@ -37205,12 +37222,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7832 +#: ../src/guestfs-actions.pod:7839 msgid "guestfs_set_autosync" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7834 +#: ../src/guestfs-actions.pod:7841 #, no-wrap msgid "" " int\n" @@ -37220,12 +37237,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7850 +#: ../src/guestfs-actions.pod:7857 msgid "guestfs_set_direct" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7852 +#: ../src/guestfs-actions.pod:7859 #, no-wrap msgid "" " int\n" @@ -37235,7 +37252,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7860 +#: ../src/guestfs-actions.pod:7867 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by C, but go straight to " @@ -37243,12 +37260,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7873 +#: ../src/guestfs-actions.pod:7880 msgid "guestfs_set_e2attrs" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7875 +#: ../src/guestfs-actions.pod:7882 #, no-wrap msgid "" " int\n" @@ -37260,7 +37277,7 @@ msgid "" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7886 +#: ../src/guestfs-actions.pod:7893 #, no-wrap msgid "" " GUESTFS_SET_E2ATTRS_CLEAR, int clear,\n" @@ -37268,7 +37285,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7891 +#: ../src/guestfs-actions.pod:7898 msgid "" "C is a string of characters representing file attributes. See " "C for a list of possible attributes. Not all " @@ -37276,12 +37293,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7912 +#: ../src/guestfs-actions.pod:7919 msgid "guestfs_set_e2attrs_va" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7914 +#: ../src/guestfs-actions.pod:7921 #, no-wrap msgid "" " int\n" @@ -37293,17 +37310,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7920 +#: ../src/guestfs-actions.pod:7927 msgid "This is the \"va_list variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7924 +#: ../src/guestfs-actions.pod:7931 msgid "guestfs_set_e2attrs_argv" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7926 +#: ../src/guestfs-actions.pod:7933 #, no-wrap msgid "" " int\n" @@ -37316,17 +37333,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7932 +#: ../src/guestfs-actions.pod:7939 msgid "This is the \"argv variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7936 +#: ../src/guestfs-actions.pod:7943 msgid "guestfs_set_e2generation" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7938 +#: ../src/guestfs-actions.pod:7945 #, no-wrap msgid "" " int\n" @@ -37337,17 +37354,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7945 +#: ../src/guestfs-actions.pod:7952 msgid "See C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7951 +#: ../src/guestfs-actions.pod:7958 msgid "guestfs_set_e2label" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7953 +#: ../src/guestfs-actions.pod:7960 #, no-wrap msgid "" " int\n" @@ -37358,26 +37375,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7958 +#: ../src/guestfs-actions.pod:7965 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7969 +#: ../src/guestfs-actions.pod:7976 msgid "" "You can use either C or C to return " "the existing label on a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7976 +#: ../src/guestfs-actions.pod:7983 msgid "guestfs_set_e2uuid" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7978 +#: ../src/guestfs-actions.pod:7985 #, no-wrap msgid "" " int\n" @@ -37388,19 +37405,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7988 +#: ../src/guestfs-actions.pod:7995 msgid "" "You can use either C or C to return " "the existing UUID of a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7995 +#: ../src/guestfs-actions.pod:8002 msgid "guestfs_set_label" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:7997 +#: ../src/guestfs-actions.pod:8004 #, no-wrap msgid "" " int\n" @@ -37411,17 +37428,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8011 +#: ../src/guestfs-actions.pod:8018 msgid "To read the label on a filesystem, call C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8017 +#: ../src/guestfs-actions.pod:8024 msgid "guestfs_set_memsize" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8019 +#: ../src/guestfs-actions.pod:8026 #, no-wrap msgid "" " int\n" @@ -37431,19 +37448,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8023 +#: ../src/guestfs-actions.pod:8030 msgid "" "This sets the memory size in megabytes allocated to the qemu subprocess. " "This only has any effect if called before C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8038 +#: ../src/guestfs-actions.pod:8045 msgid "guestfs_set_network" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8040 +#: ../src/guestfs-actions.pod:8047 #, no-wrap msgid "" " int\n" @@ -37453,19 +37470,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8050 +#: ../src/guestfs-actions.pod:8057 msgid "" "You must call this before calling C, otherwise it has no " "effect." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8057 +#: ../src/guestfs-actions.pod:8064 msgid "guestfs_set_path" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8059 +#: ../src/guestfs-actions.pod:8066 #, no-wrap msgid "" " int\n" @@ -37475,12 +37492,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8074 +#: ../src/guestfs-actions.pod:8081 msgid "guestfs_set_pgroup" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8076 +#: ../src/guestfs-actions.pod:8083 #, no-wrap msgid "" " int\n" @@ -37490,7 +37507,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8086 +#: ../src/guestfs-actions.pod:8093 msgid "" "The default for this flag is false, because usually you want C<^C> to kill " "the subprocess. Guestfish sets this flag to true when used interactively, " @@ -37499,12 +37516,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8095 +#: ../src/guestfs-actions.pod:8102 msgid "guestfs_set_qemu" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8097 +#: ../src/guestfs-actions.pod:8104 #, no-wrap msgid "" " int\n" @@ -37514,12 +37531,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8123 +#: ../src/guestfs-actions.pod:8130 msgid "guestfs_set_recovery_proc" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8125 +#: ../src/guestfs-actions.pod:8132 #, no-wrap msgid "" " int\n" @@ -37529,7 +37546,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8129 +#: ../src/guestfs-actions.pod:8136 msgid "" "If this is called with the parameter C then C does " "not create a recovery process. The purpose of the recovery process is to " @@ -37538,19 +37555,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8134 +#: ../src/guestfs-actions.pod:8141 msgid "" "This only has any effect if called before C, and the default " "is true." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8147 +#: ../src/guestfs-actions.pod:8154 msgid "guestfs_set_selinux" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8149 +#: ../src/guestfs-actions.pod:8156 #, no-wrap msgid "" " int\n" @@ -37560,12 +37577,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8166 +#: ../src/guestfs-actions.pod:8173 msgid "guestfs_set_smp" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8168 +#: ../src/guestfs-actions.pod:8175 #, no-wrap msgid "" " int\n" @@ -37575,17 +37592,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8176 +#: ../src/guestfs-actions.pod:8183 msgid "This function must be called before C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8182 +#: ../src/guestfs-actions.pod:8189 msgid "guestfs_set_trace" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8184 +#: ../src/guestfs-actions.pod:8191 #, no-wrap msgid "" " int\n" @@ -37595,19 +37612,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8198 +#: ../src/guestfs-actions.pod:8205 msgid "" "Trace messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8206 +#: ../src/guestfs-actions.pod:8213 msgid "guestfs_set_verbose" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8208 +#: ../src/guestfs-actions.pod:8215 #, no-wrap msgid "" " int\n" @@ -37617,19 +37634,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8217 +#: ../src/guestfs-actions.pod:8224 msgid "" "Verbose messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8225 +#: ../src/guestfs-actions.pod:8232 msgid "guestfs_setcon" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8227 +#: ../src/guestfs-actions.pod:8234 #, no-wrap msgid "" " int\n" @@ -37639,12 +37656,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8240 +#: ../src/guestfs-actions.pod:8247 msgid "guestfs_setxattr" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8242 +#: ../src/guestfs-actions.pod:8249 #, no-wrap msgid "" " int\n" @@ -37657,17 +37674,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8253 +#: ../src/guestfs-actions.pod:8260 msgid "See also: C, L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8259 +#: ../src/guestfs-actions.pod:8266 msgid "guestfs_sfdisk" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8261 +#: ../src/guestfs-actions.pod:8268 #, no-wrap msgid "" " int\n" @@ -37681,24 +37698,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8310 ../src/guestfs-actions.pod:8341 +#: ../src/guestfs-actions.pod:8276 ../src/guestfs-actions.pod:8317 ../src/guestfs-actions.pod:8348 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8296 +#: ../src/guestfs-actions.pod:8303 msgid "See also: C, C, C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8303 +#: ../src/guestfs-actions.pod:8310 msgid "guestfs_sfdiskM" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8305 +#: ../src/guestfs-actions.pod:8312 #, no-wrap msgid "" " int\n" @@ -37709,7 +37726,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8317 +#: ../src/guestfs-actions.pod:8324 msgid "" "This is a simplified interface to the C command, where " "partition sizes are specified in megabytes only (rounded to the nearest " @@ -37718,19 +37735,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8323 +#: ../src/guestfs-actions.pod:8330 msgid "" "See also: C, the L manpage and " "C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8330 +#: ../src/guestfs-actions.pod:8337 msgid "guestfs_sfdisk_N" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8332 +#: ../src/guestfs-actions.pod:8339 #, no-wrap msgid "" " int\n" @@ -37745,24 +37762,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8351 +#: ../src/guestfs-actions.pod:8358 msgid "" "For other parameters, see C. You should usually pass C<0> " "for the cyls/heads/sectors parameters." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8354 +#: ../src/guestfs-actions.pod:8361 msgid "See also: C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8360 +#: ../src/guestfs-actions.pod:8367 msgid "guestfs_sfdisk_disk_geometry" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8362 +#: ../src/guestfs-actions.pod:8369 #, no-wrap msgid "" " char *\n" @@ -37772,7 +37789,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8366 +#: ../src/guestfs-actions.pod:8373 msgid "" "This displays the disk geometry of C read from the partition table. " "Especially in the case where the underlying block device has been resized, " @@ -37781,12 +37798,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8379 +#: ../src/guestfs-actions.pod:8386 msgid "guestfs_sfdisk_kernel_geometry" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8381 +#: ../src/guestfs-actions.pod:8388 #, no-wrap msgid "" " char *\n" @@ -37796,12 +37813,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8395 +#: ../src/guestfs-actions.pod:8402 msgid "guestfs_sfdisk_l" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8397 +#: ../src/guestfs-actions.pod:8404 #, no-wrap msgid "" " char *\n" @@ -37811,24 +37828,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8401 +#: ../src/guestfs-actions.pod:8408 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8412 +#: ../src/guestfs-actions.pod:8419 msgid "See also: C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8419 +#: ../src/guestfs-actions.pod:8426 msgid "guestfs_sh" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8421 +#: ../src/guestfs-actions.pod:8428 #, no-wrap msgid "" " char *\n" @@ -37838,22 +37855,22 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8428 +#: ../src/guestfs-actions.pod:8435 msgid "This is like C, but passes the command to:" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8436 +#: ../src/guestfs-actions.pod:8443 msgid "All the provisos about C apply to this call." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8443 +#: ../src/guestfs-actions.pod:8450 msgid "guestfs_sh_lines" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8445 +#: ../src/guestfs-actions.pod:8452 #, no-wrap msgid "" " char **\n" @@ -37863,24 +37880,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8449 +#: ../src/guestfs-actions.pod:8456 msgid "" "This is the same as C, but splits the result into a list of " "lines." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8452 +#: ../src/guestfs-actions.pod:8459 msgid "See also: C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8460 +#: ../src/guestfs-actions.pod:8467 msgid "guestfs_shutdown" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8462 +#: ../src/guestfs-actions.pod:8469 #, no-wrap msgid "" " int\n" @@ -37889,7 +37906,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8465 +#: ../src/guestfs-actions.pod:8472 msgid "" "This is the opposite of C. It performs an orderly shutdown " "of the backend process(es). If the autosync flag is set (which is the " @@ -37897,26 +37914,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8475 +#: ../src/guestfs-actions.pod:8482 msgid "" "This call does I close or free up the handle. You still need to call " "C afterwards." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8478 +#: ../src/guestfs-actions.pod:8485 msgid "" "C will call this if you don't do it explicitly, but note that " "any errors are ignored in that case." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8483 +#: ../src/guestfs-actions.pod:8490 msgid "guestfs_sleep" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8485 +#: ../src/guestfs-actions.pod:8492 #, no-wrap msgid "" " int\n" @@ -37926,17 +37943,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8493 +#: ../src/guestfs-actions.pod:8500 msgid "(Added in 1.0.41)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8495 ../src/guestfs-structs.pod:109 +#: ../src/guestfs-actions.pod:8502 ../src/guestfs-structs.pod:109 msgid "guestfs_stat" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8497 +#: ../src/guestfs-actions.pod:8504 #, no-wrap msgid "" " struct guestfs_stat *\n" @@ -37946,12 +37963,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8511 ../src/guestfs-structs.pod:135 +#: ../src/guestfs-actions.pod:8518 ../src/guestfs-structs.pod:135 msgid "guestfs_statvfs" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8513 +#: ../src/guestfs-actions.pod:8520 #, no-wrap msgid "" " struct guestfs_statvfs *\n" @@ -37961,19 +37978,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8523 +#: ../src/guestfs-actions.pod:8530 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8529 +#: ../src/guestfs-actions.pod:8536 msgid "guestfs_strings" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8531 +#: ../src/guestfs-actions.pod:8538 #, no-wrap msgid "" " char **\n" @@ -37983,12 +38000,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8547 +#: ../src/guestfs-actions.pod:8554 msgid "guestfs_strings_e" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8549 +#: ../src/guestfs-actions.pod:8556 #, no-wrap msgid "" " char **\n" @@ -37999,26 +38016,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8554 +#: ../src/guestfs-actions.pod:8561 msgid "" "This is like the C command, but allows you to specify the " "encoding of strings that are looked for in the source file C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8564 +#: ../src/guestfs-actions.pod:8571 msgid "" "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of " "ISO-8859-X (this is what C uses)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8602 +#: ../src/guestfs-actions.pod:8609 msgid "guestfs_swapoff_device" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8604 +#: ../src/guestfs-actions.pod:8611 #, no-wrap msgid "" " int\n" @@ -38028,19 +38045,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8608 +#: ../src/guestfs-actions.pod:8615 msgid "" "This command disables the libguestfs appliance swap device or partition " "named C. See C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8616 +#: ../src/guestfs-actions.pod:8623 msgid "guestfs_swapoff_file" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8618 +#: ../src/guestfs-actions.pod:8625 #, no-wrap msgid "" " int\n" @@ -38050,12 +38067,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8628 +#: ../src/guestfs-actions.pod:8635 msgid "guestfs_swapoff_label" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8630 +#: ../src/guestfs-actions.pod:8637 #, no-wrap msgid "" " int\n" @@ -38065,12 +38082,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8641 +#: ../src/guestfs-actions.pod:8648 msgid "guestfs_swapoff_uuid" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8643 +#: ../src/guestfs-actions.pod:8650 #, no-wrap msgid "" " int\n" @@ -38080,12 +38097,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8654 +#: ../src/guestfs-actions.pod:8661 msgid "guestfs_swapon_device" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8656 +#: ../src/guestfs-actions.pod:8663 #, no-wrap msgid "" " int\n" @@ -38095,7 +38112,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8660 +#: ../src/guestfs-actions.pod:8667 msgid "" "This command enables the libguestfs appliance to use the swap device or " "partition named C. The increased memory is made available for all " @@ -38103,12 +38120,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8676 +#: ../src/guestfs-actions.pod:8683 msgid "guestfs_swapon_file" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8678 +#: ../src/guestfs-actions.pod:8685 #, no-wrap msgid "" " int\n" @@ -38118,19 +38135,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8682 +#: ../src/guestfs-actions.pod:8689 msgid "" "This command enables swap to a file. See C for other " "notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8689 +#: ../src/guestfs-actions.pod:8696 msgid "guestfs_swapon_label" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8691 +#: ../src/guestfs-actions.pod:8698 #, no-wrap msgid "" " int\n" @@ -38140,19 +38157,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8695 +#: ../src/guestfs-actions.pod:8702 msgid "" "This command enables swap to a labeled swap partition. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8702 +#: ../src/guestfs-actions.pod:8709 msgid "guestfs_swapon_uuid" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8704 +#: ../src/guestfs-actions.pod:8711 #, no-wrap msgid "" " int\n" @@ -38162,19 +38179,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8708 +#: ../src/guestfs-actions.pod:8715 msgid "" "This command enables swap to a swap partition with the given UUID. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8715 +#: ../src/guestfs-actions.pod:8722 msgid "guestfs_sync" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8717 +#: ../src/guestfs-actions.pod:8724 #, no-wrap msgid "" " int\n" @@ -38183,12 +38200,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8730 +#: ../src/guestfs-actions.pod:8737 msgid "guestfs_tail" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8732 +#: ../src/guestfs-actions.pod:8739 #, no-wrap msgid "" " char **\n" @@ -38198,12 +38215,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8748 +#: ../src/guestfs-actions.pod:8755 msgid "guestfs_tail_n" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8750 +#: ../src/guestfs-actions.pod:8757 #, no-wrap msgid "" " char **\n" @@ -38214,12 +38231,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8772 +#: ../src/guestfs-actions.pod:8779 msgid "guestfs_tar_in" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8774 +#: ../src/guestfs-actions.pod:8781 #, no-wrap msgid "" " int\n" @@ -38230,22 +38247,22 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8782 +#: ../src/guestfs-actions.pod:8789 msgid "To upload a compressed tarball, use C or C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8787 ../src/guestfs-actions.pod:8804 ../src/guestfs-actions.pod:8820 ../src/guestfs-actions.pod:8836 +#: ../src/guestfs-actions.pod:8794 ../src/guestfs-actions.pod:8811 ../src/guestfs-actions.pod:8827 ../src/guestfs-actions.pod:8843 msgid "(Added in 1.0.3)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8789 +#: ../src/guestfs-actions.pod:8796 msgid "guestfs_tar_out" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8791 +#: ../src/guestfs-actions.pod:8798 #, no-wrap msgid "" " int\n" @@ -38256,19 +38273,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8799 +#: ../src/guestfs-actions.pod:8806 msgid "" "To download a compressed tarball, use C or " "C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8806 +#: ../src/guestfs-actions.pod:8813 msgid "guestfs_tgz_in" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8808 +#: ../src/guestfs-actions.pod:8815 #, no-wrap msgid "" " int\n" @@ -38279,17 +38296,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8816 +#: ../src/guestfs-actions.pod:8823 msgid "To upload an uncompressed tarball, use C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8822 +#: ../src/guestfs-actions.pod:8829 msgid "guestfs_tgz_out" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8824 +#: ../src/guestfs-actions.pod:8831 #, no-wrap msgid "" " int\n" @@ -38300,17 +38317,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8832 +#: ../src/guestfs-actions.pod:8839 msgid "To download an uncompressed tarball, use C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8838 +#: ../src/guestfs-actions.pod:8845 msgid "guestfs_touch" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8840 +#: ../src/guestfs-actions.pod:8847 #, no-wrap msgid "" " int\n" @@ -38320,12 +38337,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8855 +#: ../src/guestfs-actions.pod:8862 msgid "guestfs_truncate" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8857 +#: ../src/guestfs-actions.pod:8864 #, no-wrap msgid "" " int\n" @@ -38335,12 +38352,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8868 +#: ../src/guestfs-actions.pod:8875 msgid "guestfs_truncate_size" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8870 +#: ../src/guestfs-actions.pod:8877 #, no-wrap msgid "" " int\n" @@ -38351,7 +38368,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8878 +#: ../src/guestfs-actions.pod:8885 msgid "" "If the current file size is less than C then the file is extended to " "the required size with zero bytes. This creates a sparse file (ie. disk " @@ -38360,12 +38377,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8888 +#: ../src/guestfs-actions.pod:8895 msgid "guestfs_tune2fs" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8890 +#: ../src/guestfs-actions.pod:8897 #, no-wrap msgid "" " int\n" @@ -38376,7 +38393,7 @@ msgid "" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8900 +#: ../src/guestfs-actions.pod:8907 #, no-wrap msgid "" " GUESTFS_TUNE2FS_FORCE, int force,\n" @@ -38393,7 +38410,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8980 +#: ../src/guestfs-actions.pod:8987 msgid "" "To get the current values of filesystem parameters, see " "C. For precise details of how tune2fs works, see the " @@ -38401,12 +38418,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8988 +#: ../src/guestfs-actions.pod:8995 msgid "guestfs_tune2fs_va" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8990 +#: ../src/guestfs-actions.pod:8997 #, no-wrap msgid "" " int\n" @@ -38417,17 +38434,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8995 +#: ../src/guestfs-actions.pod:9002 msgid "This is the \"va_list variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8999 +#: ../src/guestfs-actions.pod:9006 msgid "guestfs_tune2fs_argv" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9001 +#: ../src/guestfs-actions.pod:9008 #, no-wrap msgid "" " int\n" @@ -38438,17 +38455,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9006 +#: ../src/guestfs-actions.pod:9013 msgid "This is the \"argv variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9010 +#: ../src/guestfs-actions.pod:9017 msgid "guestfs_tune2fs_l" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9012 +#: ../src/guestfs-actions.pod:9019 #, no-wrap msgid "" " char **\n" @@ -38458,12 +38475,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9032 +#: ../src/guestfs-actions.pod:9039 msgid "guestfs_txz_in" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9034 +#: ../src/guestfs-actions.pod:9041 #, no-wrap msgid "" " int\n" @@ -38474,12 +38491,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9046 +#: ../src/guestfs-actions.pod:9053 msgid "guestfs_txz_out" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9048 +#: ../src/guestfs-actions.pod:9055 #, no-wrap msgid "" " int\n" @@ -38490,12 +38507,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9060 +#: ../src/guestfs-actions.pod:9067 msgid "guestfs_umask" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9062 +#: ../src/guestfs-actions.pod:9069 #, no-wrap msgid "" " int\n" @@ -38505,19 +38522,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9078 +#: ../src/guestfs-actions.pod:9085 msgid "" "See also C, L, C, " "C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9087 +#: ../src/guestfs-actions.pod:9094 msgid "guestfs_umount" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9089 +#: ../src/guestfs-actions.pod:9096 #, no-wrap msgid "" " int\n" @@ -38527,12 +38544,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9101 +#: ../src/guestfs-actions.pod:9108 msgid "guestfs_umount_all" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9103 +#: ../src/guestfs-actions.pod:9110 #, no-wrap msgid "" " int\n" @@ -38541,12 +38558,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9114 +#: ../src/guestfs-actions.pod:9121 msgid "guestfs_umount_local" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9116 +#: ../src/guestfs-actions.pod:9123 #, no-wrap msgid "" " int\n" @@ -38556,7 +38573,7 @@ msgid "" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9125 +#: ../src/guestfs-actions.pod:9132 #, no-wrap msgid "" " GUESTFS_UMOUNT_LOCAL_RETRY, int retry,\n" @@ -38564,12 +38581,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9136 +#: ../src/guestfs-actions.pod:9143 msgid "guestfs_umount_local_va" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9138 +#: ../src/guestfs-actions.pod:9145 #, no-wrap msgid "" " int\n" @@ -38579,17 +38596,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9142 +#: ../src/guestfs-actions.pod:9149 msgid "This is the \"va_list variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9146 +#: ../src/guestfs-actions.pod:9153 msgid "guestfs_umount_local_argv" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9148 +#: ../src/guestfs-actions.pod:9155 #, no-wrap msgid "" " int\n" @@ -38600,17 +38617,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9152 +#: ../src/guestfs-actions.pod:9159 msgid "This is the \"argv variant\" of L." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9156 +#: ../src/guestfs-actions.pod:9163 msgid "guestfs_upload" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9158 +#: ../src/guestfs-actions.pod:9165 #, no-wrap msgid "" " int\n" @@ -38621,17 +38638,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9168 +#: ../src/guestfs-actions.pod:9175 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9179 +#: ../src/guestfs-actions.pod:9186 msgid "guestfs_upload_offset" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9181 +#: ../src/guestfs-actions.pod:9188 #, no-wrap msgid "" " int\n" @@ -38643,7 +38660,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9197 +#: ../src/guestfs-actions.pod:9204 msgid "" "Note that there is no limit on the amount of data that can be uploaded with " "this call, unlike with C, and this call always writes the " @@ -38651,17 +38668,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9202 +#: ../src/guestfs-actions.pod:9209 msgid "See also C, C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9213 +#: ../src/guestfs-actions.pod:9220 msgid "guestfs_utimens" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9215 +#: ../src/guestfs-actions.pod:9222 #, no-wrap msgid "" " int\n" @@ -38675,12 +38692,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9244 ../src/guestfs-structs.pod:175 +#: ../src/guestfs-actions.pod:9251 ../src/guestfs-structs.pod:175 msgid "guestfs_version" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9246 +#: ../src/guestfs-actions.pod:9253 #, no-wrap msgid "" " struct guestfs_version *\n" @@ -38689,7 +38706,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9274 +#: ../src/guestfs-actions.pod:9281 msgid "" "I Don't use this call to test for availability of features. In " "enterprise distributions we backport features from later versions into " @@ -38698,24 +38715,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9280 +#: ../src/guestfs-actions.pod:9287 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9284 +#: ../src/guestfs-actions.pod:9291 msgid "(Added in 1.0.58)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9286 +#: ../src/guestfs-actions.pod:9293 msgid "guestfs_vfs_label" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9288 +#: ../src/guestfs-actions.pod:9295 #, no-wrap msgid "" " char *\n" @@ -38725,22 +38742,22 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9297 +#: ../src/guestfs-actions.pod:9304 msgid "To find a filesystem from the label, use C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9302 ../src/guestfs-actions.pod:9339 +#: ../src/guestfs-actions.pod:9309 ../src/guestfs-actions.pod:9346 msgid "(Added in 1.3.18)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9304 +#: ../src/guestfs-actions.pod:9311 msgid "guestfs_vfs_type" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9306 +#: ../src/guestfs-actions.pod:9313 #, no-wrap msgid "" " char *\n" @@ -38750,12 +38767,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9323 +#: ../src/guestfs-actions.pod:9330 msgid "guestfs_vfs_uuid" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9325 +#: ../src/guestfs-actions.pod:9332 #, no-wrap msgid "" " char *\n" @@ -38765,17 +38782,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9334 +#: ../src/guestfs-actions.pod:9341 msgid "To find a filesystem from the UUID, use C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9341 +#: ../src/guestfs-actions.pod:9348 msgid "guestfs_vg_activate" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9343 +#: ../src/guestfs-actions.pod:9350 #, no-wrap msgid "" " int\n" @@ -38786,12 +38803,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9360 +#: ../src/guestfs-actions.pod:9367 msgid "guestfs_vg_activate_all" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9362 +#: ../src/guestfs-actions.pod:9369 #, no-wrap msgid "" " int\n" @@ -38801,12 +38818,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9375 +#: ../src/guestfs-actions.pod:9382 msgid "guestfs_vgcreate" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9377 +#: ../src/guestfs-actions.pod:9384 #, no-wrap msgid "" " int\n" @@ -38817,12 +38834,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9389 +#: ../src/guestfs-actions.pod:9396 msgid "guestfs_vglvuuids" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9391 +#: ../src/guestfs-actions.pod:9398 #, no-wrap msgid "" " char **\n" @@ -38832,24 +38849,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9398 +#: ../src/guestfs-actions.pod:9405 msgid "" "You can use this along with C and C calls to " "associate logical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9401 +#: ../src/guestfs-actions.pod:9408 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9409 +#: ../src/guestfs-actions.pod:9416 msgid "guestfs_vgmeta" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9411 +#: ../src/guestfs-actions.pod:9418 #, no-wrap msgid "" " char *\n" @@ -38860,17 +38877,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9426 +#: ../src/guestfs-actions.pod:9433 msgid "(Added in 1.17.20)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9428 +#: ../src/guestfs-actions.pod:9435 msgid "guestfs_vgpvuuids" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9430 +#: ../src/guestfs-actions.pod:9437 #, no-wrap msgid "" " char **\n" @@ -38880,24 +38897,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9437 +#: ../src/guestfs-actions.pod:9444 msgid "" "You can use this along with C and C calls to " "associate physical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9440 +#: ../src/guestfs-actions.pod:9447 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9448 +#: ../src/guestfs-actions.pod:9455 msgid "guestfs_vgremove" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9450 +#: ../src/guestfs-actions.pod:9457 #, no-wrap msgid "" " int\n" @@ -38907,12 +38924,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9463 +#: ../src/guestfs-actions.pod:9470 msgid "guestfs_vgrename" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9465 +#: ../src/guestfs-actions.pod:9472 #, no-wrap msgid "" " int\n" @@ -38923,12 +38940,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9476 +#: ../src/guestfs-actions.pod:9483 msgid "guestfs_vgs" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9478 +#: ../src/guestfs-actions.pod:9485 #, no-wrap msgid "" " char **\n" @@ -38937,17 +38954,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9487 +#: ../src/guestfs-actions.pod:9494 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9495 +#: ../src/guestfs-actions.pod:9502 msgid "guestfs_vgs_full" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9497 +#: ../src/guestfs-actions.pod:9504 #, no-wrap msgid "" " struct guestfs_lvm_vg_list *\n" @@ -38956,7 +38973,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9503 +#: ../src/guestfs-actions.pod:9510 msgid "" "This function returns a C, or NULL if there " "was an error. I after " @@ -38964,12 +38981,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9509 +#: ../src/guestfs-actions.pod:9516 msgid "guestfs_vgscan" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9511 +#: ../src/guestfs-actions.pod:9518 #, no-wrap msgid "" " int\n" @@ -38978,12 +38995,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9521 +#: ../src/guestfs-actions.pod:9528 msgid "guestfs_vguuid" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9523 +#: ../src/guestfs-actions.pod:9530 #, no-wrap msgid "" " char *\n" @@ -38993,12 +39010,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9534 +#: ../src/guestfs-actions.pod:9541 msgid "guestfs_wait_ready" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9536 +#: ../src/guestfs-actions.pod:9543 #, no-wrap msgid "" " int\n" @@ -39007,19 +39024,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9539 +#: ../src/guestfs-actions.pod:9546 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9546 +#: ../src/guestfs-actions.pod:9553 msgid "This function is a no op." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9548 +#: ../src/guestfs-actions.pod:9555 msgid "" "In versions of the API E 1.0.71 you had to call this function just after " "calling C to wait for the launch to complete. However this " @@ -39027,19 +39044,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9553 +#: ../src/guestfs-actions.pod:9560 msgid "" "If you see any calls to this function in code then you can just remove them, " "unless you want to retain compatibility with older versions of the API." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9561 +#: ../src/guestfs-actions.pod:9568 msgid "guestfs_wc_c" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9563 +#: ../src/guestfs-actions.pod:9570 #, no-wrap msgid "" " int\n" @@ -39049,12 +39066,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9574 +#: ../src/guestfs-actions.pod:9581 msgid "guestfs_wc_l" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9576 +#: ../src/guestfs-actions.pod:9583 #, no-wrap msgid "" " int\n" @@ -39064,12 +39081,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9587 +#: ../src/guestfs-actions.pod:9594 msgid "guestfs_wc_w" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9589 +#: ../src/guestfs-actions.pod:9596 #, no-wrap msgid "" " int\n" @@ -39079,12 +39096,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9600 +#: ../src/guestfs-actions.pod:9607 msgid "guestfs_wipefs" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9602 +#: ../src/guestfs-actions.pod:9609 #, no-wrap msgid "" " int\n" @@ -39094,17 +39111,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9612 +#: ../src/guestfs-actions.pod:9619 msgid "Compare with C which zeroes the first few blocks of a device." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9619 +#: ../src/guestfs-actions.pod:9626 msgid "guestfs_write" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9621 +#: ../src/guestfs-actions.pod:9628 #, no-wrap msgid "" " int\n" @@ -39116,17 +39133,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9630 +#: ../src/guestfs-actions.pod:9637 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9639 +#: ../src/guestfs-actions.pod:9646 msgid "guestfs_write_append" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9641 +#: ../src/guestfs-actions.pod:9648 #, no-wrap msgid "" " int\n" @@ -39138,17 +39155,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9650 +#: ../src/guestfs-actions.pod:9657 msgid "See also C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9659 +#: ../src/guestfs-actions.pod:9666 msgid "guestfs_write_file" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9661 +#: ../src/guestfs-actions.pod:9668 #, no-wrap msgid "" " int\n" @@ -39160,19 +39177,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9667 +#: ../src/guestfs-actions.pod:9674 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9692 +#: ../src/guestfs-actions.pod:9699 msgid "guestfs_xfs_info" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9694 +#: ../src/guestfs-actions.pod:9701 #, no-wrap msgid "" " struct guestfs_xfsinfo *\n" @@ -39182,19 +39199,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9705 +#: ../src/guestfs-actions.pod:9712 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9709 +#: ../src/guestfs-actions.pod:9716 msgid "guestfs_zegrep" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9711 +#: ../src/guestfs-actions.pod:9718 #, no-wrap msgid "" " char **\n" @@ -39205,12 +39222,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9728 +#: ../src/guestfs-actions.pod:9735 msgid "guestfs_zegrepi" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9730 +#: ../src/guestfs-actions.pod:9737 #, no-wrap msgid "" " char **\n" @@ -39221,12 +39238,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9747 +#: ../src/guestfs-actions.pod:9754 msgid "guestfs_zero" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9749 +#: ../src/guestfs-actions.pod:9756 #, no-wrap msgid "" " int\n" @@ -39236,19 +39253,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9763 +#: ../src/guestfs-actions.pod:9770 msgid "" "See also: C, C, " "C" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9775 +#: ../src/guestfs-actions.pod:9782 msgid "guestfs_zero_device" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9777 +#: ../src/guestfs-actions.pod:9784 #, no-wrap msgid "" " int\n" @@ -39258,24 +39275,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9781 +#: ../src/guestfs-actions.pod:9788 msgid "" "This command writes zeroes over the entire C. Compare with " "C which just zeroes the first few blocks of a device." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9796 +#: ../src/guestfs-actions.pod:9803 msgid "(Added in 1.3.1)" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9798 +#: ../src/guestfs-actions.pod:9805 msgid "guestfs_zero_free_space" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9800 +#: ../src/guestfs-actions.pod:9807 #, no-wrap msgid "" " int\n" @@ -39285,7 +39302,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9810 +#: ../src/guestfs-actions.pod:9817 msgid "" "Free space is not \"trimmed\". You may want to call C " "either as an alternative to this, or after calling this, depending on your " @@ -39293,12 +39310,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9823 +#: ../src/guestfs-actions.pod:9830 msgid "guestfs_zerofree" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9825 +#: ../src/guestfs-actions.pod:9832 #, no-wrap msgid "" " int\n" @@ -39308,12 +39325,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9844 +#: ../src/guestfs-actions.pod:9851 msgid "guestfs_zfgrep" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9846 +#: ../src/guestfs-actions.pod:9853 #, no-wrap msgid "" " char **\n" @@ -39324,12 +39341,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9863 +#: ../src/guestfs-actions.pod:9870 msgid "guestfs_zfgrepi" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9865 +#: ../src/guestfs-actions.pod:9872 #, no-wrap msgid "" " char **\n" @@ -39340,12 +39357,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9882 +#: ../src/guestfs-actions.pod:9889 msgid "guestfs_zfile" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9884 +#: ../src/guestfs-actions.pod:9891 #, no-wrap msgid "" " char *\n" @@ -39356,26 +39373,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9889 +#: ../src/guestfs-actions.pod:9896 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9901 +#: ../src/guestfs-actions.pod:9908 msgid "" "Since 1.0.63, use C instead which can now process compressed " "files." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9909 +#: ../src/guestfs-actions.pod:9916 msgid "guestfs_zgrep" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9911 +#: ../src/guestfs-actions.pod:9918 #, no-wrap msgid "" " char **\n" @@ -39386,12 +39403,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9928 +#: ../src/guestfs-actions.pod:9935 msgid "guestfs_zgrepi" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:9930 +#: ../src/guestfs-actions.pod:9937 #, no-wrap msgid "" " char **\n" diff --git a/po-docs/uk.po b/po-docs/uk.po index 5887cee1..9982680d 100644 --- a/po-docs/uk.po +++ b/po-docs/uk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libguestfs\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2012-07-18 21:04+0200\n" +"POT-Creation-Date: 2012-07-19 16:02+0200\n" "PO-Revision-Date: 2012-07-10 17:15+0000\n" "Last-Translator: rjones \n" "Language-Team: Ukrainian \n" @@ -3318,7 +3318,7 @@ msgid "" msgstr "" #. type: =head2 -#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5108 +#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:5115 msgid "path" msgstr "ŃˆŠ»ŃŃ…" @@ -8816,20 +8816,20 @@ msgstr "" #: ../fish/guestfish-actions.pod:1324 ../fish/guestfish-actions.pod:1851 #: ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:3068 #: ../fish/guestfish-actions.pod:3899 ../fish/guestfish-actions.pod:4315 -#: ../fish/guestfish-actions.pod:5043 ../fish/guestfish-actions.pod:5291 -#: ../fish/guestfish-actions.pod:5311 ../fish/guestfish-actions.pod:5330 -#: ../fish/guestfish-actions.pod:5368 ../fish/guestfish-actions.pod:6150 -#: ../fish/guestfish-actions.pod:6278 ../src/guestfs-actions.pod:10 +#: ../fish/guestfish-actions.pod:5050 ../fish/guestfish-actions.pod:5298 +#: ../fish/guestfish-actions.pod:5318 ../fish/guestfish-actions.pod:5337 +#: ../fish/guestfish-actions.pod:5375 ../fish/guestfish-actions.pod:6157 +#: ../fish/guestfish-actions.pod:6285 ../src/guestfs-actions.pod:10 #: ../src/guestfs-actions.pod:301 ../src/guestfs-actions.pod:322 #: ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1892 #: ../src/guestfs-actions.pod:2151 ../src/guestfs-actions.pod:2260 #: ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3002 #: ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:6059 -#: ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7961 -#: ../src/guestfs-actions.pod:8272 ../src/guestfs-actions.pod:8313 -#: ../src/guestfs-actions.pod:8344 ../src/guestfs-actions.pod:8404 -#: ../src/guestfs-actions.pod:9542 ../src/guestfs-actions.pod:9670 -#: ../src/guestfs-actions.pod:9892 +#: ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7968 +#: ../src/guestfs-actions.pod:8279 ../src/guestfs-actions.pod:8320 +#: ../src/guestfs-actions.pod:8351 ../src/guestfs-actions.pod:8411 +#: ../src/guestfs-actions.pod:9549 ../src/guestfs-actions.pod:9677 +#: ../src/guestfs-actions.pod:9899 msgid "" "Deprecated functions will not be removed from the API, but the fact that " "they are deprecated indicates that there are problems with correct use of " @@ -9008,8 +9008,8 @@ msgstr "" #: ../fish/guestfish-actions.pod:3882 ../fish/guestfish-actions.pod:3915 #: ../fish/guestfish-actions.pod:4078 ../fish/guestfish-actions.pod:4108 #: ../fish/guestfish-actions.pod:4251 ../fish/guestfish-actions.pod:4267 -#: ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5019 -#: ../fish/guestfish-actions.pod:5752 ../fish/guestfish-actions.pod:5834 +#: ../fish/guestfish-actions.pod:4303 ../fish/guestfish-actions.pod:5026 +#: ../fish/guestfish-actions.pod:5759 ../fish/guestfish-actions.pod:5841 msgid "" "This command has one or more optional arguments. See L." msgstr "" @@ -9781,10 +9781,10 @@ msgstr "" #: ../fish/guestfish-actions.pod:985 ../fish/guestfish-actions.pod:1168 #: ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1610 #: ../fish/guestfish-actions.pod:4228 ../fish/guestfish-actions.pod:4249 -#: ../fish/guestfish-actions.pod:5608 ../fish/guestfish-actions.pod:5620 -#: ../fish/guestfish-actions.pod:5631 ../fish/guestfish-actions.pod:5642 -#: ../fish/guestfish-actions.pod:5773 ../fish/guestfish-actions.pod:5782 -#: ../fish/guestfish-actions.pod:5847 ../fish/guestfish-actions.pod:5870 +#: ../fish/guestfish-actions.pod:5615 ../fish/guestfish-actions.pod:5627 +#: ../fish/guestfish-actions.pod:5638 ../fish/guestfish-actions.pod:5649 +#: ../fish/guestfish-actions.pod:5780 ../fish/guestfish-actions.pod:5789 +#: ../fish/guestfish-actions.pod:5854 ../fish/guestfish-actions.pod:5877 msgid "Use C<-> instead of a filename to read/write from stdin/stdout." msgstr "" @@ -10216,9 +10216,9 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:3584 -#: ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5682 +#: ../fish/guestfish-actions.pod:4278 ../fish/guestfish-actions.pod:5689 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:5563 -#: ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8914 +#: ../src/guestfs-actions.pod:6806 ../src/guestfs-actions.pod:8921 msgid "The optional parameters are:" msgstr "ДоГатковими параметрами є:" @@ -10567,13 +10567,13 @@ msgstr "" #: ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2145 #: ../fish/guestfish-actions.pod:4579 ../fish/guestfish-actions.pod:4594 #: ../fish/guestfish-actions.pod:4670 ../fish/guestfish-actions.pod:4687 -#: ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5449 -#: ../fish/guestfish-actions.pod:5495 ../fish/guestfish-actions.pod:5580 -#: ../fish/guestfish-actions.pod:5595 ../fish/guestfish-actions.pod:6114 -#: ../fish/guestfish-actions.pod:6126 ../fish/guestfish-actions.pod:6144 -#: ../fish/guestfish-actions.pod:6172 ../fish/guestfish-actions.pod:6182 -#: ../fish/guestfish-actions.pod:6250 ../fish/guestfish-actions.pod:6260 -#: ../fish/guestfish-actions.pod:6289 ../fish/guestfish-actions.pod:6299 +#: ../fish/guestfish-actions.pod:4702 ../fish/guestfish-actions.pod:5456 +#: ../fish/guestfish-actions.pod:5502 ../fish/guestfish-actions.pod:5587 +#: ../fish/guestfish-actions.pod:5602 ../fish/guestfish-actions.pod:6121 +#: ../fish/guestfish-actions.pod:6133 ../fish/guestfish-actions.pod:6151 +#: ../fish/guestfish-actions.pod:6179 ../fish/guestfish-actions.pod:6189 +#: ../fish/guestfish-actions.pod:6257 ../fish/guestfish-actions.pod:6267 +#: ../fish/guestfish-actions.pod:6296 ../fish/guestfish-actions.pod:6306 #: ../src/guestfs-actions.pod:1256 ../src/guestfs-actions.pod:1435 #: ../src/guestfs-actions.pod:1455 ../src/guestfs-actions.pod:2195 #: ../src/guestfs-actions.pod:2214 ../src/guestfs-actions.pod:2317 @@ -10583,13 +10583,13 @@ msgstr "" #: ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:3444 #: ../src/guestfs-actions.pod:7248 ../src/guestfs-actions.pod:7274 #: ../src/guestfs-actions.pod:7405 ../src/guestfs-actions.pod:7431 -#: ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8542 -#: ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8743 -#: ../src/guestfs-actions.pod:8767 ../src/guestfs-actions.pod:9634 -#: ../src/guestfs-actions.pod:9654 ../src/guestfs-actions.pod:9687 -#: ../src/guestfs-actions.pod:9723 ../src/guestfs-actions.pod:9742 -#: ../src/guestfs-actions.pod:9858 ../src/guestfs-actions.pod:9877 -#: ../src/guestfs-actions.pod:9923 ../src/guestfs-actions.pod:9942 +#: ../src/guestfs-actions.pod:7455 ../src/guestfs-actions.pod:8549 +#: ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8750 +#: ../src/guestfs-actions.pod:8774 ../src/guestfs-actions.pod:9641 +#: ../src/guestfs-actions.pod:9661 ../src/guestfs-actions.pod:9694 +#: ../src/guestfs-actions.pod:9730 ../src/guestfs-actions.pod:9749 +#: ../src/guestfs-actions.pod:9865 ../src/guestfs-actions.pod:9884 +#: ../src/guestfs-actions.pod:9930 ../src/guestfs-actions.pod:9949 msgid "" "Because of the message protocol, there is a transfer limit of somewhere " "between 2MB and 4MB. See L." @@ -11343,8 +11343,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5843 -#: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9166 +#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:5850 +#: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:9173 msgid "C can also be a named pipe." msgstr "" @@ -12518,8 +12518,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5015 -#: ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7904 +#: ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:5022 +#: ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:7911 msgid "" "These attributes are only present when the file is located on an ext2/3/4 " "filesystem. Using this call on other filesystem types will result in an " @@ -12869,9 +12869,9 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1937 -#: ../fish/guestfish-actions.pod:5088 ../fish/guestfish-actions.pod:5192 +#: ../fish/guestfish-actions.pod:5095 ../fish/guestfish-actions.pod:5199 #: ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3118 -#: ../src/guestfs-actions.pod:8031 ../src/guestfs-actions.pod:8159 +#: ../src/guestfs-actions.pod:8038 ../src/guestfs-actions.pod:8166 msgid "" "For more information on the architecture of libguestfs, see L." msgstr "" @@ -13450,8 +13450,8 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5593 -#: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8761 +#: ../fish/guestfish-actions.pod:2114 ../fish/guestfish-actions.pod:5600 +#: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:8768 msgid "If the parameter C is zero, this returns an empty list." msgstr "" @@ -16040,8 +16040,8 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5428 -#: ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8501 +#: ../fish/guestfish-actions.pod:3282 ../fish/guestfish-actions.pod:5435 +#: ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:8508 msgid "Returns file information for the given C." msgstr "" @@ -17908,8 +17908,8 @@ msgstr "" #. type: textblock #: ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4130 -#: ../fish/guestfish-actions.pod:5832 ../src/guestfs-actions.pod:6441 -#: ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9130 +#: ../fish/guestfish-actions.pod:5839 ../src/guestfs-actions.pod:6441 +#: ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:9137 msgid "See L for full documentation." msgstr "" @@ -18313,8 +18313,8 @@ msgid "" msgstr "" #. type: =item -#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5686 -#: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8918 +#: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:5693 +#: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8925 msgid "C" msgstr "C" @@ -19847,16 +19847,35 @@ msgstr "" #. type: =item #: ../fish/guestfish-actions.pod:4952 ../src/guestfs-actions.pod:7818 +#, fuzzy +#| msgid "B<-d libvirt-domain>" +msgid "C" +msgstr "B<-d Гомен-libvirt>" + +#. type: =item +#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +msgid "C>" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +msgid "" +"Use libvirt to launch the appliance. The optional I is the libvirt " +"connection URI to use (see L)." +msgstr "" + +#. type: =item +#: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7825 msgid "C>" msgstr "C>" #. type: textblock -#: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7820 +#: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7827 msgid "Connect to the Unix domain socket I." msgstr "Встановити Š·ā€™Ń”Š“Š½Š°Š½Š½Ń Š· сокетом Гомену Unix I<ŃˆŠ»ŃŃ…>." #. type: textblock -#: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7822 +#: ../fish/guestfish-actions.pod:4963 ../src/guestfs-actions.pod:7829 msgid "" "This method lets you connect to an existing daemon or (using virtio-serial) " "to a live guest. For more information, see L is true, this enables autosync. Libguestfs will make a best " "effort attempt to make filesystems consistent and synchronized when the " @@ -19892,24 +19911,24 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4973 ../src/guestfs-actions.pod:7843 +#: ../fish/guestfish-actions.pod:4980 ../src/guestfs-actions.pod:7850 msgid "" "This is enabled by default (since libguestfs 1.5.24, previously it was " "disabled by default)." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:4976 +#: ../fish/guestfish-actions.pod:4983 msgid "set-direct" msgstr "set-direct" #. type: =head2 -#: ../fish/guestfish-actions.pod:4978 +#: ../fish/guestfish-actions.pod:4985 msgid "direct" msgstr "direct" #. type: verbatim -#: ../fish/guestfish-actions.pod:4980 +#: ../fish/guestfish-actions.pod:4987 #, no-wrap msgid "" " set-direct true|false\n" @@ -19919,36 +19938,36 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7856 +#: ../fish/guestfish-actions.pod:4989 ../src/guestfs-actions.pod:7863 msgid "" "If the direct appliance mode flag is enabled, then stdin and stdout are " "passed directly through to the appliance once it is launched." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4986 +#: ../fish/guestfish-actions.pod:4993 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by L, but go straight to stdout." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4990 ../src/guestfs-actions.pod:7864 +#: ../fish/guestfish-actions.pod:4997 ../src/guestfs-actions.pod:7871 msgid "You probably don't want to use this unless you know what you are doing." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4993 ../src/guestfs-actions.pod:7867 +#: ../fish/guestfish-actions.pod:5000 ../src/guestfs-actions.pod:7874 msgid "The default is disabled." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:4995 +#: ../fish/guestfish-actions.pod:5002 msgid "set-e2attrs" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:4997 +#: ../fish/guestfish-actions.pod:5004 #, no-wrap msgid "" " set-e2attrs file attrs [clear:true|false]\n" @@ -19956,14 +19975,14 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7888 +#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 msgid "" "This sets or clears the file attributes C associated with the inode " "C." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5002 +#: ../fish/guestfish-actions.pod:5009 msgid "" "C is a string of characters representing file attributes. See L for a list of possible attributes. Not all attributes can be " @@ -19971,31 +19990,31 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7895 +#: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7902 msgid "" "If optional boolean C is not present or false, then the C " "listed are set in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5009 ../src/guestfs-actions.pod:7898 +#: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7905 msgid "If C is true, then the C listed are cleared in the inode." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5012 ../src/guestfs-actions.pod:7901 +#: ../fish/guestfish-actions.pod:5019 ../src/guestfs-actions.pod:7908 msgid "" "In both cases, other attributes not present in the C string are left " "unchanged." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:5021 +#: ../fish/guestfish-actions.pod:5028 msgid "set-e2generation" msgstr "" #. type: verbatim -#: ../fish/guestfish-actions.pod:5023 +#: ../fish/guestfish-actions.pod:5030 #, no-wrap msgid "" " set-e2generation file generation\n" @@ -20003,22 +20022,22 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5025 ../src/guestfs-actions.pod:7943 +#: ../fish/guestfish-actions.pod:5032 ../src/guestfs-actions.pod:7950 msgid "This sets the ext2 file generation of a file." msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5027 +#: ../fish/guestfish-actions.pod:5034 msgid "See L." msgstr "Див. L." #. type: =head2 -#: ../fish/guestfish-actions.pod:5029 +#: ../fish/guestfish-actions.pod:5036 msgid "set-e2label" msgstr "set-e2label" #. type: verbatim -#: ../fish/guestfish-actions.pod:5031 +#: ../fish/guestfish-actions.pod:5038 #, no-wrap msgid "" " set-e2label device label\n" @@ -20026,33 +20045,33 @@ msgid "" msgstr "" #. type: textblock -#: ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:7965 +#: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7972 msgid "" "This sets the ext2/3/4 filesystem label of the filesystem on C to " "C call instead." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:6282 +#: ../fish/guestfish-actions.pod:6289 msgid "zgrep" msgstr "zgrep" #. type: verbatim -#: ../fish/guestfish-actions.pod:6284 +#: ../fish/guestfish-actions.pod:6291 #, no-wrap msgid "" " zgrep regex path\n" @@ -22942,18 +22961,18 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:6286 ../src/guestfs-actions.pod:9916 +#: ../fish/guestfish-actions.pod:6293 ../src/guestfs-actions.pod:9923 msgid "" "This calls the external C program and returns the matching lines." msgstr "" #. type: =head2 -#: ../fish/guestfish-actions.pod:6292 +#: ../fish/guestfish-actions.pod:6299 msgid "zgrepi" msgstr "zgrepi" #. type: verbatim -#: ../fish/guestfish-actions.pod:6294 +#: ../fish/guestfish-actions.pod:6301 #, no-wrap msgid "" " zgrepi regex path\n" @@ -22963,7 +22982,7 @@ msgstr "" "\n" #. type: textblock -#: ../fish/guestfish-actions.pod:6296 ../src/guestfs-actions.pod:9935 +#: ../fish/guestfish-actions.pod:6303 ../src/guestfs-actions.pod:9942 msgid "" "This calls the external C program and returns the matching lines." msgstr "" @@ -31331,39 +31350,39 @@ msgstr "" #: ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7726 #: ../src/guestfs-actions.pod:7742 ../src/guestfs-actions.pod:7760 #: ../src/guestfs-actions.pod:7779 ../src/guestfs-actions.pod:7798 -#: ../src/guestfs-actions.pod:7828 ../src/guestfs-actions.pod:7846 -#: ../src/guestfs-actions.pod:7869 ../src/guestfs-actions.pod:7908 -#: ../src/guestfs-actions.pod:7947 ../src/guestfs-actions.pod:7972 -#: ../src/guestfs-actions.pod:7991 ../src/guestfs-actions.pod:8013 -#: ../src/guestfs-actions.pod:8034 ../src/guestfs-actions.pod:8053 -#: ../src/guestfs-actions.pod:8070 ../src/guestfs-actions.pod:8091 -#: ../src/guestfs-actions.pod:8119 ../src/guestfs-actions.pod:8143 -#: ../src/guestfs-actions.pod:8162 ../src/guestfs-actions.pod:8178 -#: ../src/guestfs-actions.pod:8202 ../src/guestfs-actions.pod:8221 -#: ../src/guestfs-actions.pod:8236 ../src/guestfs-actions.pod:8255 -#: ../src/guestfs-actions.pod:8299 ../src/guestfs-actions.pod:8326 -#: ../src/guestfs-actions.pod:8356 ../src/guestfs-actions.pod:8481 -#: ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8612 -#: ../src/guestfs-actions.pod:8624 ../src/guestfs-actions.pod:8637 -#: ../src/guestfs-actions.pod:8650 ../src/guestfs-actions.pod:8672 -#: ../src/guestfs-actions.pod:8685 ../src/guestfs-actions.pod:8698 -#: ../src/guestfs-actions.pod:8711 ../src/guestfs-actions.pod:8726 -#: ../src/guestfs-actions.pod:8785 ../src/guestfs-actions.pod:8802 -#: ../src/guestfs-actions.pod:8818 ../src/guestfs-actions.pod:8834 -#: ../src/guestfs-actions.pod:8851 ../src/guestfs-actions.pod:8864 -#: ../src/guestfs-actions.pod:8884 ../src/guestfs-actions.pod:8984 -#: ../src/guestfs-actions.pod:9042 ../src/guestfs-actions.pod:9056 -#: ../src/guestfs-actions.pod:9097 ../src/guestfs-actions.pod:9110 -#: ../src/guestfs-actions.pod:9132 ../src/guestfs-actions.pod:9170 -#: ../src/guestfs-actions.pod:9204 ../src/guestfs-actions.pod:9240 -#: ../src/guestfs-actions.pod:9356 ../src/guestfs-actions.pod:9371 -#: ../src/guestfs-actions.pod:9385 ../src/guestfs-actions.pod:9459 -#: ../src/guestfs-actions.pod:9472 ../src/guestfs-actions.pod:9517 -#: ../src/guestfs-actions.pod:9557 ../src/guestfs-actions.pod:9615 -#: ../src/guestfs-actions.pod:9632 ../src/guestfs-actions.pod:9652 -#: ../src/guestfs-actions.pod:9685 ../src/guestfs-actions.pod:9766 -#: ../src/guestfs-actions.pod:9789 ../src/guestfs-actions.pod:9814 -#: ../src/guestfs-actions.pod:9840 +#: ../src/guestfs-actions.pod:7835 ../src/guestfs-actions.pod:7853 +#: ../src/guestfs-actions.pod:7876 ../src/guestfs-actions.pod:7915 +#: ../src/guestfs-actions.pod:7954 ../src/guestfs-actions.pod:7979 +#: ../src/guestfs-actions.pod:7998 ../src/guestfs-actions.pod:8020 +#: ../src/guestfs-actions.pod:8041 ../src/guestfs-actions.pod:8060 +#: ../src/guestfs-actions.pod:8077 ../src/guestfs-actions.pod:8098 +#: ../src/guestfs-actions.pod:8126 ../src/guestfs-actions.pod:8150 +#: ../src/guestfs-actions.pod:8169 ../src/guestfs-actions.pod:8185 +#: ../src/guestfs-actions.pod:8209 ../src/guestfs-actions.pod:8228 +#: ../src/guestfs-actions.pod:8243 ../src/guestfs-actions.pod:8262 +#: ../src/guestfs-actions.pod:8306 ../src/guestfs-actions.pod:8333 +#: ../src/guestfs-actions.pod:8363 ../src/guestfs-actions.pod:8488 +#: ../src/guestfs-actions.pod:8498 ../src/guestfs-actions.pod:8619 +#: ../src/guestfs-actions.pod:8631 ../src/guestfs-actions.pod:8644 +#: ../src/guestfs-actions.pod:8657 ../src/guestfs-actions.pod:8679 +#: ../src/guestfs-actions.pod:8692 ../src/guestfs-actions.pod:8705 +#: ../src/guestfs-actions.pod:8718 ../src/guestfs-actions.pod:8733 +#: ../src/guestfs-actions.pod:8792 ../src/guestfs-actions.pod:8809 +#: ../src/guestfs-actions.pod:8825 ../src/guestfs-actions.pod:8841 +#: ../src/guestfs-actions.pod:8858 ../src/guestfs-actions.pod:8871 +#: ../src/guestfs-actions.pod:8891 ../src/guestfs-actions.pod:8991 +#: ../src/guestfs-actions.pod:9049 ../src/guestfs-actions.pod:9063 +#: ../src/guestfs-actions.pod:9104 ../src/guestfs-actions.pod:9117 +#: ../src/guestfs-actions.pod:9139 ../src/guestfs-actions.pod:9177 +#: ../src/guestfs-actions.pod:9211 ../src/guestfs-actions.pod:9247 +#: ../src/guestfs-actions.pod:9363 ../src/guestfs-actions.pod:9378 +#: ../src/guestfs-actions.pod:9392 ../src/guestfs-actions.pod:9466 +#: ../src/guestfs-actions.pod:9479 ../src/guestfs-actions.pod:9524 +#: ../src/guestfs-actions.pod:9564 ../src/guestfs-actions.pod:9622 +#: ../src/guestfs-actions.pod:9639 ../src/guestfs-actions.pod:9659 +#: ../src/guestfs-actions.pod:9692 ../src/guestfs-actions.pod:9773 +#: ../src/guestfs-actions.pod:9796 ../src/guestfs-actions.pod:9821 +#: ../src/guestfs-actions.pod:9847 msgid "This function returns 0 on success or -1 on error." msgstr "Š¦Ń Ń„ŃƒŠ½ŠŗŃ†Ń–Ń повертає 0 у разі ŃƒŃŠæŃ–Ń…Ńƒ і -1 у разі помилки." @@ -31372,10 +31391,10 @@ msgstr "Š¦Ń Ń„ŃƒŠ½ŠŗŃ†Ń–Ń повертає 0 у разі ŃƒŃŠæŃ–Ń…Ńƒ і -1 у #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:2820 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3182 #: ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4730 -#: ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7848 -#: ../src/guestfs-actions.pod:8072 ../src/guestfs-actions.pod:8223 -#: ../src/guestfs-actions.pod:8728 ../src/guestfs-actions.pod:8853 -#: ../src/guestfs-actions.pod:9559 +#: ../src/guestfs-actions.pod:6350 ../src/guestfs-actions.pod:7855 +#: ../src/guestfs-actions.pod:8079 ../src/guestfs-actions.pod:8230 +#: ../src/guestfs-actions.pod:8735 ../src/guestfs-actions.pod:8860 +#: ../src/guestfs-actions.pod:9566 msgid "(Added in 0.3)" msgstr "(ДоГано у 0.3)" @@ -31411,8 +31430,8 @@ msgstr "" #: ../src/guestfs-actions.pod:5969 ../src/guestfs-actions.pod:6082 #: ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6409 #: ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6732 -#: ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7881 -#: ../src/guestfs-actions.pod:8895 ../src/guestfs-actions.pod:9120 +#: ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:7888 +#: ../src/guestfs-actions.pod:8902 ../src/guestfs-actions.pod:9127 msgid "" "You may supply a list of optional arguments to this call. Use zero or more " "of the following pairs of parameters, and terminate the list with C<-1> on " @@ -31469,9 +31488,9 @@ msgstr "" #: ../src/guestfs-actions.pod:5537 ../src/guestfs-actions.pod:6623 #: ../src/guestfs-actions.pod:6644 ../src/guestfs-actions.pod:6971 #: ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7403 -#: ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9083 -#: ../src/guestfs-actions.pod:9570 ../src/guestfs-actions.pod:9583 -#: ../src/guestfs-actions.pod:9596 +#: ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:9090 +#: ../src/guestfs-actions.pod:9577 ../src/guestfs-actions.pod:9590 +#: ../src/guestfs-actions.pod:9603 msgid "On error this function returns -1." msgstr "Š£ разі помилки цією Ń„ŃƒŠ½ŠŗŃ†Ń–Ń”ŃŽ буГе ŠæŠ¾Š²ŠµŃ€Š½ŃƒŃ‚Š¾ -1." @@ -31528,9 +31547,9 @@ msgstr "Це «варіант Š· va_listĀ» L." #: ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6723 #: ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:6773 #: ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6855 -#: ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:7934 -#: ../src/guestfs-actions.pod:8997 ../src/guestfs-actions.pod:9008 -#: ../src/guestfs-actions.pod:9144 ../src/guestfs-actions.pod:9154 +#: ../src/guestfs-actions.pod:7929 ../src/guestfs-actions.pod:7941 +#: ../src/guestfs-actions.pod:9004 ../src/guestfs-actions.pod:9015 +#: ../src/guestfs-actions.pod:9151 ../src/guestfs-actions.pod:9161 msgid "See L." msgstr "Див. L." @@ -31952,11 +31971,11 @@ msgstr "" #: ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6989 #: ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7378 #: ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7605 -#: ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8390 -#: ../src/guestfs-actions.pod:8414 ../src/guestfs-actions.pod:8438 -#: ../src/guestfs-actions.pod:9299 ../src/guestfs-actions.pod:9318 -#: ../src/guestfs-actions.pod:9336 ../src/guestfs-actions.pod:9529 -#: ../src/guestfs-actions.pod:9904 +#: ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8397 +#: ../src/guestfs-actions.pod:8421 ../src/guestfs-actions.pod:8445 +#: ../src/guestfs-actions.pod:9306 ../src/guestfs-actions.pod:9325 +#: ../src/guestfs-actions.pod:9343 ../src/guestfs-actions.pod:9536 +#: ../src/guestfs-actions.pod:9911 msgid "" "This function returns a string, or NULL on error. I." @@ -32089,13 +32108,13 @@ msgstr "" #: ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5455 #: ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7350 #: ../src/guestfs-actions.pod:7476 ../src/guestfs-actions.pod:7590 -#: ../src/guestfs-actions.pod:8454 ../src/guestfs-actions.pod:8538 -#: ../src/guestfs-actions.pod:8593 ../src/guestfs-actions.pod:8739 -#: ../src/guestfs-actions.pod:8763 ../src/guestfs-actions.pod:9403 -#: ../src/guestfs-actions.pod:9442 ../src/guestfs-actions.pod:9489 -#: ../src/guestfs-actions.pod:9719 ../src/guestfs-actions.pod:9738 -#: ../src/guestfs-actions.pod:9854 ../src/guestfs-actions.pod:9873 -#: ../src/guestfs-actions.pod:9919 ../src/guestfs-actions.pod:9938 +#: ../src/guestfs-actions.pod:8461 ../src/guestfs-actions.pod:8545 +#: ../src/guestfs-actions.pod:8600 ../src/guestfs-actions.pod:8746 +#: ../src/guestfs-actions.pod:8770 ../src/guestfs-actions.pod:9410 +#: ../src/guestfs-actions.pod:9449 ../src/guestfs-actions.pod:9496 +#: ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 +#: ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 +#: ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 msgid "" "This function returns a NULL-terminated array of strings (like L), or NULL if there was an error. I, where " @@ -33089,7 +33108,7 @@ msgid "See also C." msgstr "Див. також C." #. type: textblock -#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9321 +#: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:9328 msgid "(Added in 1.0.75)" msgstr "(ДоГано у 1.0.75)" @@ -33126,8 +33145,8 @@ msgstr "" #: ../src/guestfs-actions.pod:4922 ../src/guestfs-actions.pod:4939 #: ../src/guestfs-actions.pod:5043 ../src/guestfs-actions.pod:5459 #: ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:7354 -#: ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9493 -#: ../src/guestfs-actions.pod:9507 +#: ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:9500 +#: ../src/guestfs-actions.pod:9514 msgid "(Added in 0.4)" msgstr "(ДоГано у 0.4)" @@ -33166,7 +33185,7 @@ msgstr "" #: ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:2001 #: ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:4504 #: ../src/guestfs-actions.pod:4565 ../src/guestfs-actions.pod:4592 -#: ../src/guestfs-actions.pod:9177 +#: ../src/guestfs-actions.pod:9184 msgid "(Added in 1.0.2)" msgstr "(ДоГано у 1.0.2)" @@ -33203,8 +33222,8 @@ msgstr "" #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:6785 #: ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:6955 #: ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:7155 -#: ../src/guestfs-actions.pod:9044 ../src/guestfs-actions.pod:9058 -#: ../src/guestfs-actions.pod:9519 +#: ../src/guestfs-actions.pod:9051 ../src/guestfs-actions.pod:9065 +#: ../src/guestfs-actions.pod:9526 msgid "(Added in 1.3.2)" msgstr "(ДоГано у 1.3.2)" @@ -33390,7 +33409,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1543 -#: ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8180 +#: ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:8187 msgid "(Added in 1.13.15)" msgstr "(ДоГано у 1.13.15)" @@ -33620,9 +33639,9 @@ msgstr "" #: ../src/guestfs-actions.pod:1847 ../src/guestfs-actions.pod:1996 #: ../src/guestfs-actions.pod:2027 ../src/guestfs-actions.pod:2072 #: ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2561 -#: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9172 -#: ../src/guestfs-actions.pod:9206 ../src/guestfs-actions.pod:9768 -#: ../src/guestfs-actions.pod:9791 ../src/guestfs-actions.pod:9816 +#: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:9179 +#: ../src/guestfs-actions.pod:9213 ../src/guestfs-actions.pod:9775 +#: ../src/guestfs-actions.pod:9798 ../src/guestfs-actions.pod:9823 msgid "" "This long-running command can generate progress notification messages so " "that the caller can display a progress bar or indicator. To receive these " @@ -34019,8 +34038,8 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:5486 -#: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9407 -#: ../src/guestfs-actions.pod:9446 ../src/guestfs-actions.pod:9532 +#: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:9414 +#: ../src/guestfs-actions.pod:9453 ../src/guestfs-actions.pod:9539 msgid "(Added in 1.0.87)" msgstr "(ДоГано у 1.0.87)" @@ -34160,9 +34179,9 @@ msgstr "" #: ../src/guestfs-actions.pod:2077 ../src/guestfs-actions.pod:3377 #: ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3469 #: ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:6509 -#: ../src/guestfs-actions.pod:8746 ../src/guestfs-actions.pod:8770 -#: ../src/guestfs-actions.pod:9572 ../src/guestfs-actions.pod:9585 -#: ../src/guestfs-actions.pod:9598 +#: ../src/guestfs-actions.pod:8753 ../src/guestfs-actions.pod:8777 +#: ../src/guestfs-actions.pod:9579 ../src/guestfs-actions.pod:9592 +#: ../src/guestfs-actions.pod:9605 msgid "(Added in 1.0.54)" msgstr "(ДоГано у 1.0.54)" @@ -34273,7 +34292,7 @@ msgid "See also C, C." msgstr "Див. також C, C." #. type: textblock -#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9211 +#: ../src/guestfs-actions.pod:2032 ../src/guestfs-actions.pod:9218 msgid "(Added in 1.5.17)" msgstr "(ДоГано у 1.5.17)" @@ -34462,7 +34481,7 @@ msgstr "Див. також C." #. type: textblock #: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:3159 -#: ../src/guestfs-actions.pod:8204 +#: ../src/guestfs-actions.pod:8211 msgid "(Added in 1.0.69)" msgstr "(ДоГано у 1.0.69)" @@ -34498,13 +34517,13 @@ msgstr "" #: ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4995 #: ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:6303 #: ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7608 -#: ../src/guestfs-actions.pod:8614 ../src/guestfs-actions.pod:8626 -#: ../src/guestfs-actions.pod:8639 ../src/guestfs-actions.pod:8652 -#: ../src/guestfs-actions.pod:8674 ../src/guestfs-actions.pod:8687 -#: ../src/guestfs-actions.pod:8700 ../src/guestfs-actions.pod:8713 -#: ../src/guestfs-actions.pod:9726 ../src/guestfs-actions.pod:9745 -#: ../src/guestfs-actions.pod:9861 ../src/guestfs-actions.pod:9880 -#: ../src/guestfs-actions.pod:9926 ../src/guestfs-actions.pod:9945 +#: ../src/guestfs-actions.pod:8621 ../src/guestfs-actions.pod:8633 +#: ../src/guestfs-actions.pod:8646 ../src/guestfs-actions.pod:8659 +#: ../src/guestfs-actions.pod:8681 ../src/guestfs-actions.pod:8694 +#: ../src/guestfs-actions.pod:8707 ../src/guestfs-actions.pod:8720 +#: ../src/guestfs-actions.pod:9733 ../src/guestfs-actions.pod:9752 +#: ../src/guestfs-actions.pod:9868 ../src/guestfs-actions.pod:9887 +#: ../src/guestfs-actions.pod:9933 ../src/guestfs-actions.pod:9952 msgid "(Added in 1.0.66)" msgstr "(ДоГано у 1.0.66)" @@ -35017,7 +35036,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9773 +#: ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:9780 msgid "(Added in 1.0.16)" msgstr "(ДоГано у 1.0.16)" @@ -35130,10 +35149,10 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:7321 -#: ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8358 -#: ../src/guestfs-actions.pod:8377 ../src/guestfs-actions.pod:8393 -#: ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:9358 -#: ../src/guestfs-actions.pod:9373 ../src/guestfs-actions.pod:9842 +#: ../src/guestfs-actions.pod:7800 ../src/guestfs-actions.pod:8365 +#: ../src/guestfs-actions.pod:8384 ../src/guestfs-actions.pod:8400 +#: ../src/guestfs-actions.pod:8424 ../src/guestfs-actions.pod:9365 +#: ../src/guestfs-actions.pod:9380 ../src/guestfs-actions.pod:9849 msgid "(Added in 1.0.26)" msgstr "(ДоГано у 1.0.26)" @@ -35160,7 +35179,7 @@ msgid "Return the current attach method. See C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7830 +#: ../src/guestfs-actions.pod:2809 ../src/guestfs-actions.pod:7837 msgid "(Added in 1.9.8)" msgstr "(ДоГано у 1.9.8)" @@ -35199,7 +35218,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7871 +#: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:7878 msgid "(Added in 1.0.72)" msgstr "(ДоГано у 1.0.72)" @@ -35236,7 +35255,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2970 -#: ../src/guestfs-actions.pod:7910 ../src/guestfs-actions.pod:7949 +#: ../src/guestfs-actions.pod:7917 ../src/guestfs-actions.pod:7956 msgid "(Added in 1.17.31)" msgstr "(ДоГано у 1.17.31)" @@ -35292,7 +35311,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:2991 ../src/guestfs-actions.pod:3012 -#: ../src/guestfs-actions.pod:7974 ../src/guestfs-actions.pod:7993 +#: ../src/guestfs-actions.pod:7981 ../src/guestfs-actions.pod:8000 msgid "(Added in 1.0.15)" msgstr "(ДоГано у 1.0.15)" @@ -35352,8 +35371,8 @@ msgstr "" #: ../src/guestfs-actions.pod:6208 ../src/guestfs-actions.pod:6227 #: ../src/guestfs-actions.pod:6246 ../src/guestfs-actions.pod:6258 #: ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6288 -#: ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8036 -#: ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:9085 +#: ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:8043 +#: ../src/guestfs-actions.pod:8335 ../src/guestfs-actions.pod:9092 msgid "(Added in 1.0.55)" msgstr "(ДоГано у 1.0.55)" @@ -35375,7 +35394,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8055 +#: ../src/guestfs-actions.pod:3042 ../src/guestfs-actions.pod:8062 msgid "(Added in 1.5.4)" msgstr "(ДоГано у 1.5.4)" @@ -35421,8 +35440,8 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8093 -#: ../src/guestfs-actions.pod:9657 +#: ../src/guestfs-actions.pod:3068 ../src/guestfs-actions.pod:8100 +#: ../src/guestfs-actions.pod:9664 msgid "(Added in 1.11.18)" msgstr "(ДоГано у 1.11.18)" @@ -35466,7 +35485,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8121 +#: ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:8128 msgid "(Added in 1.0.6)" msgstr "(ДоГано у 1.0.6)" @@ -35491,9 +35510,9 @@ msgstr "" #: ../src/guestfs-actions.pod:3108 ../src/guestfs-actions.pod:4750 #: ../src/guestfs-actions.pod:5110 ../src/guestfs-actions.pod:5521 #: ../src/guestfs-actions.pod:5784 ../src/guestfs-actions.pod:7251 -#: ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8145 -#: ../src/guestfs-actions.pod:8866 ../src/guestfs-actions.pod:8886 -#: ../src/guestfs-actions.pod:9242 +#: ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:8152 +#: ../src/guestfs-actions.pod:8873 ../src/guestfs-actions.pod:8893 +#: ../src/guestfs-actions.pod:9249 msgid "(Added in 1.0.77)" msgstr "(ДоГано у 1.0.77)" @@ -35523,7 +35542,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:3197 -#: ../src/guestfs-actions.pod:8164 ../src/guestfs-actions.pod:8238 +#: ../src/guestfs-actions.pod:8171 ../src/guestfs-actions.pod:8245 msgid "(Added in 1.0.67)" msgstr "(ДоГано у 1.0.67)" @@ -35692,7 +35711,7 @@ msgstr "Див. також C, C, L. I, or NULL if there was an " "error. I after use>." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8509 -#: ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:9030 +#: ../src/guestfs-actions.pod:5080 ../src/guestfs-actions.pod:8516 +#: ../src/guestfs-actions.pod:8534 ../src/guestfs-actions.pod:9037 msgid "(Added in 0.9.2)" msgstr "(ДоГано у 0.9.2)" @@ -38010,7 +38029,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9821 +#: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:9828 msgid "(Added in 1.17.18)" msgstr "(ДоГано у 1.17.18)" @@ -38124,7 +38143,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:7308 -#: ../src/guestfs-actions.pod:9461 +#: ../src/guestfs-actions.pod:9468 msgid "(Added in 1.0.13)" msgstr "(ДоГано у 1.0.13)" @@ -38150,7 +38169,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9474 +#: ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:9481 msgid "(Added in 1.0.83)" msgstr "(ДоГано у 1.0.83)" @@ -39484,7 +39503,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6494 -#: ../src/guestfs-actions.pod:9134 +#: ../src/guestfs-actions.pod:9141 msgid "(Added in 1.17.22)" msgstr "(ДоГано у 1.17.22)" @@ -39850,7 +39869,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6699 -#: ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8015 +#: ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:8022 msgid "(Added in 1.17.9)" msgstr "(ДоГано у 1.17.9)" @@ -40202,7 +40221,7 @@ msgstr "" #. type: textblock #: ../src/guestfs-actions.pod:6876 ../src/guestfs-actions.pod:7335 #: ../src/guestfs-actions.pod:7408 ../src/guestfs-actions.pod:7676 -#: ../src/guestfs-actions.pod:9637 +#: ../src/guestfs-actions.pod:9644 msgid "(Added in 1.3.14)" msgstr "(ДоГано у 1.3.14)" @@ -41333,12 +41352,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:7832 +#: ../src/guestfs-actions.pod:7839 msgid "guestfs_set_autosync" msgstr "guestfs_set_autosync" #. type: verbatim -#: ../src/guestfs-actions.pod:7834 +#: ../src/guestfs-actions.pod:7841 #, no-wrap msgid "" " int\n" @@ -41352,12 +41371,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:7850 +#: ../src/guestfs-actions.pod:7857 msgid "guestfs_set_direct" msgstr "guestfs_set_direct" #. type: verbatim -#: ../src/guestfs-actions.pod:7852 +#: ../src/guestfs-actions.pod:7859 #, no-wrap msgid "" " int\n" @@ -41371,7 +41390,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7860 +#: ../src/guestfs-actions.pod:7867 msgid "" "One consequence of this is that log messages aren't caught by the library " "and handled by C, but go straight to " @@ -41379,12 +41398,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7873 +#: ../src/guestfs-actions.pod:7880 msgid "guestfs_set_e2attrs" msgstr "guestfs_set_e2attrs" #. type: verbatim -#: ../src/guestfs-actions.pod:7875 +#: ../src/guestfs-actions.pod:7882 #, no-wrap msgid "" " int\n" @@ -41402,7 +41421,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:7886 +#: ../src/guestfs-actions.pod:7893 #, no-wrap msgid "" " GUESTFS_SET_E2ATTRS_CLEAR, int clear,\n" @@ -41412,7 +41431,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7891 +#: ../src/guestfs-actions.pod:7898 msgid "" "C is a string of characters representing file attributes. See " "C for a list of possible attributes. Not all " @@ -41420,12 +41439,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7912 +#: ../src/guestfs-actions.pod:7919 msgid "guestfs_set_e2attrs_va" msgstr "guestfs_set_e2attrs_va" #. type: verbatim -#: ../src/guestfs-actions.pod:7914 +#: ../src/guestfs-actions.pod:7921 #, no-wrap msgid "" " int\n" @@ -41443,17 +41462,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7920 +#: ../src/guestfs-actions.pod:7927 msgid "This is the \"va_list variant\" of L." msgstr "Це «варіант Š· va_listĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:7924 +#: ../src/guestfs-actions.pod:7931 msgid "guestfs_set_e2attrs_argv" msgstr "guestfs_set_e2attrs_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:7926 +#: ../src/guestfs-actions.pod:7933 #, no-wrap msgid "" " int\n" @@ -41471,17 +41490,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7932 +#: ../src/guestfs-actions.pod:7939 msgid "This is the \"argv variant\" of L." msgstr "Це «варіант Š· argvĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:7936 +#: ../src/guestfs-actions.pod:7943 msgid "guestfs_set_e2generation" msgstr "guestfs_set_e2generation" #. type: verbatim -#: ../src/guestfs-actions.pod:7938 +#: ../src/guestfs-actions.pod:7945 #, no-wrap msgid "" " int\n" @@ -41497,17 +41516,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7945 +#: ../src/guestfs-actions.pod:7952 msgid "See C." msgstr "Див. C." #. type: =head2 -#: ../src/guestfs-actions.pod:7951 +#: ../src/guestfs-actions.pod:7958 msgid "guestfs_set_e2label" msgstr "guestfs_set_e2label" #. type: verbatim -#: ../src/guestfs-actions.pod:7953 +#: ../src/guestfs-actions.pod:7960 #, no-wrap msgid "" " int\n" @@ -41523,26 +41542,26 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7958 +#: ../src/guestfs-actions.pod:7965 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:7969 +#: ../src/guestfs-actions.pod:7976 msgid "" "You can use either C or C to return " "the existing label on a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7976 +#: ../src/guestfs-actions.pod:7983 msgid "guestfs_set_e2uuid" msgstr "guestfs_set_e2uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:7978 +#: ../src/guestfs-actions.pod:7985 #, no-wrap msgid "" " int\n" @@ -41558,19 +41577,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:7988 +#: ../src/guestfs-actions.pod:7995 msgid "" "You can use either C or C to return " "the existing UUID of a filesystem." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:7995 +#: ../src/guestfs-actions.pod:8002 msgid "guestfs_set_label" msgstr "guestfs_set_label" #. type: verbatim -#: ../src/guestfs-actions.pod:7997 +#: ../src/guestfs-actions.pod:8004 #, no-wrap msgid "" " int\n" @@ -41586,17 +41605,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8011 +#: ../src/guestfs-actions.pod:8018 msgid "To read the label on a filesystem, call C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8017 +#: ../src/guestfs-actions.pod:8024 msgid "guestfs_set_memsize" msgstr "guestfs_set_memsize" #. type: verbatim -#: ../src/guestfs-actions.pod:8019 +#: ../src/guestfs-actions.pod:8026 #, no-wrap msgid "" " int\n" @@ -41610,19 +41629,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8023 +#: ../src/guestfs-actions.pod:8030 msgid "" "This sets the memory size in megabytes allocated to the qemu subprocess. " "This only has any effect if called before C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8038 +#: ../src/guestfs-actions.pod:8045 msgid "guestfs_set_network" msgstr "guestfs_set_network" #. type: verbatim -#: ../src/guestfs-actions.pod:8040 +#: ../src/guestfs-actions.pod:8047 #, no-wrap msgid "" " int\n" @@ -41636,19 +41655,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8050 +#: ../src/guestfs-actions.pod:8057 msgid "" "You must call this before calling C, otherwise it has no " "effect." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8057 +#: ../src/guestfs-actions.pod:8064 msgid "guestfs_set_path" msgstr "guestfs_set_path" #. type: verbatim -#: ../src/guestfs-actions.pod:8059 +#: ../src/guestfs-actions.pod:8066 #, no-wrap msgid "" " int\n" @@ -41662,12 +41681,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8074 +#: ../src/guestfs-actions.pod:8081 msgid "guestfs_set_pgroup" msgstr "guestfs_set_pgroup" #. type: verbatim -#: ../src/guestfs-actions.pod:8076 +#: ../src/guestfs-actions.pod:8083 #, no-wrap msgid "" " int\n" @@ -41681,7 +41700,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8086 +#: ../src/guestfs-actions.pod:8093 msgid "" "The default for this flag is false, because usually you want C<^C> to kill " "the subprocess. Guestfish sets this flag to true when used interactively, " @@ -41690,12 +41709,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8095 +#: ../src/guestfs-actions.pod:8102 msgid "guestfs_set_qemu" msgstr "guestfs_set_qemu" #. type: verbatim -#: ../src/guestfs-actions.pod:8097 +#: ../src/guestfs-actions.pod:8104 #, no-wrap msgid "" " int\n" @@ -41709,12 +41728,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8123 +#: ../src/guestfs-actions.pod:8130 msgid "guestfs_set_recovery_proc" msgstr "guestfs_set_recovery_proc" #. type: verbatim -#: ../src/guestfs-actions.pod:8125 +#: ../src/guestfs-actions.pod:8132 #, no-wrap msgid "" " int\n" @@ -41728,7 +41747,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8129 +#: ../src/guestfs-actions.pod:8136 msgid "" "If this is called with the parameter C then C does " "not create a recovery process. The purpose of the recovery process is to " @@ -41737,19 +41756,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8134 +#: ../src/guestfs-actions.pod:8141 msgid "" "This only has any effect if called before C, and the default " "is true." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8147 +#: ../src/guestfs-actions.pod:8154 msgid "guestfs_set_selinux" msgstr "guestfs_set_selinux" #. type: verbatim -#: ../src/guestfs-actions.pod:8149 +#: ../src/guestfs-actions.pod:8156 #, no-wrap msgid "" " int\n" @@ -41763,12 +41782,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8166 +#: ../src/guestfs-actions.pod:8173 msgid "guestfs_set_smp" msgstr "guestfs_set_smp" #. type: verbatim -#: ../src/guestfs-actions.pod:8168 +#: ../src/guestfs-actions.pod:8175 #, no-wrap msgid "" " int\n" @@ -41782,17 +41801,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8176 +#: ../src/guestfs-actions.pod:8183 msgid "This function must be called before C." msgstr "Š£ попереГніх Š²ŠµŃ€ŃŃ–ŃŃ… ця Ń„ŃƒŠ½ŠŗŃ†Ń–Ń Š²ŠøŠŗŠ»ŠøŠŗŠ°Š»Š°ŃŃ C." #. type: =head2 -#: ../src/guestfs-actions.pod:8182 +#: ../src/guestfs-actions.pod:8189 msgid "guestfs_set_trace" msgstr "guestfs_set_trace" #. type: verbatim -#: ../src/guestfs-actions.pod:8184 +#: ../src/guestfs-actions.pod:8191 #, no-wrap msgid "" " int\n" @@ -41806,19 +41825,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8198 +#: ../src/guestfs-actions.pod:8205 msgid "" "Trace messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8206 +#: ../src/guestfs-actions.pod:8213 msgid "guestfs_set_verbose" msgstr "guestfs_set_verbose" #. type: verbatim -#: ../src/guestfs-actions.pod:8208 +#: ../src/guestfs-actions.pod:8215 #, no-wrap msgid "" " int\n" @@ -41832,19 +41851,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8217 +#: ../src/guestfs-actions.pod:8224 msgid "" "Verbose messages are normally sent to C, unless you register a " "callback to send them somewhere else (see C)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8225 +#: ../src/guestfs-actions.pod:8232 msgid "guestfs_setcon" msgstr "guestfs_setcon" #. type: verbatim -#: ../src/guestfs-actions.pod:8227 +#: ../src/guestfs-actions.pod:8234 #, no-wrap msgid "" " int\n" @@ -41858,12 +41877,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8240 +#: ../src/guestfs-actions.pod:8247 msgid "guestfs_setxattr" msgstr "guestfs_setxattr" #. type: verbatim -#: ../src/guestfs-actions.pod:8242 +#: ../src/guestfs-actions.pod:8249 #, no-wrap msgid "" " int\n" @@ -41883,17 +41902,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8253 +#: ../src/guestfs-actions.pod:8260 msgid "See also: C, L." msgstr "Див. також C, L." #. type: =head2 -#: ../src/guestfs-actions.pod:8259 +#: ../src/guestfs-actions.pod:8266 msgid "guestfs_sfdisk" msgstr "guestfs_sfdisk" #. type: verbatim -#: ../src/guestfs-actions.pod:8261 +#: ../src/guestfs-actions.pod:8268 #, no-wrap msgid "" " int\n" @@ -41915,27 +41934,27 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8310 -#: ../src/guestfs-actions.pod:8341 +#: ../src/guestfs-actions.pod:8276 ../src/guestfs-actions.pod:8317 +#: ../src/guestfs-actions.pod:8348 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8296 +#: ../src/guestfs-actions.pod:8303 msgid "" "See also: C, C, C" msgstr "" "Див. також C, C, C" #. type: =head2 -#: ../src/guestfs-actions.pod:8303 +#: ../src/guestfs-actions.pod:8310 msgid "guestfs_sfdiskM" msgstr "guestfs_sfdiskM" #. type: verbatim -#: ../src/guestfs-actions.pod:8305 +#: ../src/guestfs-actions.pod:8312 #, no-wrap msgid "" " int\n" @@ -41951,7 +41970,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8317 +#: ../src/guestfs-actions.pod:8324 msgid "" "This is a simplified interface to the C command, where " "partition sizes are specified in megabytes only (rounded to the nearest " @@ -41960,7 +41979,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8323 +#: ../src/guestfs-actions.pod:8330 msgid "" "See also: C, the L manpage and " "C" @@ -41969,12 +41988,12 @@ msgstr "" "C" #. type: =head2 -#: ../src/guestfs-actions.pod:8330 +#: ../src/guestfs-actions.pod:8337 msgid "guestfs_sfdisk_N" msgstr "guestfs_sfdisk_N" #. type: verbatim -#: ../src/guestfs-actions.pod:8332 +#: ../src/guestfs-actions.pod:8339 #, no-wrap msgid "" " int\n" @@ -41998,24 +42017,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8351 +#: ../src/guestfs-actions.pod:8358 msgid "" "For other parameters, see C. You should usually pass C<0> " "for the cyls/heads/sectors parameters." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8354 +#: ../src/guestfs-actions.pod:8361 msgid "See also: C" msgstr "Див. також C" #. type: =head2 -#: ../src/guestfs-actions.pod:8360 +#: ../src/guestfs-actions.pod:8367 msgid "guestfs_sfdisk_disk_geometry" msgstr "guestfs_sfdisk_disk_geometry" #. type: verbatim -#: ../src/guestfs-actions.pod:8362 +#: ../src/guestfs-actions.pod:8369 #, no-wrap msgid "" " char *\n" @@ -42029,7 +42048,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8366 +#: ../src/guestfs-actions.pod:8373 msgid "" "This displays the disk geometry of C read from the partition table. " "Especially in the case where the underlying block device has been resized, " @@ -42038,12 +42057,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8379 +#: ../src/guestfs-actions.pod:8386 msgid "guestfs_sfdisk_kernel_geometry" msgstr "guestfs_sfdisk_kernel_geometry" #. type: verbatim -#: ../src/guestfs-actions.pod:8381 +#: ../src/guestfs-actions.pod:8388 #, no-wrap msgid "" " char *\n" @@ -42057,12 +42076,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8395 +#: ../src/guestfs-actions.pod:8402 msgid "guestfs_sfdisk_l" msgstr "guestfs_sfdisk_l" #. type: verbatim -#: ../src/guestfs-actions.pod:8397 +#: ../src/guestfs-actions.pod:8404 #, no-wrap msgid "" " char *\n" @@ -42076,24 +42095,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8401 +#: ../src/guestfs-actions.pod:8408 msgid "" "I In new code, use the L " "call instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8412 +#: ../src/guestfs-actions.pod:8419 msgid "See also: C" msgstr "Див. також C" #. type: =head2 -#: ../src/guestfs-actions.pod:8419 +#: ../src/guestfs-actions.pod:8426 msgid "guestfs_sh" msgstr "guestfs_sh" #. type: verbatim -#: ../src/guestfs-actions.pod:8421 +#: ../src/guestfs-actions.pod:8428 #, no-wrap msgid "" " char *\n" @@ -42107,22 +42126,22 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8428 +#: ../src/guestfs-actions.pod:8435 msgid "This is like C, but passes the command to:" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8436 +#: ../src/guestfs-actions.pod:8443 msgid "All the provisos about C apply to this call." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8443 +#: ../src/guestfs-actions.pod:8450 msgid "guestfs_sh_lines" msgstr "guestfs_sh_lines" #. type: verbatim -#: ../src/guestfs-actions.pod:8445 +#: ../src/guestfs-actions.pod:8452 #, no-wrap msgid "" " char **\n" @@ -42136,24 +42155,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8449 +#: ../src/guestfs-actions.pod:8456 msgid "" "This is the same as C, but splits the result into a list of " "lines." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8452 +#: ../src/guestfs-actions.pod:8459 msgid "See also: C" msgstr "Див. також C" #. type: =head2 -#: ../src/guestfs-actions.pod:8460 +#: ../src/guestfs-actions.pod:8467 msgid "guestfs_shutdown" msgstr "" #. type: verbatim -#: ../src/guestfs-actions.pod:8462 +#: ../src/guestfs-actions.pod:8469 #, no-wrap msgid "" " int\n" @@ -42162,7 +42181,7 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8465 +#: ../src/guestfs-actions.pod:8472 msgid "" "This is the opposite of C. It performs an orderly shutdown " "of the backend process(es). If the autosync flag is set (which is the " @@ -42170,26 +42189,26 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8475 +#: ../src/guestfs-actions.pod:8482 msgid "" "This call does I close or free up the handle. You still need to call " "C afterwards." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8478 +#: ../src/guestfs-actions.pod:8485 msgid "" "C will call this if you don't do it explicitly, but note that " "any errors are ignored in that case." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8483 +#: ../src/guestfs-actions.pod:8490 msgid "guestfs_sleep" msgstr "guestfs_sleep" #. type: verbatim -#: ../src/guestfs-actions.pod:8485 +#: ../src/guestfs-actions.pod:8492 #, no-wrap msgid "" " int\n" @@ -42203,17 +42222,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8493 +#: ../src/guestfs-actions.pod:8500 msgid "(Added in 1.0.41)" msgstr "(ДоГано у 1.0.41)" #. type: =head2 -#: ../src/guestfs-actions.pod:8495 ../src/guestfs-structs.pod:109 +#: ../src/guestfs-actions.pod:8502 ../src/guestfs-structs.pod:109 msgid "guestfs_stat" msgstr "guestfs_stat" #. type: verbatim -#: ../src/guestfs-actions.pod:8497 +#: ../src/guestfs-actions.pod:8504 #, no-wrap msgid "" " struct guestfs_stat *\n" @@ -42227,12 +42246,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8511 ../src/guestfs-structs.pod:135 +#: ../src/guestfs-actions.pod:8518 ../src/guestfs-structs.pod:135 msgid "guestfs_statvfs" msgstr "guestfs_statvfs" #. type: verbatim -#: ../src/guestfs-actions.pod:8513 +#: ../src/guestfs-actions.pod:8520 #, no-wrap msgid "" " struct guestfs_statvfs *\n" @@ -42246,19 +42265,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8523 +#: ../src/guestfs-actions.pod:8530 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8529 +#: ../src/guestfs-actions.pod:8536 msgid "guestfs_strings" msgstr "guestfs_strings" #. type: verbatim -#: ../src/guestfs-actions.pod:8531 +#: ../src/guestfs-actions.pod:8538 #, no-wrap msgid "" " char **\n" @@ -42272,12 +42291,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8547 +#: ../src/guestfs-actions.pod:8554 msgid "guestfs_strings_e" msgstr "guestfs_strings_e" #. type: verbatim -#: ../src/guestfs-actions.pod:8549 +#: ../src/guestfs-actions.pod:8556 #, no-wrap msgid "" " char **\n" @@ -42293,26 +42312,26 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8554 +#: ../src/guestfs-actions.pod:8561 msgid "" "This is like the C command, but allows you to specify the " "encoding of strings that are looked for in the source file C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8564 +#: ../src/guestfs-actions.pod:8571 msgid "" "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of " "ISO-8859-X (this is what C uses)." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8602 +#: ../src/guestfs-actions.pod:8609 msgid "guestfs_swapoff_device" msgstr "guestfs_swapoff_device" #. type: verbatim -#: ../src/guestfs-actions.pod:8604 +#: ../src/guestfs-actions.pod:8611 #, no-wrap msgid "" " int\n" @@ -42326,19 +42345,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8608 +#: ../src/guestfs-actions.pod:8615 msgid "" "This command disables the libguestfs appliance swap device or partition " "named C. See C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8616 +#: ../src/guestfs-actions.pod:8623 msgid "guestfs_swapoff_file" msgstr "guestfs_swapoff_file" #. type: verbatim -#: ../src/guestfs-actions.pod:8618 +#: ../src/guestfs-actions.pod:8625 #, no-wrap msgid "" " int\n" @@ -42352,12 +42371,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8628 +#: ../src/guestfs-actions.pod:8635 msgid "guestfs_swapoff_label" msgstr "guestfs_swapoff_label" #. type: verbatim -#: ../src/guestfs-actions.pod:8630 +#: ../src/guestfs-actions.pod:8637 #, no-wrap msgid "" " int\n" @@ -42371,12 +42390,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8641 +#: ../src/guestfs-actions.pod:8648 msgid "guestfs_swapoff_uuid" msgstr "guestfs_swapoff_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:8643 +#: ../src/guestfs-actions.pod:8650 #, no-wrap msgid "" " int\n" @@ -42390,12 +42409,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8654 +#: ../src/guestfs-actions.pod:8661 msgid "guestfs_swapon_device" msgstr "guestfs_swapon_device" #. type: verbatim -#: ../src/guestfs-actions.pod:8656 +#: ../src/guestfs-actions.pod:8663 #, no-wrap msgid "" " int\n" @@ -42409,7 +42428,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8660 +#: ../src/guestfs-actions.pod:8667 msgid "" "This command enables the libguestfs appliance to use the swap device or " "partition named C. The increased memory is made available for all " @@ -42417,12 +42436,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8676 +#: ../src/guestfs-actions.pod:8683 msgid "guestfs_swapon_file" msgstr "guestfs_swapon_file" #. type: verbatim -#: ../src/guestfs-actions.pod:8678 +#: ../src/guestfs-actions.pod:8685 #, no-wrap msgid "" " int\n" @@ -42436,19 +42455,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8682 +#: ../src/guestfs-actions.pod:8689 msgid "" "This command enables swap to a file. See C for other " "notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8689 +#: ../src/guestfs-actions.pod:8696 msgid "guestfs_swapon_label" msgstr "guestfs_swapon_label" #. type: verbatim -#: ../src/guestfs-actions.pod:8691 +#: ../src/guestfs-actions.pod:8698 #, no-wrap msgid "" " int\n" @@ -42462,19 +42481,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8695 +#: ../src/guestfs-actions.pod:8702 msgid "" "This command enables swap to a labeled swap partition. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8702 +#: ../src/guestfs-actions.pod:8709 msgid "guestfs_swapon_uuid" msgstr "guestfs_swapon_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:8704 +#: ../src/guestfs-actions.pod:8711 #, no-wrap msgid "" " int\n" @@ -42488,19 +42507,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8708 +#: ../src/guestfs-actions.pod:8715 msgid "" "This command enables swap to a swap partition with the given UUID. See " "C for other notes." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8715 +#: ../src/guestfs-actions.pod:8722 msgid "guestfs_sync" msgstr "guestfs_sync" #. type: verbatim -#: ../src/guestfs-actions.pod:8717 +#: ../src/guestfs-actions.pod:8724 #, no-wrap msgid "" " int\n" @@ -42512,12 +42531,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8730 +#: ../src/guestfs-actions.pod:8737 msgid "guestfs_tail" msgstr "guestfs_tail" #. type: verbatim -#: ../src/guestfs-actions.pod:8732 +#: ../src/guestfs-actions.pod:8739 #, no-wrap msgid "" " char **\n" @@ -42531,12 +42550,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8748 +#: ../src/guestfs-actions.pod:8755 msgid "guestfs_tail_n" msgstr "guestfs_tail_n" #. type: verbatim -#: ../src/guestfs-actions.pod:8750 +#: ../src/guestfs-actions.pod:8757 #, no-wrap msgid "" " char **\n" @@ -42552,12 +42571,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8772 +#: ../src/guestfs-actions.pod:8779 msgid "guestfs_tar_in" msgstr "guestfs_tar_in" #. type: verbatim -#: ../src/guestfs-actions.pod:8774 +#: ../src/guestfs-actions.pod:8781 #, no-wrap msgid "" " int\n" @@ -42573,24 +42592,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8782 +#: ../src/guestfs-actions.pod:8789 msgid "" "To upload a compressed tarball, use C or C." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:8787 ../src/guestfs-actions.pod:8804 -#: ../src/guestfs-actions.pod:8820 ../src/guestfs-actions.pod:8836 +#: ../src/guestfs-actions.pod:8794 ../src/guestfs-actions.pod:8811 +#: ../src/guestfs-actions.pod:8827 ../src/guestfs-actions.pod:8843 msgid "(Added in 1.0.3)" msgstr "(ДоГано у 1.0.3)" #. type: =head2 -#: ../src/guestfs-actions.pod:8789 +#: ../src/guestfs-actions.pod:8796 msgid "guestfs_tar_out" msgstr "guestfs_tar_out" #. type: verbatim -#: ../src/guestfs-actions.pod:8791 +#: ../src/guestfs-actions.pod:8798 #, no-wrap msgid "" " int\n" @@ -42606,19 +42625,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8799 +#: ../src/guestfs-actions.pod:8806 msgid "" "To download a compressed tarball, use C or " "C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8806 +#: ../src/guestfs-actions.pod:8813 msgid "guestfs_tgz_in" msgstr "guestfs_tgz_in" #. type: verbatim -#: ../src/guestfs-actions.pod:8808 +#: ../src/guestfs-actions.pod:8815 #, no-wrap msgid "" " int\n" @@ -42634,17 +42653,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8816 +#: ../src/guestfs-actions.pod:8823 msgid "To upload an uncompressed tarball, use C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8822 +#: ../src/guestfs-actions.pod:8829 msgid "guestfs_tgz_out" msgstr "guestfs_tgz_out" #. type: verbatim -#: ../src/guestfs-actions.pod:8824 +#: ../src/guestfs-actions.pod:8831 #, no-wrap msgid "" " int\n" @@ -42660,17 +42679,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8832 +#: ../src/guestfs-actions.pod:8839 msgid "To download an uncompressed tarball, use C." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8838 +#: ../src/guestfs-actions.pod:8845 msgid "guestfs_touch" msgstr "guestfs_touch" #. type: verbatim -#: ../src/guestfs-actions.pod:8840 +#: ../src/guestfs-actions.pod:8847 #, no-wrap msgid "" " int\n" @@ -42684,12 +42703,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8855 +#: ../src/guestfs-actions.pod:8862 msgid "guestfs_truncate" msgstr "guestfs_truncate" #. type: verbatim -#: ../src/guestfs-actions.pod:8857 +#: ../src/guestfs-actions.pod:8864 #, no-wrap msgid "" " int\n" @@ -42703,12 +42722,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:8868 +#: ../src/guestfs-actions.pod:8875 msgid "guestfs_truncate_size" msgstr "guestfs_truncate_size" #. type: verbatim -#: ../src/guestfs-actions.pod:8870 +#: ../src/guestfs-actions.pod:8877 #, no-wrap msgid "" " int\n" @@ -42724,7 +42743,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8878 +#: ../src/guestfs-actions.pod:8885 msgid "" "If the current file size is less than C then the file is extended to " "the required size with zero bytes. This creates a sparse file (ie. disk " @@ -42733,12 +42752,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8888 +#: ../src/guestfs-actions.pod:8895 msgid "guestfs_tune2fs" msgstr "guestfs_tune2fs" #. type: verbatim -#: ../src/guestfs-actions.pod:8890 +#: ../src/guestfs-actions.pod:8897 #, no-wrap msgid "" " int\n" @@ -42754,7 +42773,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:8900 +#: ../src/guestfs-actions.pod:8907 #, no-wrap msgid "" " GUESTFS_TUNE2FS_FORCE, int force,\n" @@ -42782,7 +42801,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8980 +#: ../src/guestfs-actions.pod:8987 msgid "" "To get the current values of filesystem parameters, see " "C. For precise details of how tune2fs works, see the " @@ -42790,12 +42809,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:8988 +#: ../src/guestfs-actions.pod:8995 msgid "guestfs_tune2fs_va" msgstr "guestfs_tune2fs_va" #. type: verbatim -#: ../src/guestfs-actions.pod:8990 +#: ../src/guestfs-actions.pod:8997 #, no-wrap msgid "" " int\n" @@ -42811,17 +42830,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:8995 +#: ../src/guestfs-actions.pod:9002 msgid "This is the \"va_list variant\" of L." msgstr "Це «варіант Š· va_listĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:8999 +#: ../src/guestfs-actions.pod:9006 msgid "guestfs_tune2fs_argv" msgstr "guestfs_tune2fs_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:9001 +#: ../src/guestfs-actions.pod:9008 #, no-wrap msgid "" " int\n" @@ -42837,17 +42856,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9006 +#: ../src/guestfs-actions.pod:9013 msgid "This is the \"argv variant\" of L." msgstr "Це «варіант Š· argvĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:9010 +#: ../src/guestfs-actions.pod:9017 msgid "guestfs_tune2fs_l" msgstr "guestfs_tune2fs_l" #. type: verbatim -#: ../src/guestfs-actions.pod:9012 +#: ../src/guestfs-actions.pod:9019 #, no-wrap msgid "" " char **\n" @@ -42861,12 +42880,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9032 +#: ../src/guestfs-actions.pod:9039 msgid "guestfs_txz_in" msgstr "guestfs_txz_in" #. type: verbatim -#: ../src/guestfs-actions.pod:9034 +#: ../src/guestfs-actions.pod:9041 #, no-wrap msgid "" " int\n" @@ -42882,12 +42901,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9046 +#: ../src/guestfs-actions.pod:9053 msgid "guestfs_txz_out" msgstr "guestfs_txz_out" #. type: verbatim -#: ../src/guestfs-actions.pod:9048 +#: ../src/guestfs-actions.pod:9055 #, no-wrap msgid "" " int\n" @@ -42903,12 +42922,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9060 +#: ../src/guestfs-actions.pod:9067 msgid "guestfs_umask" msgstr "guestfs_umask" #. type: verbatim -#: ../src/guestfs-actions.pod:9062 +#: ../src/guestfs-actions.pod:9069 #, no-wrap msgid "" " int\n" @@ -42922,7 +42941,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9078 +#: ../src/guestfs-actions.pod:9085 msgid "" "See also C, L, C, " "C." @@ -42931,12 +42950,12 @@ msgstr "" "C." #. type: =head2 -#: ../src/guestfs-actions.pod:9087 +#: ../src/guestfs-actions.pod:9094 msgid "guestfs_umount" msgstr "guestfs_umount" #. type: verbatim -#: ../src/guestfs-actions.pod:9089 +#: ../src/guestfs-actions.pod:9096 #, no-wrap msgid "" " int\n" @@ -42950,12 +42969,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9101 +#: ../src/guestfs-actions.pod:9108 msgid "guestfs_umount_all" msgstr "guestfs_umount_all" #. type: verbatim -#: ../src/guestfs-actions.pod:9103 +#: ../src/guestfs-actions.pod:9110 #, no-wrap msgid "" " int\n" @@ -42967,12 +42986,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9114 +#: ../src/guestfs-actions.pod:9121 msgid "guestfs_umount_local" msgstr "guestfs_umount_local" #. type: verbatim -#: ../src/guestfs-actions.pod:9116 +#: ../src/guestfs-actions.pod:9123 #, no-wrap msgid "" " int\n" @@ -42986,7 +43005,7 @@ msgstr "" "\n" #. type: verbatim -#: ../src/guestfs-actions.pod:9125 +#: ../src/guestfs-actions.pod:9132 #, no-wrap msgid "" " GUESTFS_UMOUNT_LOCAL_RETRY, int retry,\n" @@ -42996,12 +43015,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9136 +#: ../src/guestfs-actions.pod:9143 msgid "guestfs_umount_local_va" msgstr "guestfs_umount_local_va" #. type: verbatim -#: ../src/guestfs-actions.pod:9138 +#: ../src/guestfs-actions.pod:9145 #, no-wrap msgid "" " int\n" @@ -43015,17 +43034,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9142 +#: ../src/guestfs-actions.pod:9149 msgid "This is the \"va_list variant\" of L." msgstr "Це «варіант Š· va_listĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:9146 +#: ../src/guestfs-actions.pod:9153 msgid "guestfs_umount_local_argv" msgstr "guestfs_umount_local_argv" #. type: verbatim -#: ../src/guestfs-actions.pod:9148 +#: ../src/guestfs-actions.pod:9155 #, no-wrap msgid "" " int\n" @@ -43039,17 +43058,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9152 +#: ../src/guestfs-actions.pod:9159 msgid "This is the \"argv variant\" of L." msgstr "Це «варіант Š· argvĀ» L." #. type: =head2 -#: ../src/guestfs-actions.pod:9156 +#: ../src/guestfs-actions.pod:9163 msgid "guestfs_upload" msgstr "guestfs_upload" #. type: verbatim -#: ../src/guestfs-actions.pod:9158 +#: ../src/guestfs-actions.pod:9165 #, no-wrap msgid "" " int\n" @@ -43065,17 +43084,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9168 +#: ../src/guestfs-actions.pod:9175 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9179 +#: ../src/guestfs-actions.pod:9186 msgid "guestfs_upload_offset" msgstr "guestfs_upload_offset" #. type: verbatim -#: ../src/guestfs-actions.pod:9181 +#: ../src/guestfs-actions.pod:9188 #, no-wrap msgid "" " int\n" @@ -43093,7 +43112,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9197 +#: ../src/guestfs-actions.pod:9204 msgid "" "Note that there is no limit on the amount of data that can be uploaded with " "this call, unlike with C, and this call always writes the " @@ -43101,17 +43120,17 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9202 +#: ../src/guestfs-actions.pod:9209 msgid "See also C, C." msgstr "Див. також C, C." #. type: =head2 -#: ../src/guestfs-actions.pod:9213 +#: ../src/guestfs-actions.pod:9220 msgid "guestfs_utimens" msgstr "guestfs_utimens" #. type: verbatim -#: ../src/guestfs-actions.pod:9215 +#: ../src/guestfs-actions.pod:9222 #, no-wrap msgid "" " int\n" @@ -43133,12 +43152,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9244 ../src/guestfs-structs.pod:175 +#: ../src/guestfs-actions.pod:9251 ../src/guestfs-structs.pod:175 msgid "guestfs_version" msgstr "guestfs_version" #. type: verbatim -#: ../src/guestfs-actions.pod:9246 +#: ../src/guestfs-actions.pod:9253 #, no-wrap msgid "" " struct guestfs_version *\n" @@ -43150,7 +43169,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9274 +#: ../src/guestfs-actions.pod:9281 msgid "" "I Don't use this call to test for availability of features. In " "enterprise distributions we backport features from later versions into " @@ -43159,24 +43178,24 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9280 +#: ../src/guestfs-actions.pod:9287 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9284 +#: ../src/guestfs-actions.pod:9291 msgid "(Added in 1.0.58)" msgstr "(ДоГано у 1.0.58)" #. type: =head2 -#: ../src/guestfs-actions.pod:9286 +#: ../src/guestfs-actions.pod:9293 msgid "guestfs_vfs_label" msgstr "guestfs_vfs_label" #. type: verbatim -#: ../src/guestfs-actions.pod:9288 +#: ../src/guestfs-actions.pod:9295 #, no-wrap msgid "" " char *\n" @@ -43190,24 +43209,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9297 +#: ../src/guestfs-actions.pod:9304 msgid "To find a filesystem from the label, use C." msgstr "" "Пошук файлової системи за Š¼Ń–Ń‚ŠŗŠ¾ŃŽ можна зГійснити за Š“Š¾ŠæŠ¾Š¼Š¾Š³Š¾ŃŽ " "C." #. type: textblock -#: ../src/guestfs-actions.pod:9302 ../src/guestfs-actions.pod:9339 +#: ../src/guestfs-actions.pod:9309 ../src/guestfs-actions.pod:9346 msgid "(Added in 1.3.18)" msgstr "(ДоГано у 1.3.18)" #. type: =head2 -#: ../src/guestfs-actions.pod:9304 +#: ../src/guestfs-actions.pod:9311 msgid "guestfs_vfs_type" msgstr "guestfs_vfs_type" #. type: verbatim -#: ../src/guestfs-actions.pod:9306 +#: ../src/guestfs-actions.pod:9313 #, no-wrap msgid "" " char *\n" @@ -43221,12 +43240,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9323 +#: ../src/guestfs-actions.pod:9330 msgid "guestfs_vfs_uuid" msgstr "guestfs_vfs_uuid" #. type: verbatim -#: ../src/guestfs-actions.pod:9325 +#: ../src/guestfs-actions.pod:9332 #, no-wrap msgid "" " char *\n" @@ -43240,19 +43259,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9334 +#: ../src/guestfs-actions.pod:9341 msgid "To find a filesystem from the UUID, use C." msgstr "" "Пошук файлової системи за UUID можна зГійснити за Š“Š¾ŠæŠ¾Š¼Š¾Š³Š¾ŃŽ " "C." #. type: =head2 -#: ../src/guestfs-actions.pod:9341 +#: ../src/guestfs-actions.pod:9348 msgid "guestfs_vg_activate" msgstr "guestfs_vg_activate" #. type: verbatim -#: ../src/guestfs-actions.pod:9343 +#: ../src/guestfs-actions.pod:9350 #, no-wrap msgid "" " int\n" @@ -43268,12 +43287,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9360 +#: ../src/guestfs-actions.pod:9367 msgid "guestfs_vg_activate_all" msgstr "guestfs_vg_activate_all" #. type: verbatim -#: ../src/guestfs-actions.pod:9362 +#: ../src/guestfs-actions.pod:9369 #, no-wrap msgid "" " int\n" @@ -43287,12 +43306,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9375 +#: ../src/guestfs-actions.pod:9382 msgid "guestfs_vgcreate" msgstr "guestfs_vgcreate" #. type: verbatim -#: ../src/guestfs-actions.pod:9377 +#: ../src/guestfs-actions.pod:9384 #, no-wrap msgid "" " int\n" @@ -43308,12 +43327,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9389 +#: ../src/guestfs-actions.pod:9396 msgid "guestfs_vglvuuids" msgstr "guestfs_vglvuuids" #. type: verbatim -#: ../src/guestfs-actions.pod:9391 +#: ../src/guestfs-actions.pod:9398 #, no-wrap msgid "" " char **\n" @@ -43327,24 +43346,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9398 +#: ../src/guestfs-actions.pod:9405 msgid "" "You can use this along with C and C calls to " "associate logical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9401 +#: ../src/guestfs-actions.pod:9408 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9409 +#: ../src/guestfs-actions.pod:9416 msgid "guestfs_vgmeta" msgstr "guestfs_vgmeta" #. type: verbatim -#: ../src/guestfs-actions.pod:9411 +#: ../src/guestfs-actions.pod:9418 #, no-wrap msgid "" " char *\n" @@ -43360,17 +43379,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9426 +#: ../src/guestfs-actions.pod:9433 msgid "(Added in 1.17.20)" msgstr "(ДоГано у 1.17.20)" #. type: =head2 -#: ../src/guestfs-actions.pod:9428 +#: ../src/guestfs-actions.pod:9435 msgid "guestfs_vgpvuuids" msgstr "guestfs_vgpvuuids" #. type: verbatim -#: ../src/guestfs-actions.pod:9430 +#: ../src/guestfs-actions.pod:9437 #, no-wrap msgid "" " char **\n" @@ -43384,24 +43403,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9437 +#: ../src/guestfs-actions.pod:9444 msgid "" "You can use this along with C and C calls to " "associate physical volumes and volume groups." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9440 +#: ../src/guestfs-actions.pod:9447 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9448 +#: ../src/guestfs-actions.pod:9455 msgid "guestfs_vgremove" msgstr "guestfs_vgremove" #. type: verbatim -#: ../src/guestfs-actions.pod:9450 +#: ../src/guestfs-actions.pod:9457 #, no-wrap msgid "" " int\n" @@ -43415,12 +43434,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9463 +#: ../src/guestfs-actions.pod:9470 msgid "guestfs_vgrename" msgstr "guestfs_vgrename" #. type: verbatim -#: ../src/guestfs-actions.pod:9465 +#: ../src/guestfs-actions.pod:9472 #, no-wrap msgid "" " int\n" @@ -43436,12 +43455,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9476 +#: ../src/guestfs-actions.pod:9483 msgid "guestfs_vgs" msgstr "guestfs_vgs" #. type: verbatim -#: ../src/guestfs-actions.pod:9478 +#: ../src/guestfs-actions.pod:9485 #, no-wrap msgid "" " char **\n" @@ -43453,17 +43472,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9487 +#: ../src/guestfs-actions.pod:9494 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9495 +#: ../src/guestfs-actions.pod:9502 msgid "guestfs_vgs_full" msgstr "guestfs_vgs_full" #. type: verbatim -#: ../src/guestfs-actions.pod:9497 +#: ../src/guestfs-actions.pod:9504 #, no-wrap msgid "" " struct guestfs_lvm_vg_list *\n" @@ -43475,19 +43494,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9503 +#: ../src/guestfs-actions.pod:9510 msgid "" "This function returns a C, or NULL if there " "was an error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9509 +#: ../src/guestfs-actions.pod:9516 msgid "guestfs_vgscan" msgstr "guestfs_vgscan" #. type: verbatim -#: ../src/guestfs-actions.pod:9511 +#: ../src/guestfs-actions.pod:9518 #, no-wrap msgid "" " int\n" @@ -43499,12 +43518,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9521 +#: ../src/guestfs-actions.pod:9528 msgid "guestfs_vguuid" msgstr "guestfs_vguuid" #. type: verbatim -#: ../src/guestfs-actions.pod:9523 +#: ../src/guestfs-actions.pod:9530 #, no-wrap msgid "" " char *\n" @@ -43518,12 +43537,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9534 +#: ../src/guestfs-actions.pod:9541 msgid "guestfs_wait_ready" msgstr "guestfs_wait_ready" #. type: verbatim -#: ../src/guestfs-actions.pod:9536 +#: ../src/guestfs-actions.pod:9543 #, no-wrap msgid "" " int\n" @@ -43535,19 +43554,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9539 +#: ../src/guestfs-actions.pod:9546 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9546 +#: ../src/guestfs-actions.pod:9553 msgid "This function is a no op." msgstr "Š¦Ń Ń„ŃƒŠ½ŠŗŃ†Ń–Ń не Š²ŠøŠŗŠ¾Š½ŃƒŃ” Š½Ń–ŃŠŗŠøŃ… Гій." #. type: textblock -#: ../src/guestfs-actions.pod:9548 +#: ../src/guestfs-actions.pod:9555 msgid "" "In versions of the API E 1.0.71 you had to call this function just after " "calling C to wait for the launch to complete. However this " @@ -43555,19 +43574,19 @@ msgid "" msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9553 +#: ../src/guestfs-actions.pod:9560 msgid "" "If you see any calls to this function in code then you can just remove them, " "unless you want to retain compatibility with older versions of the API." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9561 +#: ../src/guestfs-actions.pod:9568 msgid "guestfs_wc_c" msgstr "guestfs_wc_c" #. type: verbatim -#: ../src/guestfs-actions.pod:9563 +#: ../src/guestfs-actions.pod:9570 #, no-wrap msgid "" " int\n" @@ -43581,12 +43600,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9574 +#: ../src/guestfs-actions.pod:9581 msgid "guestfs_wc_l" msgstr "guestfs_wc_l" #. type: verbatim -#: ../src/guestfs-actions.pod:9576 +#: ../src/guestfs-actions.pod:9583 #, no-wrap msgid "" " int\n" @@ -43600,12 +43619,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9587 +#: ../src/guestfs-actions.pod:9594 msgid "guestfs_wc_w" msgstr "guestfs_wc_w" #. type: verbatim -#: ../src/guestfs-actions.pod:9589 +#: ../src/guestfs-actions.pod:9596 #, no-wrap msgid "" " int\n" @@ -43619,12 +43638,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9600 +#: ../src/guestfs-actions.pod:9607 msgid "guestfs_wipefs" msgstr "guestfs_wipefs" #. type: verbatim -#: ../src/guestfs-actions.pod:9602 +#: ../src/guestfs-actions.pod:9609 #, no-wrap msgid "" " int\n" @@ -43638,18 +43657,18 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9612 +#: ../src/guestfs-actions.pod:9619 msgid "" "Compare with C which zeroes the first few blocks of a device." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9619 +#: ../src/guestfs-actions.pod:9626 msgid "guestfs_write" msgstr "guestfs_write" #. type: verbatim -#: ../src/guestfs-actions.pod:9621 +#: ../src/guestfs-actions.pod:9628 #, no-wrap msgid "" " int\n" @@ -43667,17 +43686,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9630 +#: ../src/guestfs-actions.pod:9637 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9639 +#: ../src/guestfs-actions.pod:9646 msgid "guestfs_write_append" msgstr "guestfs_write_append" #. type: verbatim -#: ../src/guestfs-actions.pod:9641 +#: ../src/guestfs-actions.pod:9648 #, no-wrap msgid "" " int\n" @@ -43695,17 +43714,17 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9650 +#: ../src/guestfs-actions.pod:9657 msgid "See also C." msgstr "Див. також C." #. type: =head2 -#: ../src/guestfs-actions.pod:9659 +#: ../src/guestfs-actions.pod:9666 msgid "guestfs_write_file" msgstr "guestfs_write_file" #. type: verbatim -#: ../src/guestfs-actions.pod:9661 +#: ../src/guestfs-actions.pod:9668 #, no-wrap msgid "" " int\n" @@ -43723,21 +43742,21 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9667 +#: ../src/guestfs-actions.pod:9674 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9692 +#: ../src/guestfs-actions.pod:9699 #, fuzzy #| msgid "guestfs_isoinfo" msgid "guestfs_xfs_info" msgstr "guestfs_isoinfo" #. type: verbatim -#: ../src/guestfs-actions.pod:9694 +#: ../src/guestfs-actions.pod:9701 #, fuzzy, no-wrap #| msgid "" #| " struct guestfs_isoinfo *\n" @@ -43756,19 +43775,19 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9705 +#: ../src/guestfs-actions.pod:9712 msgid "" "This function returns a C, or NULL if there was an " "error. I after use>." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9709 +#: ../src/guestfs-actions.pod:9716 msgid "guestfs_zegrep" msgstr "guestfs_zegrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9711 +#: ../src/guestfs-actions.pod:9718 #, no-wrap msgid "" " char **\n" @@ -43784,12 +43803,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9728 +#: ../src/guestfs-actions.pod:9735 msgid "guestfs_zegrepi" msgstr "guestfs_zegrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9730 +#: ../src/guestfs-actions.pod:9737 #, no-wrap msgid "" " char **\n" @@ -43805,12 +43824,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9747 +#: ../src/guestfs-actions.pod:9754 msgid "guestfs_zero" msgstr "guestfs_zero" #. type: verbatim -#: ../src/guestfs-actions.pod:9749 +#: ../src/guestfs-actions.pod:9756 #, no-wrap msgid "" " int\n" @@ -43824,7 +43843,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9763 +#: ../src/guestfs-actions.pod:9770 msgid "" "See also: C, C, " "C" @@ -43833,12 +43852,12 @@ msgstr "" "C" #. type: =head2 -#: ../src/guestfs-actions.pod:9775 +#: ../src/guestfs-actions.pod:9782 msgid "guestfs_zero_device" msgstr "guestfs_zero_device" #. type: verbatim -#: ../src/guestfs-actions.pod:9777 +#: ../src/guestfs-actions.pod:9784 #, no-wrap msgid "" " int\n" @@ -43852,24 +43871,24 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9781 +#: ../src/guestfs-actions.pod:9788 msgid "" "This command writes zeroes over the entire C. Compare with " "C which just zeroes the first few blocks of a device." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9796 +#: ../src/guestfs-actions.pod:9803 msgid "(Added in 1.3.1)" msgstr "(ДоГано у 1.3.1)" #. type: =head2 -#: ../src/guestfs-actions.pod:9798 +#: ../src/guestfs-actions.pod:9805 msgid "guestfs_zero_free_space" msgstr "guestfs_zero_free_space" #. type: verbatim -#: ../src/guestfs-actions.pod:9800 +#: ../src/guestfs-actions.pod:9807 #, no-wrap msgid "" " int\n" @@ -43883,7 +43902,7 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9810 +#: ../src/guestfs-actions.pod:9817 msgid "" "Free space is not \"trimmed\". You may want to call C " "either as an alternative to this, or after calling this, depending on your " @@ -43891,12 +43910,12 @@ msgid "" msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9823 +#: ../src/guestfs-actions.pod:9830 msgid "guestfs_zerofree" msgstr "guestfs_zerofree" #. type: verbatim -#: ../src/guestfs-actions.pod:9825 +#: ../src/guestfs-actions.pod:9832 #, no-wrap msgid "" " int\n" @@ -43910,12 +43929,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9844 +#: ../src/guestfs-actions.pod:9851 msgid "guestfs_zfgrep" msgstr "guestfs_zfgrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9846 +#: ../src/guestfs-actions.pod:9853 #, no-wrap msgid "" " char **\n" @@ -43931,12 +43950,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9863 +#: ../src/guestfs-actions.pod:9870 msgid "guestfs_zfgrepi" msgstr "guestfs_zfgrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9865 +#: ../src/guestfs-actions.pod:9872 #, no-wrap msgid "" " char **\n" @@ -43952,12 +43971,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9882 +#: ../src/guestfs-actions.pod:9889 msgid "guestfs_zfile" msgstr "guestfs_zfile" #. type: verbatim -#: ../src/guestfs-actions.pod:9884 +#: ../src/guestfs-actions.pod:9891 #, no-wrap msgid "" " char *\n" @@ -43973,26 +43992,26 @@ msgstr "" "\n" #. type: textblock -#: ../src/guestfs-actions.pod:9889 +#: ../src/guestfs-actions.pod:9896 msgid "" "I In new code, use the L call " "instead." msgstr "" #. type: textblock -#: ../src/guestfs-actions.pod:9901 +#: ../src/guestfs-actions.pod:9908 msgid "" "Since 1.0.63, use C instead which can now process compressed " "files." msgstr "" #. type: =head2 -#: ../src/guestfs-actions.pod:9909 +#: ../src/guestfs-actions.pod:9916 msgid "guestfs_zgrep" msgstr "guestfs_zgrep" #. type: verbatim -#: ../src/guestfs-actions.pod:9911 +#: ../src/guestfs-actions.pod:9918 #, no-wrap msgid "" " char **\n" @@ -44008,12 +44027,12 @@ msgstr "" "\n" #. type: =head2 -#: ../src/guestfs-actions.pod:9928 +#: ../src/guestfs-actions.pod:9935 msgid "guestfs_zgrepi" msgstr "guestfs_zgrepi" #. type: verbatim -#: ../src/guestfs-actions.pod:9930 +#: ../src/guestfs-actions.pod:9937 #, no-wrap msgid "" " char **\n" diff --git a/po/POTFILES b/po/POTFILES index 4bbe2d10..ef76203f 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -24,9 +24,9 @@ daemon/dir.c daemon/dmesg.c daemon/dropcaches.c daemon/du.c -daemon/echo_daemon.c +daemon/echo-daemon.c +daemon/errnostring-gperf.c daemon/errnostring.c -daemon/errnostring_gperf.c daemon/ext2.c daemon/fallocate.c daemon/file.c @@ -95,8 +95,8 @@ edit/virt-edit.c erlang/erl-guestfs-proto.c erlang/erl-guestfs.c fish/alloc.c +fish/cmds-gperf.c fish/cmds.c -fish/cmds_gperf.c fish/completion.c fish/config.c fish/copy.c @@ -117,12 +117,12 @@ fish/lcd.c fish/man.c fish/more.c fish/options.c +fish/prep-boot.c +fish/prep-disk.c +fish/prep-fs.c +fish/prep-lv.c +fish/prep-part.c fish/prep.c -fish/prep_boot.c -fish/prep_disk.c -fish/prep_fs.c -fish/prep_lv.c -fish/prep_part.c fish/prepopts.c fish/progress.c fish/rc.c @@ -178,8 +178,8 @@ gobject/src/struct-xfsinfo.c gobject/src/tristate.c inspector/virt-inspector.c java/com_redhat_et_libguestfs_GuestFS.c -ocaml/guestfs_c.c -ocaml/guestfs_c_actions.c +ocaml/guestfs-c-actions.c +ocaml/guestfs-c.c perl/Guestfs.c perl/bindtests.pl perl/lib/Sys/Guestfs.pm @@ -188,26 +188,26 @@ php/extension/guestfs_php.c python/guestfs-py-byhand.c python/guestfs-py.c rescue/virt-rescue.c -resize/progress_c.c +resize/progress-c.c ruby/ext/guestfs/_guestfs.c -sparsify/progress_c.c +sparsify/progress-c.c src/actions.c src/appliance.c src/bindtests.c src/dbdump.c +src/errnostring-gperf.c src/errnostring.c -src/errnostring_gperf.c src/events.c src/filearch.c src/fuse.c src/guestfs.c +src/inspect-apps.c +src/inspect-fs-cd.c +src/inspect-fs-unix.c +src/inspect-fs-windows.c +src/inspect-fs.c +src/inspect-icon.c src/inspect.c -src/inspect_apps.c -src/inspect_fs.c -src/inspect_fs_cd.c -src/inspect_fs_unix.c -src/inspect_fs_windows.c -src/inspect_icon.c src/launch.c src/libvirtdomain.c src/listfs.c diff --git a/resize/Makefile.am b/resize/Makefile.am index 0d80df14..a9d27d21 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -32,7 +32,7 @@ CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-resize test.img # Alphabetical order. SOURCES = \ - progress_c.c \ + progress-c.c \ progress.mli \ progress.ml \ resize.ml \ @@ -45,7 +45,7 @@ if HAVE_OCAML # Note this list must be in dependency order. OBJECTS = \ $(top_builddir)/fish/guestfish-progress.o \ - progress_c.o \ + progress-c.o \ resize_gettext.cmx \ utils.cmx \ progress.cmx \ diff --git a/resize/progress-c.c b/resize/progress-c.c new file mode 100644 index 00000000..2f25bbcc --- /dev/null +++ b/resize/progress-c.c @@ -0,0 +1,105 @@ +/* virt-resize - interface to progress bar mini library + * Copyright (C) 2011 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "progress.h" + +#define Bar_val(v) (*((struct progress_bar **)Data_custom_val(v))) + +static void +progress_bar_finalize (value barv) +{ + struct progress_bar *bar = Bar_val (barv); + + if (bar) + progress_bar_free (bar); +} + +static struct custom_operations progress_bar_custom_operations = { + (char *) "progress_bar_custom_operations", + progress_bar_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +value +virt_resize_progress_bar_init (value machine_readablev) +{ + CAMLparam1 (machine_readablev); + CAMLlocal1 (barv); + struct progress_bar *bar; + int machine_readable = Bool_val (machine_readablev); + unsigned flags = 0; + + /* XXX Have to do this to get nl_langinfo to work properly. However + * we should really only call this from main. + */ + setlocale (LC_ALL, ""); + + if (machine_readable) + flags |= PROGRESS_BAR_MACHINE_READABLE; + bar = progress_bar_init (flags); + if (bar == NULL) + caml_raise_out_of_memory (); + + barv = caml_alloc_custom (&progress_bar_custom_operations, + sizeof (struct progress_bar *), 0, 1); + Bar_val (barv) = bar; + + CAMLreturn (barv); +} + +value +virt_resize_progress_bar_reset (value barv) +{ + CAMLparam1 (barv); + struct progress_bar *bar = Bar_val (barv); + + progress_bar_reset (bar); + + CAMLreturn (Val_unit); +} + +value +virt_resize_progress_bar_set (value barv, + value positionv, value totalv) +{ + CAMLparam3 (barv, positionv, totalv); + struct progress_bar *bar = Bar_val (barv); + uint64_t position = Int64_val (positionv); + uint64_t total = Int64_val (totalv); + + progress_bar_set (bar, position, total); + + CAMLreturn (Val_unit); +} diff --git a/resize/progress_c.c b/resize/progress_c.c deleted file mode 100644 index 2f25bbcc..00000000 --- a/resize/progress_c.c +++ /dev/null @@ -1,105 +0,0 @@ -/* virt-resize - interface to progress bar mini library - * Copyright (C) 2011 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "progress.h" - -#define Bar_val(v) (*((struct progress_bar **)Data_custom_val(v))) - -static void -progress_bar_finalize (value barv) -{ - struct progress_bar *bar = Bar_val (barv); - - if (bar) - progress_bar_free (bar); -} - -static struct custom_operations progress_bar_custom_operations = { - (char *) "progress_bar_custom_operations", - progress_bar_finalize, - custom_compare_default, - custom_hash_default, - custom_serialize_default, - custom_deserialize_default -}; - -value -virt_resize_progress_bar_init (value machine_readablev) -{ - CAMLparam1 (machine_readablev); - CAMLlocal1 (barv); - struct progress_bar *bar; - int machine_readable = Bool_val (machine_readablev); - unsigned flags = 0; - - /* XXX Have to do this to get nl_langinfo to work properly. However - * we should really only call this from main. - */ - setlocale (LC_ALL, ""); - - if (machine_readable) - flags |= PROGRESS_BAR_MACHINE_READABLE; - bar = progress_bar_init (flags); - if (bar == NULL) - caml_raise_out_of_memory (); - - barv = caml_alloc_custom (&progress_bar_custom_operations, - sizeof (struct progress_bar *), 0, 1); - Bar_val (barv) = bar; - - CAMLreturn (barv); -} - -value -virt_resize_progress_bar_reset (value barv) -{ - CAMLparam1 (barv); - struct progress_bar *bar = Bar_val (barv); - - progress_bar_reset (bar); - - CAMLreturn (Val_unit); -} - -value -virt_resize_progress_bar_set (value barv, - value positionv, value totalv) -{ - CAMLparam3 (barv, positionv, totalv); - struct progress_bar *bar = Bar_val (barv); - uint64_t position = Int64_val (positionv); - uint64_t total = Int64_val (totalv); - - progress_bar_set (bar, position, total); - - CAMLreturn (Val_unit); -} diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 36c7b73c..a2e2b9c6 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -32,7 +32,7 @@ CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-sparsify test.img # Alphabetical order. SOURCES = \ - progress_c.c \ + progress-c.c \ progress.mli \ progress.ml \ sparsify.ml \ @@ -44,7 +44,7 @@ if HAVE_OCAML # Note this list must be in dependency order. OBJECTS = \ $(top_builddir)/fish/guestfish-progress.o \ - progress_c.o \ + progress-c.o \ sparsify_gettext.cmx \ utils.cmx \ progress.cmx \ diff --git a/sparsify/progress-c.c b/sparsify/progress-c.c new file mode 100644 index 00000000..81137289 --- /dev/null +++ b/sparsify/progress-c.c @@ -0,0 +1,105 @@ +/* virt-sparsify - interface to progress bar mini library + * Copyright (C) 2011 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "progress.h" + +#define Bar_val(v) (*((struct progress_bar **)Data_custom_val(v))) + +static void +progress_bar_finalize (value barv) +{ + struct progress_bar *bar = Bar_val (barv); + + if (bar) + progress_bar_free (bar); +} + +static struct custom_operations progress_bar_custom_operations = { + (char *) "progress_bar_custom_operations", + progress_bar_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +value +virt_sparsify_progress_bar_init (value machine_readablev) +{ + CAMLparam1 (machine_readablev); + CAMLlocal1 (barv); + struct progress_bar *bar; + int machine_readable = Bool_val (machine_readablev); + unsigned flags = 0; + + /* XXX Have to do this to get nl_langinfo to work properly. However + * we should really only call this from main. + */ + setlocale (LC_ALL, ""); + + if (machine_readable) + flags |= PROGRESS_BAR_MACHINE_READABLE; + bar = progress_bar_init (flags); + if (bar == NULL) + caml_raise_out_of_memory (); + + barv = caml_alloc_custom (&progress_bar_custom_operations, + sizeof (struct progress_bar *), 0, 1); + Bar_val (barv) = bar; + + CAMLreturn (barv); +} + +value +virt_sparsify_progress_bar_reset (value barv) +{ + CAMLparam1 (barv); + struct progress_bar *bar = Bar_val (barv); + + progress_bar_reset (bar); + + CAMLreturn (Val_unit); +} + +value +virt_sparsify_progress_bar_set (value barv, + value positionv, value totalv) +{ + CAMLparam3 (barv, positionv, totalv); + struct progress_bar *bar = Bar_val (barv); + uint64_t position = Int64_val (positionv); + uint64_t total = Int64_val (totalv); + + progress_bar_set (bar, position, total); + + CAMLreturn (Val_unit); +} diff --git a/sparsify/progress_c.c b/sparsify/progress_c.c deleted file mode 100644 index 81137289..00000000 --- a/sparsify/progress_c.c +++ /dev/null @@ -1,105 +0,0 @@ -/* virt-sparsify - interface to progress bar mini library - * Copyright (C) 2011 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "progress.h" - -#define Bar_val(v) (*((struct progress_bar **)Data_custom_val(v))) - -static void -progress_bar_finalize (value barv) -{ - struct progress_bar *bar = Bar_val (barv); - - if (bar) - progress_bar_free (bar); -} - -static struct custom_operations progress_bar_custom_operations = { - (char *) "progress_bar_custom_operations", - progress_bar_finalize, - custom_compare_default, - custom_hash_default, - custom_serialize_default, - custom_deserialize_default -}; - -value -virt_sparsify_progress_bar_init (value machine_readablev) -{ - CAMLparam1 (machine_readablev); - CAMLlocal1 (barv); - struct progress_bar *bar; - int machine_readable = Bool_val (machine_readablev); - unsigned flags = 0; - - /* XXX Have to do this to get nl_langinfo to work properly. However - * we should really only call this from main. - */ - setlocale (LC_ALL, ""); - - if (machine_readable) - flags |= PROGRESS_BAR_MACHINE_READABLE; - bar = progress_bar_init (flags); - if (bar == NULL) - caml_raise_out_of_memory (); - - barv = caml_alloc_custom (&progress_bar_custom_operations, - sizeof (struct progress_bar *), 0, 1); - Bar_val (barv) = bar; - - CAMLreturn (barv); -} - -value -virt_sparsify_progress_bar_reset (value barv) -{ - CAMLparam1 (barv); - struct progress_bar *bar = Bar_val (barv); - - progress_bar_reset (bar); - - CAMLreturn (Val_unit); -} - -value -virt_sparsify_progress_bar_set (value barv, - value positionv, value totalv) -{ - CAMLparam3 (barv, positionv, totalv); - struct progress_bar *bar = Bar_val (barv); - uint64_t position = Int64_val (positionv); - uint64_t total = Int64_val (totalv); - - progress_bar_set (bar, position, total); - - CAMLreturn (Val_unit); -} diff --git a/src/Makefile.am b/src/Makefile.am index ad641873..d956fdb3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,7 +25,7 @@ generator_built = \ guestfs-internal-actions.h \ actions.c \ bindtests.c \ - errnostring_gperf.gperf \ + errnostring-gperf.gperf \ errnostring.c \ errnostring.h \ guestfs-actions.pod \ @@ -37,7 +37,7 @@ BUILT_SOURCES = \ $(generator_built) \ guestfs_protocol.c \ guestfs_protocol.h \ - errnostring_gperf.c + errnostring-gperf.c EXTRA_DIST = \ $(BUILT_SOURCES) \ @@ -62,12 +62,12 @@ libprotocol_la_CFLAGS = \ # Build the errnostring perfect hash code. The generated code has lots # of warnings so we must compile it in a separate mini-library. liberrnostring_la_SOURCES = \ - errnostring_gperf.c \ + errnostring-gperf.c \ errnostring.h \ errnostring.c liberrnostring_la_CFLAGS = $(GCC_VISIBILITY_HIDDEN) -errnostring_gperf.c: errnostring_gperf.gperf +errnostring-gperf.c: errnostring-gperf.gperf rm -f $@ $(GPERF) -t $< > $@-t mv $@-t $@ @@ -130,12 +130,12 @@ libguestfs_la_SOURCES = \ filearch.c \ fuse.c \ inspect.c \ - inspect_apps.c \ - inspect_fs.c \ - inspect_fs_cd.c \ - inspect_fs_unix.c \ - inspect_fs_windows.c \ - inspect_icon.c \ + inspect-apps.c \ + inspect-fs.c \ + inspect-fs-cd.c \ + inspect-fs-unix.c \ + inspect-fs-windows.c \ + inspect-icon.c \ launch.c \ libvirtdomain.c \ listfs.c \ diff --git a/src/inspect-apps.c b/src/inspect-apps.c new file mode 100644 index 00000000..0ee39546 --- /dev/null +++ b/src/inspect-apps.c @@ -0,0 +1,621 @@ +/* libguestfs + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_HIVEX +#include +#endif + +#include "c-ctype.h" +#include "ignore-value.h" +#include "xstrtol.h" + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +#if defined(HAVE_HIVEX) + +#ifdef DB_DUMP +static struct guestfs_application_list *list_applications_rpm (guestfs_h *g, struct inspect_fs *fs); +#endif +static struct guestfs_application_list *list_applications_deb (guestfs_h *g, struct inspect_fs *fs); +static struct guestfs_application_list *list_applications_windows (guestfs_h *g, struct inspect_fs *fs); +static void add_application (guestfs_h *g, struct guestfs_application_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *install_path, const char *publisher, const char *url, const char *description); +static void sort_applications (struct guestfs_application_list *); + +/* Unlike the simple inspect-get-* calls, this one assumes that the + * disks are mounted up, and reads files from the mounted disks. + */ +struct guestfs_application_list * +guestfs__inspect_list_applications (guestfs_h *g, const char *root) +{ + struct inspect_fs *fs = guestfs___search_for_root (g, root); + if (!fs) + return NULL; + + struct guestfs_application_list *ret = NULL; + + /* Presently we can only list applications for installed disks. It + * is possible in future to get lists of packages from installers. + */ + if (fs->format == OS_FORMAT_INSTALLED) { + switch (fs->type) { + case OS_TYPE_LINUX: + case OS_TYPE_HURD: + switch (fs->package_format) { + case OS_PACKAGE_FORMAT_RPM: +#ifdef DB_DUMP + ret = list_applications_rpm (g, fs); + if (ret == NULL) + return NULL; +#endif + break; + + case OS_PACKAGE_FORMAT_DEB: + ret = list_applications_deb (g, fs); + if (ret == NULL) + return NULL; + break; + + case OS_PACKAGE_FORMAT_PACMAN: + case OS_PACKAGE_FORMAT_EBUILD: + case OS_PACKAGE_FORMAT_PISI: + case OS_PACKAGE_FORMAT_PKGSRC: + case OS_PACKAGE_FORMAT_UNKNOWN: + default: + /* nothing - keep GCC happy */; + } + break; + + case OS_TYPE_WINDOWS: + ret = list_applications_windows (g, fs); + if (ret == NULL) + return NULL; + break; + + case OS_TYPE_FREEBSD: + case OS_TYPE_NETBSD: + case OS_TYPE_DOS: + case OS_TYPE_UNKNOWN: + default: + /* nothing - keep GCC happy */; + } + } + + if (ret == NULL) { + /* Don't know how to do inspection. Not an error, return an + * empty list. + */ + ret = safe_malloc (g, sizeof *ret); + ret->len = 0; + ret->val = NULL; + } + + sort_applications (ret); + + return ret; +} + +#ifdef DB_DUMP + +/* This data comes from the Name database, and contains the application + * names and the first 4 bytes of the link field. + */ +struct rpm_names_list { + struct rpm_name *names; + size_t len; +}; +struct rpm_name { + char *name; + char link[4]; +}; + +static void +free_rpm_names_list (struct rpm_names_list *list) +{ + size_t i; + + for (i = 0; i < list->len; ++i) + free (list->names[i].name); + free (list->names); +} + +static int +compare_links (const void *av, const void *bv) +{ + const struct rpm_name *a = av; + const struct rpm_name *b = bv; + return memcmp (a->link, b->link, 4); +} + +static int +read_rpm_name (guestfs_h *g, + const unsigned char *key, size_t keylen, + const unsigned char *value, size_t valuelen, + void *listv) +{ + struct rpm_names_list *list = listv; + char *name; + + /* Ignore bogus entries. */ + if (keylen == 0 || valuelen < 4) + return 0; + + /* The name (key) field won't be NUL-terminated, so we must do that. */ + name = safe_malloc (g, keylen+1); + memcpy (name, key, keylen); + name[keylen] = '\0'; + + list->names = safe_realloc (g, list->names, + (list->len + 1) * sizeof (struct rpm_name)); + list->names[list->len].name = name; + memcpy (list->names[list->len].link, value, 4); + list->len++; + + return 0; +} + +struct read_package_data { + struct rpm_names_list *list; + struct guestfs_application_list *apps; +}; + +static int +read_package (guestfs_h *g, + const unsigned char *key, size_t keylen, + const unsigned char *value, size_t valuelen, + void *datav) +{ + struct read_package_data *data = datav; + struct rpm_name nkey, *entry; + char *p; + size_t len; + ssize_t max; + char *nul_name_nul, *version, *release; + + /* This function reads one (key, value) pair from the Packages + * database. The key is the link field (see struct rpm_name). The + * value is a long binary string, but we can extract the version + * number from it as below. First we have to look up the link field + * in the list of links (which is sorted by link field). + */ + + /* Ignore bogus entries. */ + if (keylen < 4 || valuelen == 0) + return 0; + + /* Look up the link (key) in the list. */ + memcpy (nkey.link, key, 4); + entry = bsearch (&nkey, data->list->names, data->list->len, + sizeof (struct rpm_name), compare_links); + if (!entry) + return 0; /* Not found - ignore it. */ + + /* We found a matching link entry, so that gives us the application + * name (entry->name). Now we can get other data for this + * application out of the binary value string. XXX This is a real + * hack. + */ + + /* Look for \0\0 */ + len = strlen (entry->name); + nul_name_nul = safe_malloc (g, len + 2); + nul_name_nul[0] = '\0'; + memcpy (&nul_name_nul[1], entry->name, len); + nul_name_nul[len+1] = '\0'; + p = memmem (value, valuelen, nul_name_nul, len+2); + free (nul_name_nul); + if (!p) + return 0; + + /* Following that are \0-delimited version and release fields. */ + p += len + 2; /* Note we have to skip \0 + name + \0. */ + max = valuelen - (p - (char *) value); + if (max < 0) + max = 0; + version = safe_strndup (g, p, max); + + len = strlen (version); + p += len + 1; + max = valuelen - (p - (char *) value); + if (max < 0) + max = 0; + release = safe_strndup (g, p, max); + + /* Add the application and what we know. */ + add_application (g, data->apps, entry->name, "", 0, version, release, + "", "", "", ""); + + free (version); + free (release); + + return 0; +} + +static struct guestfs_application_list * +list_applications_rpm (guestfs_h *g, struct inspect_fs *fs) +{ + char *Name = NULL, *Packages = NULL; + struct rpm_names_list list = { .names = NULL, .len = 0 }; + struct guestfs_application_list *apps = NULL; + + Name = guestfs___download_to_tmp (g, fs, + "/var/lib/rpm/Name", "rpm_Name", + MAX_PKG_DB_SIZE); + if (Name == NULL) + goto error; + + Packages = guestfs___download_to_tmp (g, fs, + "/var/lib/rpm/Packages", "rpm_Packages", + MAX_PKG_DB_SIZE); + if (Packages == NULL) + goto error; + + /* Read Name database. */ + if (guestfs___read_db_dump (g, Name, &list, read_rpm_name) == -1) + goto error; + + /* Sort the names by link field for fast searching. */ + qsort (list.names, list.len, sizeof (struct rpm_name), compare_links); + + /* Allocate 'apps' list. */ + apps = safe_malloc (g, sizeof *apps); + apps->len = 0; + apps->val = NULL; + + /* Read Packages database. */ + struct read_package_data data = { .list = &list, .apps = apps }; + if (guestfs___read_db_dump (g, Packages, &data, read_package) == -1) + goto error; + + free (Name); + free (Packages); + free_rpm_names_list (&list); + + return apps; + + error: + free (Name); + free (Packages); + free_rpm_names_list (&list); + if (apps != NULL) + guestfs_free_application_list (apps); + + return NULL; +} + +#endif /* defined DB_DUMP */ + +static struct guestfs_application_list * +list_applications_deb (guestfs_h *g, struct inspect_fs *fs) +{ + char *status = NULL; + status = guestfs___download_to_tmp (g, fs, "/var/lib/dpkg/status", "status", + MAX_PKG_DB_SIZE); + if (status == NULL) + return NULL; + + struct guestfs_application_list *apps = NULL, *ret = NULL; + FILE *fp = NULL; + char line[1024]; + size_t len; + char *name = NULL, *version = NULL, *release = NULL; + int installed_flag = 0; + + fp = fopen (status, "r"); + if (fp == NULL) { + perrorf (g, "fopen: %s", status); + goto out; + } + + /* Allocate 'apps' list. */ + apps = safe_malloc (g, sizeof *apps); + apps->len = 0; + apps->val = NULL; + + /* Read the temporary file. Each package entry is separated by + * a blank line. + * XXX Strictly speaking this is in mailbox header format, so it + * would be possible for fields to spread across multiple lines, + * although for the short fields that we are concerned about this is + * unlikely and not seen in practice. + */ + while (fgets (line, sizeof line, fp) != NULL) { + len = strlen (line); + if (len > 0 && line[len-1] == '\n') { + line[len-1] = '\0'; + len--; + } + + if (STRPREFIX (line, "Package: ")) { + free (name); + name = safe_strdup (g, &line[9]); + } + else if (STRPREFIX (line, "Status: ")) { + installed_flag = strstr (&line[8], "installed") != NULL; + } + else if (STRPREFIX (line, "Version: ")) { + free (version); + free (release); + char *p = strchr (&line[9], '-'); + if (p) { + *p = '\0'; + version = safe_strdup (g, &line[9]); + release = safe_strdup (g, p+1); + } else { + version = safe_strdup (g, &line[9]); + release = NULL; + } + } + else if (STREQ (line, "")) { + if (installed_flag && name && version) + add_application (g, apps, name, "", 0, version, release ? : "", + "", "", "", ""); + free (name); + free (version); + free (release); + name = version = release = NULL; + installed_flag = 0; + } + } + + if (fclose (fp) == -1) { + perrorf (g, "fclose: %s", status); + fp = NULL; + goto out; + } + fp = NULL; + + ret = apps; + + out: + if (ret == NULL && apps != NULL) + guestfs_free_application_list (apps); + if (fp) + fclose (fp); + free (name); + free (version); + free (release); + free (status); + return ret; +} + +static void list_applications_windows_from_path (guestfs_h *g, hive_h *h, struct guestfs_application_list *apps, const char **path, size_t path_len); + +static struct guestfs_application_list * +list_applications_windows (guestfs_h *g, struct inspect_fs *fs) +{ + size_t len = strlen (fs->windows_systemroot) + 64; + char software[len]; + snprintf (software, len, "%s/system32/config/software", + fs->windows_systemroot); + + char *software_path = guestfs___case_sensitive_path_silently (g, software); + if (!software_path) { + /* Missing software hive is a problem. */ + error (g, "no HKLM\\SOFTWARE hive found in the guest"); + return NULL; + } + + char *software_hive = NULL; + struct guestfs_application_list *ret = NULL; + hive_h *h = NULL; + + software_hive = guestfs___download_to_tmp (g, fs, software_path, "software", + MAX_REGISTRY_SIZE); + if (software_hive == NULL) + goto out; + + free (software_path); + software_path = NULL; + + h = hivex_open (software_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); + if (h == NULL) { + perrorf (g, "hivex_open"); + goto out; + } + + /* Allocate apps list. */ + ret = safe_malloc (g, sizeof *ret); + ret->len = 0; + ret->val = NULL; + + /* Ordinary native applications. */ + const char *hivepath[] = + { "Microsoft", "Windows", "CurrentVersion", "Uninstall" }; + list_applications_windows_from_path (g, h, ret, hivepath, + sizeof hivepath / sizeof hivepath[0]); + + /* 32-bit emulated Windows apps running on the WOW64 emulator. + * http://support.microsoft.com/kb/896459 (RHBZ#692545). + */ + const char *hivepath2[] = + { "WOW6432node", "Microsoft", "Windows", "CurrentVersion", "Uninstall" }; + list_applications_windows_from_path (g, h, ret, hivepath2, + sizeof hivepath2 / sizeof hivepath2[0]); + + out: + if (h) hivex_close (h); + free (software_path); + free (software_hive); + + return ret; +} + +static void +list_applications_windows_from_path (guestfs_h *g, hive_h *h, + struct guestfs_application_list *apps, + const char **path, size_t path_len) +{ + hive_node_h *children = NULL; + hive_node_h node; + size_t i; + + node = hivex_root (h); + + for (i = 0; node != 0 && i < path_len; ++i) + node = hivex_node_get_child (h, node, path[i]); + + if (node == 0) + return; + + children = hivex_node_children (h, node); + if (children == NULL) + return; + + /* Consider any child node that has a DisplayName key. + * See also: + * http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs#Optional_values + */ + for (i = 0; children[i] != 0; ++i) { + hive_value_h value; + char *name = NULL; + char *display_name = NULL; + char *version = NULL; + char *install_path = NULL; + char *publisher = NULL; + char *url = NULL; + char *comments = NULL; + + /* Use the node name as a proxy for the package name in Linux. The + * display name is not language-independent, so it cannot be used. + */ + name = hivex_node_name (h, children[i]); + if (name == NULL) + continue; + + value = hivex_node_get_value (h, children[i], "DisplayName"); + if (value) { + display_name = hivex_value_string (h, value); + if (display_name) { + value = hivex_node_get_value (h, children[i], "DisplayVersion"); + if (value) + version = hivex_value_string (h, value); + value = hivex_node_get_value (h, children[i], "InstallLocation"); + if (value) + install_path = hivex_value_string (h, value); + value = hivex_node_get_value (h, children[i], "Publisher"); + if (value) + publisher = hivex_value_string (h, value); + value = hivex_node_get_value (h, children[i], "URLInfoAbout"); + if (value) + url = hivex_value_string (h, value); + value = hivex_node_get_value (h, children[i], "Comments"); + if (value) + comments = hivex_value_string (h, value); + + add_application (g, apps, name, display_name, 0, + version ? : "", + "", + install_path ? : "", + publisher ? : "", + url ? : "", + comments ? : ""); + } + } + + free (name); + free (display_name); + free (version); + free (install_path); + free (publisher); + free (url); + free (comments); + } + + free (children); +} + +static void +add_application (guestfs_h *g, struct guestfs_application_list *apps, + const char *name, const char *display_name, int32_t epoch, + const char *version, const char *release, + const char *install_path, + const char *publisher, const char *url, + const char *description) +{ + apps->len++; + apps->val = safe_realloc (g, apps->val, + apps->len * sizeof (struct guestfs_application)); + apps->val[apps->len-1].app_name = safe_strdup (g, name); + apps->val[apps->len-1].app_display_name = safe_strdup (g, display_name); + apps->val[apps->len-1].app_epoch = epoch; + apps->val[apps->len-1].app_version = safe_strdup (g, version); + apps->val[apps->len-1].app_release = safe_strdup (g, release); + apps->val[apps->len-1].app_install_path = safe_strdup (g, install_path); + /* XXX Translated path is not implemented yet. */ + apps->val[apps->len-1].app_trans_path = safe_strdup (g, ""); + apps->val[apps->len-1].app_publisher = safe_strdup (g, publisher); + apps->val[apps->len-1].app_url = safe_strdup (g, url); + /* XXX The next two are not yet implemented for any package + * format, but we could easily support them for rpm and deb. + */ + apps->val[apps->len-1].app_source_package = safe_strdup (g, ""); + apps->val[apps->len-1].app_summary = safe_strdup (g, ""); + apps->val[apps->len-1].app_description = safe_strdup (g, description); +} + +/* Sort applications by name before returning the list. */ +static int +compare_applications (const void *vp1, const void *vp2) +{ + const struct guestfs_application *v1 = vp1; + const struct guestfs_application *v2 = vp2; + + return strcmp (v1->app_name, v2->app_name); +} + +static void +sort_applications (struct guestfs_application_list *apps) +{ + if (apps && apps->val) + qsort (apps->val, apps->len, sizeof (struct guestfs_application), + compare_applications); +} + +#else /* no hivex at compile time */ + +/* XXX These functions should be in an optgroup. */ + +#define NOT_IMPL(r) \ + error (g, _("inspection API not available since this version of libguestfs was compiled without the hivex library")); \ + return r + +struct guestfs_application_list * +guestfs__inspect_list_applications (guestfs_h *g, const char *root) +{ + NOT_IMPL(NULL); +} + +#endif /* no hivex at compile time */ diff --git a/src/inspect-fs-cd.c b/src/inspect-fs-cd.c new file mode 100644 index 00000000..12c1a6d8 --- /dev/null +++ b/src/inspect-fs-cd.c @@ -0,0 +1,485 @@ +/* libguestfs + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_HIVEX +#include +#endif + +#include "c-ctype.h" +#include "ignore-value.h" +#include "xstrtol.h" + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +#if defined(HAVE_HIVEX) + +/* Debian/Ubuntu install disks are easy ... + * + * These files are added by the debian-cd program, and it is worth + * looking at the source code to determine exact values, in + * particular '/usr/share/debian-cd/tools/start_new_disc' + * + * XXX Architecture? We could parse it out of the product name + * string, but that seems quite hairy. We could look for the names + * of packages. Also note that some Debian install disks are + * multiarch. + */ +static int +check_debian_installer_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->product_name = guestfs___first_line_of_file (g, "/.disk/info"); + if (!fs->product_name) + return -1; + + fs->type = OS_TYPE_LINUX; + if (STRPREFIX (fs->product_name, "Ubuntu")) + fs->distro = OS_DISTRO_UBUNTU; + else if (STRPREFIX (fs->product_name, "Debian")) + fs->distro = OS_DISTRO_DEBIAN; + + (void) guestfs___parse_major_minor (g, fs); + + if (guestfs_is_file (g, "/.disk/cd_type") > 0) { + char *cd_type = guestfs___first_line_of_file (g, "/.disk/cd_type"); + if (!cd_type) + return -1; + + if (STRPREFIX (cd_type, "dvd/single") || + STRPREFIX (cd_type, "full_cd/single")) { + fs->is_multipart_disk = 0; + fs->is_netinst_disk = 0; + } + else if (STRPREFIX (cd_type, "dvd") || + STRPREFIX (cd_type, "full_cd")) { + fs->is_multipart_disk = 1; + fs->is_netinst_disk = 0; + } + else if (STRPREFIX (cd_type, "not_complete")) { + fs->is_multipart_disk = 0; + fs->is_netinst_disk = 1; + } + + free (cd_type); + } + + return 0; +} + +/* Take string which must look like "key = value" and find the value. + * There may or may not be spaces before and after the equals sign. + * This function is used by both check_fedora_installer_root and + * check_w2k3_installer_root. + */ +static const char * +find_value (const char *kv) +{ + const char *p; + + p = strchr (kv, '='); + if (!p) + abort (); + + do { + ++p; + } while (c_isspace (*p)); + + return p; +} + +/* RHEL 5 has a DVD.iso and several CD-sized -discX-ftp.iso alternatives. + * + * The DVD.iso contains: + * /.treeinfo: + * [general] + * family = Red Hat Enterprise Linux Server + * timestamp = 1328200566.61 + * totaldiscs = 1 + * version = 5.8 + * discnum = 1 + * packagedir = Server + * arch = x86_64 + * [...] + * + * /.discinfo: + * 1328205744.315196 + * Red Hat Enterprise Linux Server 5.8 # product name + * x86_64 # arch + * 1 # disk number + * Server/base + * Server/RPMS + * Server/pixmaps + * + * The alternative CD-sized ISOs contain: + * + * disc1: + * /.treeinfo: + * [general] + * family = Red Hat Enterprise Linux Server + * timestamp = 1328200566.61 + * totaldiscs = 1 + * version = 5.8 + * discnum = 1 + * packagedir = Server + * arch = x86_64 + * [...] + * + * /.discinfo: + * 1328205744.315196 + * Red Hat Enterprise Linux Server 5.8 # product name + * x86_64 # arch + * 1 # disk number + * Server/base + * Server/RPMS + * Server/pixmaps + * + * discN (N > 1): + * /.discinfo: + * 1328205744.315196 + * Red Hat Enterprise Linux Server 5.8 # product name + * x86_64 # arch + * 2 # disk number + * Server/base + * Server/RPMS + * Server/pixmaps + */ + +/* Fedora CDs and DVD (not netinst). The /.treeinfo file contains + * an initial section somewhat like this: + * + * [general] + * version = 14 + * arch = x86_64 + * family = Fedora + * variant = Fedora + * discnum = 1 + * totaldiscs = 1 + */ +static int +check_fedora_installer_root (guestfs_h *g, struct inspect_fs *fs) +{ + char *str; + const char *v; + int r; + int discnum = 0, totaldiscs = 0; + + fs->type = OS_TYPE_LINUX; + + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^family = Fedora$", 0, &str); + if (r == -1) + return -1; + if (r > 0) { + fs->distro = OS_DISTRO_FEDORA; + free (str); + } + + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^family = Red Hat Enterprise Linux$", + 0, &str); + if (r == -1) + return -1; + if (r > 0) { + fs->distro = OS_DISTRO_RHEL; + free (str); + } + + /* XXX should do major.minor before this */ + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^version = [[:digit:]]+", 0, &str); + if (r == -1) + return -1; + if (r > 0) { + v = find_value (str); + fs->major_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); + free (str); + if (fs->major_version == -1) + return -1; + } + + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^arch = [-_[:alnum:]]+$", 0, &str); + if (r == -1) + return -1; + if (r > 0) { + v = find_value (str); + fs->arch = safe_strdup (g, v); + free (str); + } + + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^discnum = [[:digit:]]+$", 0, &str); + if (r == -1) + return -1; + if (r > 0) { + v = find_value (str); + discnum = guestfs___parse_unsigned_int (g, v); + free (str); + if (discnum == -1) + return -1; + } + + r = guestfs___first_egrep_of_file (g, "/.treeinfo", + "^totaldiscs = [[:digit:]]+$", 0, &str); + if (r == -1) + return -1; + if (r > 0) { + v = find_value (str); + totaldiscs = guestfs___parse_unsigned_int (g, v); + free (str); + if (totaldiscs == -1) + return -1; + } + + fs->is_multipart_disk = totaldiscs > 1; + /* and what about discnum? */ + + return 0; +} + +/* Linux with /isolinux/isolinux.cfg. + * + * This file is not easily parsable so we have to do our best. + * Look for the "menu title" line which contains: + * menu title Welcome to Fedora 14! # since at least Fedora 10 + * menu title Welcome to Red Hat Enterprise Linux 6.0! + * menu title Welcome to RHEL6.2-20111117.0-Workstation-x! + */ +static int +check_isolinux_installer_root (guestfs_h *g, struct inspect_fs *fs) +{ + char *str; + int r; + + fs->type = OS_TYPE_LINUX; + + r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", + "^menu title Welcome to Fedora [[:digit:]]+", + 0, &str); + if (r == -1) + return -1; + if (r > 0) { + fs->distro = OS_DISTRO_FEDORA; + fs->major_version = + guestfs___parse_unsigned_int_ignore_trailing (g, &str[29]); + free (str); + if (fs->major_version == -1) + return -1; + } + + /* XXX parse major.minor */ + r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", + "^menu title Welcome to Red Hat Enterprise Linux [[:digit:]]+", + 0, &str); + if (r == -1) + return -1; + if (r > 0) { + fs->distro = OS_DISTRO_RHEL; + fs->major_version = + guestfs___parse_unsigned_int_ignore_trailing (g, &str[47]); + free (str); + if (fs->major_version == -1) + return -1; + } + + /* XXX parse major.minor */ + r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", + "^menu title Welcome to RHEL[[:digit:]]+", + 0, &str); + if (r == -1) + return -1; + if (r > 0) { + fs->distro = OS_DISTRO_RHEL; + fs->major_version = + guestfs___parse_unsigned_int_ignore_trailing (g, &str[26]); + free (str); + if (fs->major_version == -1) + return -1; + } + + return 0; +} + +/* Windows 2003 and similar versions. + * + * NB: txtsetup file contains Windows \r\n line endings, which guestfs_grep + * does not remove. We have to remove them by hand here. + */ +static void +trim_cr (char *str) +{ + size_t n = strlen (str); + if (n > 0 && str[n-1] == '\r') + str[n-1] = '\0'; +} + +static void +trim_quot (char *str) +{ + size_t n = strlen (str); + if (n > 0 && str[n-1] == '"') + str[n-1] = '\0'; +} + +static int +check_w2k3_installer_root (guestfs_h *g, struct inspect_fs *fs, + const char *txtsetup) +{ + char *str; + const char *v; + int r; + + fs->type = OS_TYPE_WINDOWS; + fs->distro = OS_DISTRO_WINDOWS; + + r = guestfs___first_egrep_of_file (g, txtsetup, + "^productname[[:space:]]*=[[:space:]]*\"", 1, &str); + if (r == -1) + return -1; + if (r > 0) { + trim_cr (str); + trim_quot (str); + v = find_value (str); + fs->product_name = safe_strdup (g, v+1); + free (str); + } + + r = guestfs___first_egrep_of_file (g, txtsetup, + "^majorversion[[:space:]]*=[[:space:]]*[[:digit:]]+", + 1, &str); + if (r == -1) + return -1; + if (r > 0) { + trim_cr (str); + v = find_value (str); + fs->major_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); + free (str); + if (fs->major_version == -1) + return -1; + } + + r = guestfs___first_egrep_of_file (g, txtsetup, + "^minorversion[[:space:]]*=[[:space:]]*[[:digit:]]+", + 1, &str); + if (r == -1) + return -1; + if (r > 0) { + trim_cr (str); + v = find_value (str); + fs->minor_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); + free (str); + if (fs->minor_version == -1) + return -1; + } + + /* This is the windows systemroot that would be chosen on + * installation by default, although not necessarily the one that + * the user will finally choose. + */ + r = guestfs___first_egrep_of_file (g, txtsetup, + "^defaultpath[[:space:]]*=[[:space:]]*", + 1, &str); + if (r == -1) + return -1; + if (r > 0) { + trim_cr (str); + v = find_value (str); + fs->windows_systemroot = safe_strdup (g, v); + free (str); + } + + return 0; +} + +/* The currently mounted device is very likely to be an installer. */ +int +guestfs___check_installer_root (guestfs_h *g, struct inspect_fs *fs) +{ + /* The presence of certain files indicates a live CD. + * + * XXX Fedora netinst contains a ~120MB squashfs called + * /images/install.img. However this is not a live CD (unlike the + * Fedora live CDs which contain the same, but larger file). We + * need to unpack this and look inside to tell the difference. + */ + if (guestfs_is_file (g, "/casper/filesystem.squashfs") > 0) + fs->is_live_disk = 1; + + /* Debian/Ubuntu. */ + if (guestfs_is_file (g, "/.disk/info") > 0) { + if (check_debian_installer_root (g, fs) == -1) + return -1; + } + + /* Fedora CDs and DVD (not netinst). */ + else if (guestfs_is_file (g, "/.treeinfo") > 0) { + if (check_fedora_installer_root (g, fs) == -1) + return -1; + } + + /* FreeDOS install CD. */ + else if (guestfs_is_file (g, "/freedos/freedos.ico") > 0 && + guestfs_is_file (g, "/setup.bat") > 0) { + fs->type = OS_TYPE_DOS; + fs->distro = OS_DISTRO_FREEDOS; + fs->arch = safe_strdup (g, "i386"); + } + + /* Linux with /isolinux/isolinux.cfg (note that non-Linux can use + * ISOLINUX too, eg. FreeDOS). + */ + else if (guestfs_is_file (g, "/isolinux/isolinux.cfg") > 0) { + if (check_isolinux_installer_root (g, fs) == -1) + return -1; + } + + /* Windows 2003 64 bit */ + else if (guestfs_is_file (g, "/amd64/txtsetup.sif") > 0) { + fs->arch = safe_strdup (g, "x86_64"); + if (check_w2k3_installer_root (g, fs, "/amd64/txtsetup.sif") == -1) + return -1; + } + + /* Windows 2003 32 bit */ + else if (guestfs_is_file (g, "/i386/txtsetup.sif") > 0) { + fs->arch = safe_strdup (g, "i386"); + if (check_w2k3_installer_root (g, fs, "/i386/txtsetup.sif") == -1) + return -1; + } + + return 0; +} + +#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c new file mode 100644 index 00000000..6d574292 --- /dev/null +++ b/src/inspect-fs-unix.c @@ -0,0 +1,1537 @@ +/* libguestfs + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_HIVEX +#include +#endif + +#include "c-ctype.h" +#include "ignore-value.h" +#include "xstrtol.h" +#include "hash.h" +#include "hash-pjw.h" + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +#if defined(HAVE_HIVEX) + +/* Compile all the regular expressions once when the shared library is + * loaded. PCRE is thread safe so we're supposedly OK here if + * multiple threads call into the libguestfs API functions below + * simultaneously. + */ +static pcre *re_fedora; +static pcre *re_rhel_old; +static pcre *re_rhel; +static pcre *re_rhel_no_minor; +static pcre *re_centos_old; +static pcre *re_centos; +static pcre *re_centos_no_minor; +static pcre *re_scientific_linux_old; +static pcre *re_scientific_linux; +static pcre *re_scientific_linux_no_minor; +static pcre *re_major_minor; +static pcre *re_xdev; +static pcre *re_cciss; +static pcre *re_mdN; +static pcre *re_freebsd; +static pcre *re_diskbyid; +static pcre *re_netbsd; + +static void compile_regexps (void) __attribute__((constructor)); +static void free_regexps (void) __attribute__((destructor)); + +static void +compile_regexps (void) +{ + const char *err; + int offset; + +#define COMPILE(re,pattern,options) \ + do { \ + re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ + if (re == NULL) { \ + ignore_value (write (2, err, strlen (err))); \ + abort (); \ + } \ + } while (0) + + COMPILE (re_fedora, "Fedora release (\\d+)", 0); + COMPILE (re_rhel_old, + "Red Hat.*release (\\d+).*Update (\\d+)", 0); + COMPILE (re_rhel, + "Red Hat.*release (\\d+)\\.(\\d+)", 0); + COMPILE (re_rhel_no_minor, + "Red Hat.*release (\\d+)", 0); + COMPILE (re_centos_old, + "CentOS.*release (\\d+).*Update (\\d+)", 0); + COMPILE (re_centos, + "CentOS.*release (\\d+)\\.(\\d+)", 0); + COMPILE (re_centos_no_minor, + "CentOS.*release (\\d+)", 0); + COMPILE (re_scientific_linux_old, + "Scientific Linux.*release (\\d+).*Update (\\d+)", 0); + COMPILE (re_scientific_linux, + "Scientific Linux.*release (\\d+)\\.(\\d+)", 0); + COMPILE (re_scientific_linux_no_minor, + "Scientific Linux.*release (\\d+)", 0); + COMPILE (re_major_minor, "(\\d+)\\.(\\d+)", 0); + COMPILE (re_xdev, "^/dev/(h|s|v|xv)d([a-z]+)(\\d*)$", 0); + COMPILE (re_cciss, "^/dev/(cciss/c\\d+d\\d+)(?:p(\\d+))?$", 0); + COMPILE (re_mdN, "^(/dev/md\\d+)$", 0); + COMPILE (re_freebsd, "^/dev/ad(\\d+)s(\\d+)([a-z])$", 0); + COMPILE (re_diskbyid, "^/dev/disk/by-id/.*-part(\\d+)$", 0); + COMPILE (re_netbsd, "^NetBSD (\\d+)\\.(\\d+)", 0); +} + +static void +free_regexps (void) +{ + pcre_free (re_fedora); + pcre_free (re_rhel_old); + pcre_free (re_rhel); + pcre_free (re_rhel_no_minor); + pcre_free (re_centos_old); + pcre_free (re_centos); + pcre_free (re_centos_no_minor); + pcre_free (re_scientific_linux_old); + pcre_free (re_scientific_linux); + pcre_free (re_scientific_linux_no_minor); + pcre_free (re_major_minor); + pcre_free (re_xdev); + pcre_free (re_cciss); + pcre_free (re_mdN); + pcre_free (re_freebsd); + pcre_free (re_diskbyid); + pcre_free (re_netbsd); +} + +static void check_architecture (guestfs_h *g, struct inspect_fs *fs); +static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); +static int check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs); +static int check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs); +static int check_fstab (guestfs_h *g, struct inspect_fs *fs); +static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, + const char *spec, const char *mp, + Hash_table *md_map); +static char *resolve_fstab_device (guestfs_h *g, const char *spec, + Hash_table *md_map); +static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); +static int is_partition (guestfs_h *g, const char *partition); + +/* Hash structure for uuid->path lookups */ +typedef struct md_uuid { + uint32_t uuid[4]; + char *path; +} md_uuid; + +static size_t uuid_hash(const void *x, size_t table_size); +static bool uuid_cmp(const void *x, const void *y); +static void md_uuid_free(void *x); + +static int parse_uuid(const char *str, uint32_t *uuid); + +/* Hash structure for path(mdadm)->path(appliance) lookup */ +typedef struct { + char *mdadm; + char *app; +} mdadm_app; + +static size_t mdadm_app_hash(const void *x, size_t table_size); +static bool mdadm_app_cmp(const void *x, const void *y); +static void mdadm_app_free(void *x); + +static ssize_t map_app_md_devices (guestfs_h *g, Hash_table **map); +static int map_md_devices(guestfs_h *g, Hash_table **map); + +/* Set fs->product_name to the first line of the release file. */ +static int +parse_release_file (guestfs_h *g, struct inspect_fs *fs, + const char *release_filename) +{ + fs->product_name = guestfs___first_line_of_file (g, release_filename); + if (fs->product_name == NULL) + return -1; + if (STREQ (fs->product_name, "")) { + free (fs->product_name); + fs->product_name = NULL; + error (g, _("release file %s is empty or malformed"), release_filename); + return -1; + } + return 0; +} + +/* Ubuntu has /etc/lsb-release containing: + * DISTRIB_ID=Ubuntu # Distro + * DISTRIB_RELEASE=10.04 # Version + * DISTRIB_CODENAME=lucid + * DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" # Product name + * + * [Ubuntu-derived ...] Linux Mint was found to have this: + * DISTRIB_ID=LinuxMint + * DISTRIB_RELEASE=10 + * DISTRIB_CODENAME=julia + * DISTRIB_DESCRIPTION="Linux Mint 10 Julia" + * Linux Mint also has /etc/linuxmint/info with more information, + * but we can use the LSB file. + * + * Mandriva has: + * LSB_VERSION=lsb-4.0-amd64:lsb-4.0-noarch + * DISTRIB_ID=MandrivaLinux + * DISTRIB_RELEASE=2010.1 + * DISTRIB_CODENAME=Henry_Farman + * DISTRIB_DESCRIPTION="Mandriva Linux 2010.1" + * Mandriva also has a normal release file called /etc/mandriva-release. + */ +static int +parse_lsb_release (guestfs_h *g, struct inspect_fs *fs) +{ + const char *filename = "/etc/lsb-release"; + int64_t size; + char **lines; + size_t i; + int r = 0; + + /* Don't trust guestfs_head_n not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1; + } + + lines = guestfs_head_n (g, 10, filename); + if (lines == NULL) + return -1; + + for (i = 0; lines[i] != NULL; ++i) { + if (fs->distro == 0 && + STREQ (lines[i], "DISTRIB_ID=Ubuntu")) { + fs->distro = OS_DISTRO_UBUNTU; + r = 1; + } + else if (fs->distro == 0 && + STREQ (lines[i], "DISTRIB_ID=LinuxMint")) { + fs->distro = OS_DISTRO_LINUX_MINT; + r = 1; + } + else if (fs->distro == 0 && + STREQ (lines[i], "DISTRIB_ID=MandrivaLinux")) { + fs->distro = OS_DISTRO_MANDRIVA; + r = 1; + } + else if (fs->distro == 0 && + STREQ (lines[i], "DISTRIB_ID=\"Mageia\"")) { + fs->distro = OS_DISTRO_MAGEIA; + r = 1; + } + else if (STRPREFIX (lines[i], "DISTRIB_RELEASE=")) { + char *major, *minor; + if (match2 (g, &lines[i][16], re_major_minor, &major, &minor)) { + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + guestfs___free_string_list (lines); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) { + guestfs___free_string_list (lines); + return -1; + } + } + } + else if (fs->product_name == NULL && + (STRPREFIX (lines[i], "DISTRIB_DESCRIPTION=\"") || + STRPREFIX (lines[i], "DISTRIB_DESCRIPTION='"))) { + size_t len = strlen (lines[i]) - 21 - 1; + fs->product_name = safe_strndup (g, &lines[i][21], len); + r = 1; + } + else if (fs->product_name == NULL && + STRPREFIX (lines[i], "DISTRIB_DESCRIPTION=")) { + size_t len = strlen (lines[i]) - 20; + fs->product_name = safe_strndup (g, &lines[i][20], len); + r = 1; + } + } + + guestfs___free_string_list (lines); + + /* The unnecessary construct in the next line is required to + * workaround -Wstrict-overflow warning in gcc 4.5.1. + */ + return r ? 1 : 0; +} + +/* The currently mounted device is known to be a Linux root. Try to + * determine from this the distro, version, etc. Also parse + * /etc/fstab to determine the arrangement of mountpoints and + * associated devices. + */ +int +guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs) +{ + int r; + + fs->type = OS_TYPE_LINUX; + + if (guestfs_exists (g, "/etc/lsb-release") > 0) { + r = parse_lsb_release (g, fs); + if (r == -1) /* error */ + return -1; + if (r == 1) /* ok - detected the release from this file */ + goto skip_release_checks; + } + + if (guestfs_exists (g, "/etc/redhat-release") > 0) { + fs->distro = OS_DISTRO_REDHAT_BASED; /* Something generic Red Hat-like. */ + + if (parse_release_file (g, fs, "/etc/redhat-release") == -1) + return -1; + + char *major, *minor; + if ((major = match1 (g, fs->product_name, re_fedora)) != NULL) { + fs->distro = OS_DISTRO_FEDORA; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) + return -1; + } + else if (match2 (g, fs->product_name, re_rhel_old, &major, &minor) || + match2 (g, fs->product_name, re_rhel, &major, &minor)) { + fs->distro = OS_DISTRO_RHEL; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) + return -1; + } + else if ((major = match1 (g, fs->product_name, re_rhel_no_minor)) != NULL) { + fs->distro = OS_DISTRO_RHEL; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) + return -1; + fs->minor_version = 0; + } + else if (match2 (g, fs->product_name, re_centos_old, &major, &minor) || + match2 (g, fs->product_name, re_centos, &major, &minor)) { + fs->distro = OS_DISTRO_CENTOS; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) + return -1; + } + else if ((major = match1 (g, fs->product_name, re_centos_no_minor)) != NULL) { + fs->distro = OS_DISTRO_CENTOS; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) + return -1; + fs->minor_version = 0; + } + else if (match2 (g, fs->product_name, re_scientific_linux_old, &major, &minor) || + match2 (g, fs->product_name, re_scientific_linux, &major, &minor)) { + fs->distro = OS_DISTRO_SCIENTIFIC_LINUX; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) + return -1; + } + else if ((major = match1 (g, fs->product_name, re_scientific_linux_no_minor)) != NULL) { + fs->distro = OS_DISTRO_SCIENTIFIC_LINUX; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) + return -1; + fs->minor_version = 0; + } + } + else if (guestfs_exists (g, "/etc/debian_version") > 0) { + fs->distro = OS_DISTRO_DEBIAN; + + if (parse_release_file (g, fs, "/etc/debian_version") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/pardus-release") > 0) { + fs->distro = OS_DISTRO_PARDUS; + + if (parse_release_file (g, fs, "/etc/pardus-release") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/arch-release") > 0) { + fs->distro = OS_DISTRO_ARCHLINUX; + + /* /etc/arch-release file is empty and I can't see a way to + * determine the actual release or product string. + */ + } + else if (guestfs_exists (g, "/etc/gentoo-release") > 0) { + fs->distro = OS_DISTRO_GENTOO; + + if (parse_release_file (g, fs, "/etc/gentoo-release") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/meego-release") > 0) { + fs->distro = OS_DISTRO_MEEGO; + + if (parse_release_file (g, fs, "/etc/meego-release") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/slackware-version") > 0) { + fs->distro = OS_DISTRO_SLACKWARE; + + if (parse_release_file (g, fs, "/etc/slackware-version") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/ttylinux-target") > 0) { + fs->distro = OS_DISTRO_TTYLINUX; + + if (parse_release_file (g, fs, "/etc/ttylinux-target") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + else if (guestfs_exists (g, "/etc/SuSE-release") > 0) { + fs->distro = OS_DISTRO_OPENSUSE; + + if (parse_release_file (g, fs, "/etc/SuSE-release") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + /* Buildroot (http://buildroot.net) is an embedded Linux distro + * toolkit. It is used by specific distros such as Cirros. + */ + else if (guestfs_exists (g, "/etc/br-version") > 0) { + if (guestfs_exists (g, "/usr/share/cirros/logo") > 0) + fs->distro = OS_DISTRO_CIRROS; + else + fs->distro = OS_DISTRO_BUILDROOT; + + /* /etc/br-version has the format YYYY.MM[-git/hg/svn release] */ + if (parse_release_file (g, fs, "/etc/br-version") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + + skip_release_checks:; + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* We already know /etc/fstab exists because it's part of the test + * for Linux root above. We must now parse this file to determine + * which filesystems are used by the operating system and how they + * are mounted. + */ + const char *configfiles[] = { "/etc/fstab", "/etc/mdadm.conf", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + +/* The currently mounted device is known to be a FreeBSD root. */ +int +guestfs___check_freebsd_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type = OS_TYPE_FREEBSD; + + /* FreeBSD has no authoritative version file. The version number is + * in /etc/motd, which the system administrator might edit, but + * we'll use that anyway. + */ + + if (guestfs_exists (g, "/etc/motd") > 0) { + if (parse_release_file (g, fs, "/etc/motd") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* We already know /etc/fstab exists because it's part of the test above. */ + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + +/* The currently mounted device is maybe to be a *BSD root. */ +int +guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) +{ + + if (guestfs_exists (g, "/etc/release") > 0) { + char *major, *minor; + if (parse_release_file (g, fs, "/etc/release") == -1) + return -1; + + if (match2 (g, fs->product_name, re_netbsd, &major, &minor)) { + fs->type = OS_TYPE_NETBSD; + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) + return -1; + } + } else { + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* We already know /etc/fstab exists because it's part of the test above. */ + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + +/* The currently mounted device may be a Hurd root. Hurd has distros + * just like Linux. + */ +int +guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type = OS_TYPE_HURD; + + if (guestfs_exists (g, "/etc/debian_version") > 0) { + fs->distro = OS_DISTRO_DEBIAN; + + if (parse_release_file (g, fs, "/etc/debian_version") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } + + /* Arch Hurd also exists, but inconveniently it doesn't have + * the normal /etc/arch-release file. XXX + */ + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* XXX Check for /etc/fstab. */ + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + +static void +check_architecture (guestfs_h *g, struct inspect_fs *fs) +{ + const char *binaries[] = + { "/bin/bash", "/bin/ls", "/bin/echo", "/bin/rm", "/bin/sh" }; + size_t i; + + for (i = 0; i < sizeof binaries / sizeof binaries[0]; ++i) { + if (guestfs_is_file (g, binaries[i]) > 0) { + /* Ignore errors from file_architecture call. */ + guestfs_error_handler_cb old_error_cb = g->error_cb; + g->error_cb = NULL; + char *arch = guestfs_file_architecture (g, binaries[i]); + g->error_cb = old_error_cb; + + if (arch) { + /* String will be owned by handle, freed by + * guestfs___free_inspect_info. + */ + fs->arch = arch; + break; + } + } + } +} + +/* Try several methods to determine the hostname from a Linux or + * FreeBSD guest. Note that type and distro have been set, so we can + * use that information to direct the search. + */ +static int +check_hostname_unix (guestfs_h *g, struct inspect_fs *fs) +{ + switch (fs->type) { + case OS_TYPE_LINUX: + case OS_TYPE_HURD: + /* Red Hat-derived would be in /etc/sysconfig/network, and + * Debian-derived in the file /etc/hostname. Very old Debian and + * SUSE use /etc/HOSTNAME. It's best to just look for each of + * these files in turn, rather than try anything clever based on + * distro. + */ + if (guestfs_is_file (g, "/etc/HOSTNAME")) { + fs->hostname = guestfs___first_line_of_file (g, "/etc/HOSTNAME"); + if (fs->hostname == NULL) + return -1; + if (STREQ (fs->hostname, "")) { + free (fs->hostname); + fs->hostname = NULL; + } + } + + if (!fs->hostname && guestfs_is_file (g, "/etc/hostname")) { + fs->hostname = guestfs___first_line_of_file (g, "/etc/hostname"); + if (fs->hostname == NULL) + return -1; + if (STREQ (fs->hostname, "")) { + free (fs->hostname); + fs->hostname = NULL; + } + } + + if (!fs->hostname && guestfs_is_file (g, "/etc/sysconfig/network")) { + const char *configfiles[] = { "/etc/sysconfig/network", NULL }; + if (inspect_with_augeas (g, fs, configfiles, + check_hostname_redhat) == -1) + return -1; + } + break; + + case OS_TYPE_FREEBSD: + case OS_TYPE_NETBSD: + /* /etc/rc.conf contains the hostname, but there is no Augeas lens + * for this file. + */ + if (guestfs_is_file (g, "/etc/rc.conf")) { + if (check_hostname_freebsd (g, fs) == -1) + return -1; + } + break; + + case OS_TYPE_WINDOWS: /* not here, see check_windows_system_registry */ + case OS_TYPE_DOS: + case OS_TYPE_UNKNOWN: + default: + /* nothing, keep GCC warnings happy */; + } + + return 0; +} + +/* Parse the hostname from /etc/sysconfig/network. This must be called + * from the inspect_with_augeas wrapper. + */ +static int +check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs) +{ + char *hostname; + + /* Errors here are not fatal (RHBZ#726739), since it could be + * just missing HOSTNAME field in the file. + */ + guestfs_error_handler_cb old_error_cb = g->error_cb; + g->error_cb = NULL; + hostname = guestfs_aug_get (g, "/files/etc/sysconfig/network/HOSTNAME"); + g->error_cb = old_error_cb; + + /* This is freed by guestfs___free_inspect_info. Note that hostname + * could be NULL because we ignored errors above. + */ + fs->hostname = hostname; + return 0; +} + +/* Parse the hostname from /etc/rc.conf. On FreeBSD this file + * contains comments, blank lines and: + * hostname="freebsd8.example.com" + * ifconfig_re0="DHCP" + * keymap="uk.iso" + * sshd_enable="YES" + */ +static int +check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs) +{ + const char *filename = "/etc/rc.conf"; + int64_t size; + char **lines; + size_t i; + + /* Don't trust guestfs_read_lines not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1; + } + + lines = guestfs_read_lines (g, filename); + if (lines == NULL) + return -1; + + for (i = 0; lines[i] != NULL; ++i) { + if (STRPREFIX (lines[i], "hostname=\"") || + STRPREFIX (lines[i], "hostname='")) { + size_t len = strlen (lines[i]) - 10 - 1; + fs->hostname = safe_strndup (g, &lines[i][10], len); + break; + } else if (STRPREFIX (lines[i], "hostname=")) { + size_t len = strlen (lines[i]) - 9; + fs->hostname = safe_strndup (g, &lines[i][9], len); + break; + } + } + + guestfs___free_string_list (lines); + return 0; +} + +static int +check_fstab (guestfs_h *g, struct inspect_fs *fs) +{ + char **entries, **entry; + char augpath[256]; + char *spec, *mp; + int r; + + /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device + * paths in the guestfs appliance */ + Hash_table *md_map; + if (map_md_devices (g, &md_map) == -1) return -1; + + entries = guestfs_aug_match (g, "/files/etc/fstab/*[label() != '#comment']"); + if (entries == NULL) goto error; + + if (entries[0] == NULL) { + error (g, _("could not parse /etc/fstab or empty file")); + goto error; + } + + for (entry = entries; *entry != NULL; entry++) { + snprintf (augpath, sizeof augpath, "%s/spec", *entry); + spec = guestfs_aug_get (g, augpath); + if (spec == NULL) goto error; + + snprintf (augpath, sizeof augpath, "%s/file", *entry); + mp = guestfs_aug_get (g, augpath); + if (mp == NULL) { + free (spec); + goto error; + } + + r = add_fstab_entry (g, fs, spec, mp, md_map); + free (spec); + free (mp); + + if (r == -1) goto error; + } + + if (md_map) hash_free (md_map); + guestfs___free_string_list (entries); + return 0; + +error: + if (md_map) hash_free (md_map); + if (entries) guestfs___free_string_list (entries); + return -1; +} + +/* Add a filesystem and possibly a mountpoint entry for + * the root filesystem 'fs'. + * + * 'spec' is the fstab spec field, which might be a device name or a + * pseudodevice or 'UUID=...' or 'LABEL=...'. + * + * 'mp' is the mount point, which could also be 'swap' or 'none'. + */ +static int +add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, + const char *spec, const char *mp, Hash_table *md_map) +{ + /* Ignore certain mountpoints. */ + if (STRPREFIX (mp, "/dev/") || + STREQ (mp, "/dev") || + STRPREFIX (mp, "/media/") || + STRPREFIX (mp, "/proc/") || + STREQ (mp, "/proc") || + STRPREFIX (mp, "/selinux/") || + STREQ (mp, "/selinux") || + STRPREFIX (mp, "/sys/") || + STREQ (mp, "/sys")) + return 0; + + /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives. */ + if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) || + STREQ (spec, "/dev/floppy") || + STREQ (spec, "/dev/cdrom")) + return 0; + + /* Resolve UUID= and LABEL= to the actual device. */ + char *device = NULL; + if (STRPREFIX (spec, "UUID=")) + device = guestfs_findfs_uuid (g, &spec[5]); + else if (STRPREFIX (spec, "LABEL=")) + device = guestfs_findfs_label (g, &spec[6]); + /* Ignore "/.swap" (Pardus) and pseudo-devices like "tmpfs". */ + else if (STREQ (spec, "/dev/root")) + /* Resolve /dev/root to the current device. */ + device = safe_strdup (g, fs->device); + else if (STRPREFIX (spec, "/dev/")) + /* Resolve guest block device names. */ + device = resolve_fstab_device (g, spec, md_map); + + /* If we haven't resolved the device successfully by this point, + * we don't care, just ignore it. + */ + if (device == NULL) + return 0; + + char *mountpoint = safe_strdup (g, mp); + + /* Add this to the fstab entry in 'fs'. + * Note these are further filtered by guestfs_inspect_get_mountpoints + * and guestfs_inspect_get_filesystems. + */ + size_t n = fs->nr_fstab + 1; + struct inspect_fstab_entry *p; + + p = realloc (fs->fstab, n * sizeof (struct inspect_fstab_entry)); + if (p == NULL) { + perrorf (g, "realloc"); + free (device); + free (mountpoint); + return -1; + } + + fs->fstab = p; + fs->nr_fstab = n; + + /* These are owned by the handle and freed by guestfs___free_inspect_info. */ + fs->fstab[n-1].device = device; + fs->fstab[n-1].mountpoint = mountpoint; + + debug (g, "fstab: device=%s mountpoint=%s", device, mountpoint); + + return 0; +} + +/* Compute a uuid hash as a simple xor of of its 4 32bit components */ +static size_t +uuid_hash(const void *x, size_t table_size) +{ + const md_uuid *a = x; + + size_t h = a->uuid[0]; + for (size_t i = 1; i < 4; i++) { + h ^= a->uuid[i]; + } + + return h % table_size; +} + +static bool +uuid_cmp(const void *x, const void *y) +{ + const md_uuid *a = x; + const md_uuid *b = y; + + for (size_t i = 0; i < 1; i++) { + if (a->uuid[i] != b->uuid[i]) return 0; + } + + return 1; +} + +static void +md_uuid_free(void *x) +{ + md_uuid *a = x; + free(a->path); + free(a); +} + +/* Taken from parse_uuid in mdadm */ +static int +parse_uuid (const char *str, uint32_t *uuid) +{ + size_t hit = 0; /* number of Hex digIT */ + char c; + size_t i; + int n; + + for (i = 0; i < 4; i++) + uuid[i] = 0; + + while ((c = *str++)) { + if (c >= '0' && c <= '9') + n = c - '0'; + else if (c >= 'a' && c <= 'f') + n = 10 + c - 'a'; + else if (c >= 'A' && c <= 'F') + n = 10 + c - 'A'; + else if (strchr (":. -", c)) + continue; + else + return -1; + + if (hit < 32) { + uuid[hit / 8] <<= 4; + uuid[hit / 8] += n; + } + hit++; + } + if (hit == 32) return 0; + + return -1; +} + +/* Create a mapping of uuids to appliance md device names */ +static ssize_t +map_app_md_devices (guestfs_h *g, Hash_table **map) +{ + char **mds = NULL; + size_t n = 0; + + /* A hash mapping uuids to md device names */ + *map = hash_initialize(16, NULL, uuid_hash, uuid_cmp, md_uuid_free); + if (*map == NULL) g->abort_cb(); + + mds = guestfs_list_md_devices(g); + if (mds == NULL) goto error; + + for (char **md = mds; *md != NULL; md++) { + char **detail = guestfs_md_detail(g, *md); + if (detail == NULL) goto error; + + /* Iterate over keys until we find uuid */ + char **i; + for (i = detail; *i != NULL; i += 2) { + if (STREQ(*i, "uuid")) break; + } + + /* We found it */ + if (*i) { + /* Next item is the uuid value */ + i++; + + md_uuid *entry = safe_malloc(g, sizeof(md_uuid)); + entry->path = safe_strdup(g, *md); + + if (parse_uuid(*i, entry->uuid) == -1) { + /* Invalid UUID is weird, but not fatal. */ + debug(g, "inspect-os: guestfs_md_detail returned invalid " + "uuid for %s: %s", *md, *i); + guestfs___free_string_list(detail); + md_uuid_free(entry); + continue; + } + + const void *matched = NULL; + switch (hash_insert_if_absent(*map, entry, &matched)) { + case -1: + g->abort_cb(); + + case 0: + /* Duplicate uuid in for md device is weird, but not fatal. */ + debug(g, "inspect-os: md devices %s and %s have the same uuid", + ((md_uuid *)matched)->path, entry->path); + md_uuid_free(entry); + break; + + default: + n++; + } + } + + guestfs___free_string_list(detail); + } + + guestfs___free_string_list(mds); + + return n; + +error: + hash_free(*map); *map = NULL; + guestfs___free_string_list(mds); + + return -1; +} + +static size_t +mdadm_app_hash(const void *x, size_t table_size) +{ + const mdadm_app *a = x; + return hash_pjw(a->mdadm, table_size); +} + +static bool +mdadm_app_cmp(const void *x, const void *y) +{ + const mdadm_app *a = x; + const mdadm_app *b = y; + + return strcmp(a->mdadm, b->mdadm) == 0; +} + +static void +mdadm_app_free(void *x) +{ + mdadm_app *a = x; + free(a->mdadm); + free(a->app); + free(a); +} + +/* Get a map of md device names in mdadm.conf to their device names in the + * appliance */ +static int +map_md_devices(guestfs_h *g, Hash_table **map) +{ + Hash_table *app_map = NULL; + char **matches = NULL; + ssize_t n_app_md_devices; + + *map = NULL; + + /* Get a map of md device uuids to their device names in the appliance */ + n_app_md_devices = map_app_md_devices (g, &app_map); + if (n_app_md_devices == -1) goto error; + + /* Nothing to do if there are no md devices */ + if (n_app_md_devices == 0) { + hash_free(app_map); + return 0; + } + + /* Get all arrays listed in mdadm.conf */ + matches = guestfs_aug_match(g, "/files/etc/mdadm.conf/array"); + if (!matches) goto error; + + /* Log a debug message if we've got md devices, but nothing in mdadm.conf */ + if (matches[0] == NULL) { + debug(g, "Appliance has MD devices, but augeas returned no array matches " + "in mdadm.conf"); + guestfs___free_string_list(matches); + hash_free(app_map); + return 0; + } + + *map = hash_initialize(16, NULL, mdadm_app_hash, mdadm_app_cmp, + mdadm_app_free); + if (!*map) g->abort_cb(); + + for (char **match = matches; *match != NULL; match++) { + /* Get device name and uuid for each array */ + char *dev_path = safe_asprintf(g, "%s/devicename", *match); + char *dev = guestfs_aug_get(g, dev_path); + free(dev_path); + if (!dev) goto error; + + char *uuid_path = safe_asprintf(g, "%s/uuid", *match); + char *uuid = guestfs_aug_get(g, uuid_path); + free(uuid_path); + if (!uuid) { + free(dev); + continue; + } + + /* Parse the uuid into an md_uuid structure so we can look it up in the + * uuid->appliance device map */ + md_uuid mdadm; + mdadm.path = dev; + if (parse_uuid(uuid, mdadm.uuid) == -1) { + /* Invalid uuid. Weird, but not fatal. */ + debug(g, "inspect-os: mdadm.conf contains invalid uuid for %s: %s", + dev, uuid); + free(dev); + free(uuid); + continue; + } + free(uuid); + + /* If there's a corresponding uuid in the appliance, create a new + * entry in the transitive map */ + md_uuid *app = hash_lookup(app_map, &mdadm); + if (app) { + mdadm_app *entry = safe_malloc(g, sizeof(mdadm_app)); + entry->mdadm = dev; + entry->app = safe_strdup(g, app->path); + + switch (hash_insert_if_absent(*map, entry, NULL)) { + case -1: + g->abort_cb(); + + case 0: + /* Duplicate uuid in for md device is weird, but not fatal. */ + debug(g, "inspect-os: mdadm.conf contains multiple entries for %s", + app->path); + mdadm_app_free(entry); + continue; + + default: + ;; + } + } else { + free(dev); + } + } + + hash_free(app_map); + guestfs___free_string_list(matches); + + return 0; + +error: + if (app_map) hash_free(app_map); + if (matches) guestfs___free_string_list(matches); + if (*map) hash_free(*map); + + return -1; +} + +static int +resolve_fstab_device_xdev (guestfs_h *g, const char *type, const char *disk, + const char *part, char **device_ret) +{ + char *name, *device; + char **devices; + size_t i, count; + struct drive *drive; + const char *p; + + /* type: (h|s|v|xv) + * disk: ([a-z]+) + * part: (\d*) + */ + + devices = guestfs_list_devices (g); + if (devices == NULL) + return -1; + + /* Check any hints we were passed for a non-heuristic mapping */ + name = safe_asprintf (g, "%sd%s", type, disk); + i = 0; + drive = g->drives; + while (drive) { + if (drive->name && STREQ (drive->name, name)) { + device = safe_asprintf (g, "%s%s", devices[i], part); + if (!is_partition (g, device)) { + free (device); + goto out; + } + *device_ret = device; + break; + } + + i++; drive = drive->next; + } + free (name); + + /* Guess the appliance device name if we didn't find a matching hint */ + if (!*device_ret) { + /* Count how many disks the libguestfs appliance has */ + for (count = 0; devices[count] != NULL; count++) + ; + + /* Calculate the numerical index of the disk */ + i = disk[0] - 'a'; + for (p = disk + 1; *p != '\0'; p++) { + i += 1; i *= 26; + i += *p - 'a'; + } + + /* Check the index makes sense wrt the number of disks the appliance has. + * If it does, map it to an appliance disk. + */ + if (i < count) { + device = safe_asprintf (g, "%s%s", devices[i], part); + if (!is_partition (g, device)) { + free (device); + goto out; + } + *device_ret = device; + } + } + + out: + guestfs___free_string_list (devices); + return 0; +} + +static int +resolve_fstab_device_cciss (guestfs_h *g, const char *disk, const char *part, + char **device_ret) +{ + char *device; + char **devices; + size_t i; + struct drive *drive; + + /* disk: (cciss/c\d+d\d+) + * part: (\d+)? + */ + + devices = guestfs_list_devices (g); + if (devices == NULL) + return -1; + + /* Check any hints we were passed for a non-heuristic mapping */ + i = 0; + drive = g->drives; + while (drive) { + if (drive->name && STREQ(drive->name, disk)) { + if (part) { + device = safe_asprintf (g, "%s%s", devices[i], part); + if (!is_partition (g, device)) { + free (device); + goto out; + } + *device_ret = device; + } + else + *device_ret = safe_strdup (g, devices[i]); + break; + } + + i++; drive = drive->next; + } + + /* We don't try to guess mappings for cciss devices */ + + out: + guestfs___free_string_list (devices); + return 0; +} + +static int +resolve_fstab_device_diskbyid (guestfs_h *g, const char *part, + char **device_ret) +{ + int nr_devices; + char *device; + + /* For /dev/disk/by-id there is a limit to what we can do because + * original SCSI ID information has likely been lost. This + * heuristic will only work for guests that have a single block + * device. + * + * So the main task here is to make sure the assumptions above are + * true. + * + * XXX Use hints from virt-p2v if available. + * See also: https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3 + */ + + nr_devices = guestfs_nr_devices (g); + if (nr_devices == -1) + return -1; + + /* If #devices isn't 1, give up trying to translate this fstab entry. */ + if (nr_devices != 1) + return 0; + + /* Make the partition name and check it exists. */ + device = safe_asprintf (g, "/dev/sda%s", part); + if (!is_partition (g, device)) { + free (device); + return 0; + } + + *device_ret = device; + return 0; +} + +/* Resolve block device name to the libguestfs device name, eg. + * /dev/xvdb1 => /dev/vdb1; and /dev/mapper/VG-LV => /dev/VG/LV. This + * assumes that disks were added in the same order as they appear to + * the real VM, which is a reasonable assumption to make. Return + * anything we don't recognize unchanged. + */ +static char * +resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) +{ + char *device = NULL; + char *type, *slice, *disk, *part; + int r; + + if (STRPREFIX (spec, "/dev/mapper/") && guestfs_exists (g, spec) > 0) { + /* LVM2 does some strange munging on /dev/mapper paths for VGs and + * LVs which contain '-' character: + * + * > lvcreate LV--test VG--test 32 + * > debug ls /dev/mapper + * VG----test-LV----test + * + * This makes it impossible to reverse those paths directly, so + * we have implemented lvm_canonical_lv_name in the daemon. + */ + device = guestfs_lvm_canonical_lv_name (g, spec); + } + else if (match3 (g, spec, re_xdev, &type, &disk, &part)) { + r = resolve_fstab_device_xdev (g, type, disk, part, &device); + free (type); + free (disk); + free (part); + if (r == -1) + return NULL; + } + else if (match2 (g, spec, re_cciss, &disk, &part)) { + r = resolve_fstab_device_cciss (g, disk, part, &device); + free (disk); + free (part); + if (r == -1) + return NULL; + } + else if (md_map && (disk = match1 (g, spec, re_mdN)) != NULL) { + mdadm_app entry; + entry.mdadm = disk; + + mdadm_app *app = hash_lookup (md_map, &entry); + if (app) device = safe_strdup (g, app->app); + + free(disk); + } + else if (match3 (g, spec, re_freebsd, &disk, &slice, &part)) { + /* FreeBSD disks are organized quite differently. See: + * http://www.freebsd.org/doc/handbook/disk-organization.html + * FreeBSD "partitions" are exposed as quasi-extended partitions + * numbered from 5 in Linux. I have no idea what happens when you + * have multiple "slices" (the FreeBSD term for MBR partitions). + */ + int disk_i = guestfs___parse_unsigned_int (g, disk); + int slice_i = guestfs___parse_unsigned_int (g, slice); + int part_i = part[0] - 'a' /* counting from 0 */; + free (disk); + free (slice); + free (part); + + if (disk_i != -1 && disk_i <= 26 && + slice_i > 0 && slice_i <= 1 /* > 4 .. see comment above */ && + part_i >= 0 && part_i < 26) { + device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); + } + } + else if ((part = match1 (g, spec, re_diskbyid)) != NULL) { + r = resolve_fstab_device_diskbyid (g, part, &device); + free (part); + if (r == -1) + return NULL; + } + + /* Didn't match device pattern, return original spec unchanged. */ + if (device == NULL) + device = safe_strdup (g, spec); + + return device; +} + +/* Call 'f' with Augeas opened and having parsed 'filename' (this file + * must exist). As a security measure, this bails if the file is too + * large for a reasonable configuration file. After the call to 'f' + * Augeas is closed. + */ +static int +inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, + const char **configfiles, + int (*f) (guestfs_h *, struct inspect_fs *)) +{ + /* Security: Refuse to do this if a config file is too large. */ + for (const char **i = configfiles; *i != NULL; i++) { + if (guestfs_exists(g, *i) == 0) continue; + + int64_t size = guestfs_filesize (g, *i); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_AUGEAS_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + *i, size); + return -1; + } + } + + /* If !feature_available (g, "augeas") then the next call will fail. + * Arguably we might want to fall back to a non-Augeas method in + * this case. + */ + if (guestfs_aug_init (g, "/", 16|32) == -1) + return -1; + + int r = -1; + + /* Tell Augeas to only load one file (thanks RaphaĆ«l Pinson). */ +#define AUGEAS_LOAD "/augeas/load//incl[. != \"" +#define AUGEAS_LOAD_LEN (strlen(AUGEAS_LOAD)) + size_t conflen = strlen(configfiles[0]); + size_t buflen = AUGEAS_LOAD_LEN + conflen + 1 /* Closing " */; + char *buf = safe_malloc(g, buflen + 2 /* Closing ] + null terminator */); + + memcpy(buf, AUGEAS_LOAD, AUGEAS_LOAD_LEN); + memcpy(buf + AUGEAS_LOAD_LEN, configfiles[0], conflen); + buf[buflen - 1] = '"'; +#undef AUGEAS_LOAD_LEN +#undef AUGEAS_LOAD + +#define EXCL " and . != \"" +#define EXCL_LEN (strlen(EXCL)) + for (const char **i = &configfiles[1]; *i != NULL; i++) { + size_t orig_buflen = buflen; + conflen = strlen(*i); + buflen += EXCL_LEN + conflen + 1 /* Closing " */; + buf = safe_realloc(g, buf, buflen + 2 /* Closing ] + null terminator */); + char *s = buf + orig_buflen; + + memcpy(s, EXCL, EXCL_LEN); + memcpy(s + EXCL_LEN, *i, conflen); + buf[buflen - 1] = '"'; + } +#undef EXCL_LEN +#undef EXCL + + buf[buflen] = ']'; + buf[buflen + 1] = '\0'; + + if (guestfs_aug_rm (g, buf) == -1) { + free(buf); + goto out; + } + free(buf); + + if (guestfs_aug_load (g) == -1) + goto out; + + r = f (g, fs); + + out: + guestfs_aug_close (g); + + return r; +} + +static int +is_partition (guestfs_h *g, const char *partition) +{ + char *device; + guestfs_error_handler_cb old_error_cb; + + old_error_cb = g->error_cb; + g->error_cb = NULL; + + if ((device = guestfs_part_to_dev (g, partition)) == NULL) { + g->error_cb = old_error_cb; + return 0; + } + + if (guestfs_device_index (g, device) == -1) { + g->error_cb = old_error_cb; + free (device); + return 0; + } + + g->error_cb = old_error_cb; + free (device); + + return 1; +} + +#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c new file mode 100644 index 00000000..1a341927 --- /dev/null +++ b/src/inspect-fs-windows.c @@ -0,0 +1,586 @@ +/* libguestfs + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_HIVEX +#include +#endif + +#include "c-ctype.h" +#include "ignore-value.h" +#include "xstrtol.h" + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +#if defined(HAVE_HIVEX) + +/* Compile all the regular expressions once when the shared library is + * loaded. PCRE is thread safe so we're supposedly OK here if + * multiple threads call into the libguestfs API functions below + * simultaneously. + */ +static pcre *re_windows_version; + +static void compile_regexps (void) __attribute__((constructor)); +static void free_regexps (void) __attribute__((destructor)); + +static void +compile_regexps (void) +{ + const char *err; + int offset; + +#define COMPILE(re,pattern,options) \ + do { \ + re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ + if (re == NULL) { \ + ignore_value (write (2, err, strlen (err))); \ + abort (); \ + } \ + } while (0) + + COMPILE (re_windows_version, "^(\\d+)\\.(\\d+)", 0); +} + +static void +free_regexps (void) +{ + pcre_free (re_windows_version); +} + +static int check_windows_arch (guestfs_h *g, struct inspect_fs *fs); +static int check_windows_software_registry (guestfs_h *g, struct inspect_fs *fs); +static int check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs); +static char *map_registry_disk_blob (guestfs_h *g, const char *blob); + +/* XXX Handling of boot.ini in the Perl version was pretty broken. It + * essentially didn't do anything for modern Windows guests. + * Therefore I've omitted all that code. + */ + +/* Try to find Windows systemroot using some common locations. + * + * Notes: + * + * (1) We check for some directories inside to see if it is a real + * systemroot, and not just a directory that happens to have the same + * name. + * + * (2) If a Windows guest has multiple disks and applications are + * installed on those other disks, then those other disks will contain + * "/Program Files" and "/System Volume Information". Those would + * *not* be Windows root disks. (RHBZ#674130) + */ +static const char *systemroots[] = + { "/windows", "/winnt", "/win32", "/win", NULL }; + +int +guestfs___has_windows_systemroot (guestfs_h *g) +{ + size_t i; + char *systemroot; + char path[256]; + + for (i = 0; i < sizeof systemroots / sizeof systemroots[0]; ++i) { + systemroot = guestfs___case_sensitive_path_silently (g, systemroots[i]); + if (!systemroot) + continue; + + snprintf (path, sizeof path, "%s/system32", systemroot); + if (!guestfs___is_dir_nocase (g, path)) { + free (systemroot); + continue; + } + + snprintf (path, sizeof path, "%s/system32/config", systemroot); + if (!guestfs___is_dir_nocase (g, path)) { + free (systemroot); + continue; + } + + snprintf (path, sizeof path, "%s/system32/cmd.exe", systemroot); + if (!guestfs___is_file_nocase (g, path)) { + free (systemroot); + continue; + } + + free (systemroot); + + return (int)i; + } + + return -1; /* not found */ +} + +int +guestfs___check_windows_root (guestfs_h *g, struct inspect_fs *fs) +{ + int i; + char *systemroot; + + fs->type = OS_TYPE_WINDOWS; + fs->distro = OS_DISTRO_WINDOWS; + + i = guestfs___has_windows_systemroot (g); + if (i == -1) { + error (g, "check_windows_root: has_windows_systemroot unexpectedly returned -1"); + return -1; + } + + systemroot = guestfs___case_sensitive_path_silently (g, systemroots[i]); + if (!systemroot) { + error (g, _("cannot resolve Windows %%SYSTEMROOT%%")); + return -1; + } + + debug (g, "windows %%SYSTEMROOT%% = %s", systemroot); + + /* Freed by guestfs___free_inspect_info. */ + fs->windows_systemroot = systemroot; + + if (check_windows_arch (g, fs) == -1) + return -1; + + /* Product name and version. */ + if (check_windows_software_registry (g, fs) == -1) + return -1; + + /* Hostname. */ + if (check_windows_system_registry (g, fs) == -1) + return -1; + + return 0; +} + +static int +check_windows_arch (guestfs_h *g, struct inspect_fs *fs) +{ + size_t len = strlen (fs->windows_systemroot) + 32; + char cmd_exe[len]; + snprintf (cmd_exe, len, "%s/system32/cmd.exe", fs->windows_systemroot); + + char *cmd_exe_path = guestfs___case_sensitive_path_silently (g, cmd_exe); + if (!cmd_exe_path) + return 0; + + char *arch = guestfs_file_architecture (g, cmd_exe_path); + free (cmd_exe_path); + + if (arch) + fs->arch = arch; /* freed by guestfs___free_inspect_info */ + + return 0; +} + +/* At the moment, pull just the ProductName and version numbers from + * the registry. In future there is a case for making many more + * registry fields available to callers. + */ +static int +check_windows_software_registry (guestfs_h *g, struct inspect_fs *fs) +{ + size_t len = strlen (fs->windows_systemroot) + 64; + char software[len]; + snprintf (software, len, "%s/system32/config/software", + fs->windows_systemroot); + + char *software_path = guestfs___case_sensitive_path_silently (g, software); + if (!software_path) + /* If the software hive doesn't exist, just accept that we cannot + * find product_name etc. + */ + return 0; + + char *software_hive = NULL; + int ret = -1; + hive_h *h = NULL; + hive_value_h *values = NULL; + + software_hive = guestfs___download_to_tmp (g, fs, software_path, "software", + MAX_REGISTRY_SIZE); + if (software_hive == NULL) + goto out; + + h = hivex_open (software_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); + if (h == NULL) { + perrorf (g, "hivex_open"); + goto out; + } + + hive_node_h node = hivex_root (h); + const char *hivepath[] = + { "Microsoft", "Windows NT", "CurrentVersion" }; + size_t i; + for (i = 0; + node != 0 && i < sizeof hivepath / sizeof hivepath[0]; + ++i) { + node = hivex_node_get_child (h, node, hivepath[i]); + } + + if (node == 0) { + perrorf (g, "hivex: cannot locate HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"); + goto out; + } + + values = hivex_node_values (h, node); + + for (i = 0; values[i] != 0; ++i) { + char *key = hivex_value_key (h, values[i]); + if (key == NULL) { + perrorf (g, "hivex_value_key"); + goto out; + } + + if (STRCASEEQ (key, "ProductName")) { + fs->product_name = hivex_value_string (h, values[i]); + if (!fs->product_name) { + perrorf (g, "hivex_value_string"); + free (key); + goto out; + } + } + else if (STRCASEEQ (key, "CurrentVersion")) { + char *version = hivex_value_string (h, values[i]); + if (!version) { + perrorf (g, "hivex_value_string"); + free (key); + goto out; + } + char *major, *minor; + if (match2 (g, version, re_windows_version, &major, &minor)) { + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + free (key); + free (version); + goto out; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) { + free (key); + free (version); + goto out; + } + } + + free (version); + } + else if (STRCASEEQ (key, "InstallationType")) { + fs->product_variant = hivex_value_string (h, values[i]); + if (!fs->product_variant) { + perrorf (g, "hivex_value_string"); + free (key); + goto out; + } + } + + free (key); + } + + ret = 0; + + out: + if (h) hivex_close (h); + free (values); + free (software_path); + free (software_hive); + + return ret; +} + +static int +check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs) +{ + size_t len = strlen (fs->windows_systemroot) + 64; + char system[len]; + snprintf (system, len, "%s/system32/config/system", + fs->windows_systemroot); + + char *system_path = guestfs___case_sensitive_path_silently (g, system); + if (!system_path) + /* If the system hive doesn't exist, just accept that we cannot + * find hostname etc. + */ + return 0; + + char *system_hive = NULL; + int ret = -1; + hive_h *h = NULL; + hive_node_h root, node; + hive_value_h value, *values = NULL; + int32_t dword; + size_t i, count; + + system_hive = + guestfs___download_to_tmp (g, fs, system_path, "system", + MAX_REGISTRY_SIZE); + if (system_hive == NULL) + goto out; + + h = hivex_open (system_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); + if (h == NULL) { + perrorf (g, "hivex_open"); + goto out; + } + + root = hivex_root (h); + if (root == 0) { + perrorf (g, "hivex_root"); + goto out; + } + + /* Get the CurrentControlSet. */ + errno = 0; + node = hivex_node_get_child (h, root, "Select"); + if (node == 0) { + if (errno != 0) + perrorf (g, "hivex_node_get_child"); + else + error (g, "hivex: could not locate HKLM\\SYSTEM\\Select"); + goto out; + } + + errno = 0; + value = hivex_node_get_value (h, node, "Current"); + if (value == 0) { + if (errno != 0) + perrorf (g, "hivex_node_get_value"); + else + error (g, "hivex: HKLM\\System\\Select Default entry not found."); + goto out; + } + + /* XXX Should check the type. */ + dword = hivex_value_dword (h, value); + fs->windows_current_control_set = safe_asprintf (g, "ControlSet%03d", dword); + + /* Get the drive mappings. + * This page explains the contents of HKLM\System\MountedDevices: + * http://www.goodells.net/multiboot/partsigs.shtml + */ + errno = 0; + node = hivex_node_get_child (h, root, "MountedDevices"); + if (node == 0) { + if (errno == 0) + /* Not found: skip getting drive letter mappings (RHBZ#803664). */ + goto skip_drive_letter_mappings; + /* errno != 0, so it's some other error from hivex */ + perrorf (g, "hivex_node_get_child"); + goto out; + } + + values = hivex_node_values (h, node); + + /* Count how many DOS drive letter mappings there are. This doesn't + * ignore removable devices, so it overestimates, but that doesn't + * matter because it just means we'll allocate a few bytes extra. + */ + for (i = count = 0; values[i] != 0; ++i) { + char *key = hivex_value_key (h, values[i]); + if (key == NULL) { + perrorf (g, "hivex_value_key"); + goto out; + } + if (STRCASEEQLEN (key, "\\DosDevices\\", 12) && + c_isalpha (key[12]) && key[13] == ':') + count++; + free (key); + } + + fs->drive_mappings = calloc (2*count + 1, sizeof (char *)); + if (fs->drive_mappings == NULL) { + perrorf (g, "calloc"); + goto out; + } + + for (i = count = 0; values[i] != 0; ++i) { + char *key = hivex_value_key (h, values[i]); + if (key == NULL) { + perrorf (g, "hivex_value_key"); + goto out; + } + if (STRCASEEQLEN (key, "\\DosDevices\\", 12) && + c_isalpha (key[12]) && key[13] == ':') { + /* Get the binary value. Is it a fixed disk? */ + char *blob, *device; + size_t len; + hive_type type; + + blob = hivex_value_value (h, values[i], &type, &len); + if (blob != NULL && type == 3 && len == 12) { + /* Try to map the blob to a known disk and partition. */ + device = map_registry_disk_blob (g, blob); + if (device != NULL) { + fs->drive_mappings[count++] = safe_strndup (g, &key[12], 1); + fs->drive_mappings[count++] = device; + } + } + free (blob); + } + free (key); + } + + skip_drive_letter_mappings:; + /* Get the hostname. */ + const char *hivepath[] = + { fs->windows_current_control_set, "Services", "Tcpip", "Parameters" }; + for (node = root, i = 0; + node != 0 && i < sizeof hivepath / sizeof hivepath[0]; + ++i) { + node = hivex_node_get_child (h, node, hivepath[i]); + } + + if (node == 0) { + perrorf (g, "hivex: cannot locate HKLM\\SYSTEM\\%s\\Services\\Tcpip\\Parameters", + fs->windows_current_control_set); + goto out; + } + + free (values); + values = hivex_node_values (h, node); + + for (i = 0; values[i] != 0; ++i) { + char *key = hivex_value_key (h, values[i]); + if (key == NULL) { + perrorf (g, "hivex_value_key"); + goto out; + } + + if (STRCASEEQ (key, "Hostname")) { + fs->hostname = hivex_value_string (h, values[i]); + if (!fs->hostname) { + perrorf (g, "hivex_value_string"); + free (key); + goto out; + } + } + /* many other interesting fields here ... */ + + free (key); + } + + ret = 0; + + out: + if (h) hivex_close (h); + free (values); + free (system_path); + free (system_hive); + + return ret; +} + +/* Windows Registry HKLM\SYSTEM\MountedDevices uses a blob of data + * to store partitions. This blob is described here: + * http://www.goodells.net/multiboot/partsigs.shtml + * The following function maps this blob to a libguestfs partition + * name, if possible. + */ +static char * +map_registry_disk_blob (guestfs_h *g, const char *blob) +{ + char **devices = NULL; + struct guestfs_partition_list *partitions = NULL; + char *diskid; + size_t i, j, len; + char *ret = NULL; + uint64_t part_offset; + + /* First 4 bytes are the disk ID. Search all devices to find the + * disk with this disk ID. + */ + devices = guestfs_list_devices (g); + if (devices == NULL) + goto out; + + for (i = 0; devices[i] != NULL; ++i) { + /* Read the disk ID. */ + diskid = guestfs_pread_device (g, devices[i], 4, 0x01b8, &len); + if (diskid == NULL) + continue; + if (len < 4) { + free (diskid); + continue; + } + if (memcmp (diskid, blob, 4) == 0) { /* found it */ + free (diskid); + goto found_disk; + } + free (diskid); + } + goto out; + + found_disk: + /* Next 8 bytes are the offset of the partition in bytes(!) given as + * a 64 bit little endian number. Luckily it's easy to get the + * partition byte offset from guestfs_part_list. + */ + part_offset = le64toh (* (uint64_t *) &blob[4]); + + partitions = guestfs_part_list (g, devices[i]); + if (partitions == NULL) + goto out; + + for (j = 0; j < partitions->len; ++j) { + if (partitions->val[j].part_start == part_offset) /* found it */ + goto found_partition; + } + goto out; + + found_partition: + /* Construct the full device name. */ + ret = safe_asprintf (g, "%s%d", devices[i], partitions->val[j].part_num); + + out: + if (devices) + guestfs___free_string_list (devices); + if (partitions) + guestfs_free_partition_list (partitions); + return ret; +} + +#endif /* defined(HAVE_HIVEX) */ + +char * +guestfs___case_sensitive_path_silently (guestfs_h *g, const char *path) +{ + guestfs_error_handler_cb old_error_cb = g->error_cb; + g->error_cb = NULL; + char *ret = guestfs_case_sensitive_path (g, path); + g->error_cb = old_error_cb; + return ret; +} diff --git a/src/inspect-fs.c b/src/inspect-fs.c new file mode 100644 index 00000000..0859a2b4 --- /dev/null +++ b/src/inspect-fs.c @@ -0,0 +1,597 @@ +/* libguestfs + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_HIVEX +#include +#endif + +#include "c-ctype.h" +#include "ignore-value.h" +#include "xstrtol.h" + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +#if defined(HAVE_HIVEX) + +/* Compile all the regular expressions once when the shared library is + * loaded. PCRE is thread safe so we're supposedly OK here if + * multiple threads call into the libguestfs API functions below + * simultaneously. + */ +static pcre *re_first_partition; +static pcre *re_major_minor; + +static void compile_regexps (void) __attribute__((constructor)); +static void free_regexps (void) __attribute__((destructor)); + +static void +compile_regexps (void) +{ + const char *err; + int offset; + +#define COMPILE(re,pattern,options) \ + do { \ + re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ + if (re == NULL) { \ + ignore_value (write (2, err, strlen (err))); \ + abort (); \ + } \ + } while (0) + + COMPILE (re_first_partition, "^/dev/(?:h|s|v)d.1$", 0); + COMPILE (re_major_minor, "(\\d+)\\.(\\d+)", 0); +} + +static void +free_regexps (void) +{ + pcre_free (re_first_partition); + pcre_free (re_major_minor); +} + +static int check_filesystem (guestfs_h *g, const char *device, int is_block, int is_partnum); +static void check_package_format (guestfs_h *g, struct inspect_fs *fs); +static void check_package_management (guestfs_h *g, struct inspect_fs *fs); +static int extend_fses (guestfs_h *g); + +/* Find out if 'device' contains a filesystem. If it does, add + * another entry in g->fses. + */ +int +guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, + int is_block, int is_partnum) +{ + /* Get vfs-type in order to check if it's a Linux(?) swap device. + * If there's an error we should ignore it, so to do that we have to + * temporarily replace the error handler with a null one. + */ + guestfs_error_handler_cb old_error_cb = g->error_cb; + g->error_cb = NULL; + char *vfs_type = guestfs_vfs_type (g, device); + g->error_cb = old_error_cb; + + int is_swap = vfs_type && STREQ (vfs_type, "swap"); + + debug (g, "check_for_filesystem_on: %s %d %d (%s)", + device, is_block, is_partnum, + vfs_type ? vfs_type : "failed to get vfs type"); + + if (is_swap) { + free (vfs_type); + if (extend_fses (g) == -1) + return -1; + g->fses[g->nr_fses-1].is_swap = 1; + return 0; + } + + /* Try mounting the device. As above, ignore errors. */ + g->error_cb = NULL; + int r; + if (vfs_type && STREQ (vfs_type, "ufs")) { /* Hack for the *BSDs. */ + /* FreeBSD fs is a variant of ufs called ufs2 ... */ + r = guestfs_mount_vfs (g, "ro,ufstype=ufs2", "ufs", device, "/"); + if (r == -1) + /* while NetBSD and OpenBSD use another variant labeled 44bsd */ + r = guestfs_mount_vfs (g, "ro,ufstype=44bsd", "ufs", device, "/"); + } else { + r = guestfs_mount_ro (g, device, "/"); + } + free (vfs_type); + g->error_cb = old_error_cb; + if (r == -1) + return 0; + + /* Do the rest of the checks. */ + r = check_filesystem (g, device, is_block, is_partnum); + + /* Unmount the filesystem. */ + if (guestfs_umount_all (g) == -1) + return -1; + + return r; +} + +/* is_block and is_partnum are just hints: is_block is true if the + * filesystem is a whole block device (eg. /dev/sda). is_partnum + * is > 0 if the filesystem is a direct partition, and in this case + * it is the partition number counting from 1 + * (eg. /dev/sda1 => is_partnum == 1). + */ +static int +check_filesystem (guestfs_h *g, const char *device, + int is_block, int is_partnum) +{ + if (extend_fses (g) == -1) + return -1; + + struct inspect_fs *fs = &g->fses[g->nr_fses-1]; + + fs->device = safe_strdup (g, device); + fs->is_mountable = 1; + + /* Optimize some of the tests by avoiding multiple tests of the same thing. */ + int is_dir_etc = guestfs_is_dir (g, "/etc") > 0; + int is_dir_bin = guestfs_is_dir (g, "/bin") > 0; + int is_dir_share = guestfs_is_dir (g, "/share") > 0; + + /* Grub /boot? */ + if (guestfs_is_file (g, "/grub/menu.lst") > 0 || + guestfs_is_file (g, "/grub/grub.conf") > 0 || + guestfs_is_file (g, "/grub2/grub.cfg") > 0) + fs->content = FS_CONTENT_LINUX_BOOT; + /* FreeBSD root? */ + else if (is_dir_etc && + is_dir_bin && + guestfs_is_file (g, "/etc/freebsd-update.conf") > 0 && + guestfs_is_file (g, "/etc/fstab") > 0) { + /* Ignore /dev/sda1 which is a shadow of the real root filesystem + * that is probably /dev/sda5 (see: + * http://www.freebsd.org/doc/handbook/disk-organization.html) + */ + if (match (g, device, re_first_partition)) + return 0; + + fs->is_root = 1; + fs->content = FS_CONTENT_FREEBSD_ROOT; + fs->format = OS_FORMAT_INSTALLED; + if (guestfs___check_freebsd_root (g, fs) == -1) + return -1; + } + else if (is_dir_etc && + is_dir_bin && + guestfs_is_file (g, "/etc/fstab") > 0 && + guestfs_is_file (g, "/etc/release") > 0) { + /* Ignore /dev/sda1 which is a shadow of the real root filesystem + * that is probably /dev/sda5 (see: + * http://www.freebsd.org/doc/handbook/disk-organization.html) + */ + if (match (g, device, re_first_partition)) + return 0; + + fs->is_root = 1; + fs->content = FS_CONTENT_NETBSD_ROOT; + fs->format = OS_FORMAT_INSTALLED; + if (guestfs___check_netbsd_root (g, fs) == -1) + return -1; + } + /* Hurd root? */ + else if (guestfs_is_file (g, "/hurd/console") > 0 && + guestfs_is_file (g, "/hurd/hello") > 0 && + guestfs_is_file (g, "/hurd/null") > 0) { + fs->is_root = 1; + fs->content = FS_CONTENT_HURD_ROOT; + fs->format = OS_FORMAT_INSTALLED; /* XXX could be more specific */ + if (guestfs___check_hurd_root (g, fs) == -1) + return -1; + } + /* Linux root? */ + else if (is_dir_etc && + (is_dir_bin || + (guestfs_is_symlink (g, "/bin") > 0 && + guestfs_is_dir (g, "/usr/bin") > 0)) && + guestfs_is_file (g, "/etc/fstab") > 0) { + fs->is_root = 1; + fs->content = FS_CONTENT_LINUX_ROOT; + fs->format = OS_FORMAT_INSTALLED; + if (guestfs___check_linux_root (g, fs) == -1) + return -1; + } + /* Linux /usr/local? */ + else if (is_dir_etc && + is_dir_bin && + is_dir_share && + guestfs_exists (g, "/local") == 0 && + guestfs_is_file (g, "/etc/fstab") == 0) + fs->content = FS_CONTENT_LINUX_USR_LOCAL; + /* Linux /usr? */ + else if (is_dir_etc && + is_dir_bin && + is_dir_share && + guestfs_exists (g, "/local") > 0 && + guestfs_is_file (g, "/etc/fstab") == 0) + fs->content = FS_CONTENT_LINUX_USR; + /* Linux /var? */ + else if (guestfs_is_dir (g, "/log") > 0 && + guestfs_is_dir (g, "/run") > 0 && + guestfs_is_dir (g, "/spool") > 0) + fs->content = FS_CONTENT_LINUX_VAR; + /* Windows root? */ + else if (guestfs___has_windows_systemroot (g) >= 0) { + fs->is_root = 1; + fs->content = FS_CONTENT_WINDOWS_ROOT; + fs->format = OS_FORMAT_INSTALLED; + if (guestfs___check_windows_root (g, fs) == -1) + return -1; + } + /* Windows volume with installed applications (but not root)? */ + else if (guestfs___is_dir_nocase (g, "/System Volume Information") > 0 && + guestfs___is_dir_nocase (g, "/Program Files") > 0) + fs->content = FS_CONTENT_WINDOWS_VOLUME_WITH_APPS; + /* Windows volume (but not root)? */ + else if (guestfs___is_dir_nocase (g, "/System Volume Information") > 0) + fs->content = FS_CONTENT_WINDOWS_VOLUME; + /* FreeDOS? */ + else if (guestfs___is_dir_nocase (g, "/FDOS") > 0 && + guestfs___is_file_nocase (g, "/FDOS/FREEDOS.BSS") > 0) { + fs->is_root = 1; + fs->content = FS_CONTENT_FREEBSD_ROOT; + fs->format = OS_FORMAT_INSTALLED; + fs->type = OS_TYPE_DOS; + fs->distro = OS_DISTRO_FREEDOS; + /* FreeDOS is a mix of 16 and 32 bit, but assume it requires a + * 32 bit i386 processor. + */ + fs->arch = safe_strdup (g, "i386"); + } + /* Install CD/disk? Skip these checks if it's not a whole device + * (eg. CD) or the first partition (eg. bootable USB key). + */ + else if ((is_block || is_partnum == 1) && + (guestfs_is_file (g, "/isolinux/isolinux.cfg") > 0 || + guestfs_is_dir (g, "/EFI/BOOT") > 0 || + guestfs_is_file (g, "/images/install.img") > 0 || + guestfs_is_dir (g, "/.disk") > 0 || + guestfs_is_file (g, "/.discinfo") > 0 || + guestfs_is_file (g, "/i386/txtsetup.sif") > 0 || + guestfs_is_file (g, "/amd64/txtsetup.sif") > 0 || + guestfs_is_file (g, "/freedos/freedos.ico") > 0)) { + fs->is_root = 1; + fs->content = FS_CONTENT_INSTALLER; + fs->format = OS_FORMAT_INSTALLER; + if (guestfs___check_installer_root (g, fs) == -1) + return -1; + } + + /* The above code should have set fs->type and fs->distro fields, so + * we can now guess the package management system. + */ + check_package_format (g, fs); + check_package_management (g, fs); + + return 0; +} + +static int +extend_fses (guestfs_h *g) +{ + size_t n = g->nr_fses + 1; + struct inspect_fs *p; + + p = realloc (g->fses, n * sizeof (struct inspect_fs)); + if (p == NULL) { + perrorf (g, "realloc"); + return -1; + } + + g->fses = p; + g->nr_fses = n; + + memset (&g->fses[n-1], 0, sizeof (struct inspect_fs)); + + return 0; +} + +int +guestfs___is_file_nocase (guestfs_h *g, const char *path) +{ + char *p; + int r; + + p = guestfs___case_sensitive_path_silently (g, path); + if (!p) + return 0; + r = guestfs_is_file (g, p); + free (p); + return r > 0; +} + +int +guestfs___is_dir_nocase (guestfs_h *g, const char *path) +{ + char *p; + int r; + + p = guestfs___case_sensitive_path_silently (g, path); + if (!p) + return 0; + r = guestfs_is_dir (g, p); + free (p); + return r > 0; +} + +/* Parse small, unsigned ints, as used in version numbers. */ +int +guestfs___parse_unsigned_int (guestfs_h *g, const char *str) +{ + long ret; + int r = xstrtol (str, NULL, 10, &ret, ""); + if (r != LONGINT_OK) { + error (g, _("could not parse integer in version number: %s"), str); + return -1; + } + return ret; +} + +/* Like parse_unsigned_int, but ignore trailing stuff. */ +int +guestfs___parse_unsigned_int_ignore_trailing (guestfs_h *g, const char *str) +{ + long ret; + int r = xstrtol (str, NULL, 10, &ret, NULL); + if (r != LONGINT_OK) { + error (g, _("could not parse integer in version number: %s"), str); + return -1; + } + return ret; +} + +/* Parse generic MAJOR.MINOR from the fs->product_name string. */ +int +guestfs___parse_major_minor (guestfs_h *g, struct inspect_fs *fs) +{ + char *major, *minor; + + if (match2 (g, fs->product_name, re_major_minor, &major, &minor)) { + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); + return -1; + } + fs->minor_version = guestfs___parse_unsigned_int (g, minor); + free (minor); + if (fs->minor_version == -1) + return -1; + } + return 0; +} + +/* At the moment, package format and package management is just a + * simple function of the distro and major_version fields, so these + * can never return an error. We might be cleverer in future. + */ +static void +check_package_format (guestfs_h *g, struct inspect_fs *fs) +{ + switch (fs->distro) { + case OS_DISTRO_FEDORA: + case OS_DISTRO_MEEGO: + case OS_DISTRO_REDHAT_BASED: + case OS_DISTRO_RHEL: + case OS_DISTRO_MAGEIA: + case OS_DISTRO_MANDRIVA: + case OS_DISTRO_OPENSUSE: + case OS_DISTRO_CENTOS: + case OS_DISTRO_SCIENTIFIC_LINUX: + fs->package_format = OS_PACKAGE_FORMAT_RPM; + break; + + case OS_DISTRO_DEBIAN: + case OS_DISTRO_UBUNTU: + case OS_DISTRO_LINUX_MINT: + fs->package_format = OS_PACKAGE_FORMAT_DEB; + break; + + case OS_DISTRO_ARCHLINUX: + fs->package_format = OS_PACKAGE_FORMAT_PACMAN; + break; + case OS_DISTRO_GENTOO: + fs->package_format = OS_PACKAGE_FORMAT_EBUILD; + break; + case OS_DISTRO_PARDUS: + fs->package_format = OS_PACKAGE_FORMAT_PISI; + break; + + case OS_DISTRO_SLACKWARE: + case OS_DISTRO_TTYLINUX: + case OS_DISTRO_WINDOWS: + case OS_DISTRO_BUILDROOT: + case OS_DISTRO_CIRROS: + case OS_DISTRO_FREEDOS: + case OS_DISTRO_UNKNOWN: + default: + fs->package_format = OS_PACKAGE_FORMAT_UNKNOWN; + break; + } +} + +static void +check_package_management (guestfs_h *g, struct inspect_fs *fs) +{ + switch (fs->distro) { + case OS_DISTRO_FEDORA: + case OS_DISTRO_MEEGO: + fs->package_management = OS_PACKAGE_MANAGEMENT_YUM; + break; + + case OS_DISTRO_REDHAT_BASED: + case OS_DISTRO_RHEL: + case OS_DISTRO_CENTOS: + case OS_DISTRO_SCIENTIFIC_LINUX: + if (fs->major_version >= 5) + fs->package_management = OS_PACKAGE_MANAGEMENT_YUM; + else + fs->package_management = OS_PACKAGE_MANAGEMENT_UP2DATE; + break; + + case OS_DISTRO_DEBIAN: + case OS_DISTRO_UBUNTU: + case OS_DISTRO_LINUX_MINT: + fs->package_management = OS_PACKAGE_MANAGEMENT_APT; + break; + + case OS_DISTRO_ARCHLINUX: + fs->package_management = OS_PACKAGE_MANAGEMENT_PACMAN; + break; + case OS_DISTRO_GENTOO: + fs->package_management = OS_PACKAGE_MANAGEMENT_PORTAGE; + break; + case OS_DISTRO_PARDUS: + fs->package_management = OS_PACKAGE_MANAGEMENT_PISI; + break; + case OS_DISTRO_MAGEIA: + case OS_DISTRO_MANDRIVA: + fs->package_management = OS_PACKAGE_MANAGEMENT_URPMI; + break; + + case OS_DISTRO_OPENSUSE: + fs->package_management = OS_PACKAGE_MANAGEMENT_ZYPPER; + break; + + case OS_DISTRO_SLACKWARE: + case OS_DISTRO_TTYLINUX: + case OS_DISTRO_WINDOWS: + case OS_DISTRO_BUILDROOT: + case OS_DISTRO_CIRROS: + case OS_DISTRO_FREEDOS: + case OS_DISTRO_UNKNOWN: + default: + fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN; + break; + } +} + +/* Get the first line of a small file, without any trailing newline + * character. + * + * NOTE: If the file is completely empty or begins with a '\n' + * character, this returns an empty string (not NULL). The caller + * will usually need to check for this case. + */ +char * +guestfs___first_line_of_file (guestfs_h *g, const char *filename) +{ + char **lines; + int64_t size; + char *ret; + + /* Don't trust guestfs_head_n not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return NULL; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return NULL; + } + + lines = guestfs_head_n (g, 1, filename); + if (lines == NULL) + return NULL; + if (lines[0] == NULL) { + guestfs___free_string_list (lines); + /* Empty file: Return an empty string as explained above. */ + return safe_strdup (g, ""); + } + /* lines[1] should be NULL because of '1' argument above ... */ + + ret = lines[0]; /* caller frees */ + free (lines); /* free the array */ + + return ret; +} + +/* Get the first matching line (using guestfs_egrep{,i}) of a small file, + * without any trailing newline character. + * + * Returns: 1 = returned a line (in *ret) + * 0 = no match + * -1 = error + */ +int +guestfs___first_egrep_of_file (guestfs_h *g, const char *filename, + const char *eregex, int iflag, char **ret) +{ + char **lines; + int64_t size; + size_t i; + + /* Don't trust guestfs_egrep not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1; + } + + lines = (!iflag ? guestfs_egrep : guestfs_egrepi) (g, eregex, filename); + if (lines == NULL) + return -1; + if (lines[0] == NULL) { + guestfs___free_string_list (lines); + return 0; + } + + *ret = lines[0]; /* caller frees */ + + /* free up any other matches and the array itself */ + for (i = 1; lines[i] != NULL; ++i) + free (lines[i]); + free (lines); + + return 1; +} + +#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect-icon.c b/src/inspect-icon.c new file mode 100644 index 00000000..19acfb9c --- /dev/null +++ b/src/inspect-icon.c @@ -0,0 +1,599 @@ +/* libguestfs + * Copyright (C) 2011 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" +#include "guestfs_protocol.h" + +/* External tools are required for some icon types. Check we have them. */ +#if defined(PBMTEXT) && defined (PNMTOPNG) +#define CAN_DO_CIRROS 1 +#endif +#if defined(WRESTOOL) && defined(BMPTOPNM) && defined(PNMTOPNG) && \ + defined(PAMCUT) +#define CAN_DO_WINDOWS 1 +#endif + +static int read_whole_file (guestfs_h *g, const char *filename, char **data_r, size_t *size_r); + +/* All these icon_*() functions return the same way. One of: + * + * ret == NULL: + * An error occurred. Error has been set in the handle. The caller + * should return NULL immediately. + * + * ret == NOT_FOUND: + * Not an error, but no icon was found. 'ret' is just a dummy value + * which should be ignored (do not free it!) + * + * ret == ordinary pointer: + * An icon was found. 'ret' points to the icon buffer, and *size_r + * is the size. + */ +static char *icon_favicon (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +#if CAN_DO_CIRROS +static char *icon_cirros (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +#endif +#if CAN_DO_WINDOWS +static char *icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +#endif + +/* Dummy static object. */ +static char *NOT_FOUND = (char *) "not_found"; + +/* For the unexpected legal consequences of this function, see: + * http://lists.fedoraproject.org/pipermail/legal/2011-April/001615.html + * + * Returns an RBufferOut, so the length of the returned buffer is + * returned in *size_r. + * + * Check optargs for the optional argument. + */ +char * +guestfs__inspect_get_icon (guestfs_h *g, const char *root, size_t *size_r, + const struct guestfs_inspect_get_icon_argv *optargs) +{ + struct inspect_fs *fs; + char *r = NOT_FOUND; + int favicon, highquality; + size_t size; + + fs = guestfs___search_for_root (g, root); + if (!fs) + return NULL; + + /* Get optargs, or defaults. */ + favicon = + optargs->bitmask & GUESTFS_INSPECT_GET_ICON_FAVICON_BITMASK ? + optargs->favicon : 1; + + highquality = + optargs->bitmask & GUESTFS_INSPECT_GET_ICON_HIGHQUALITY_BITMASK ? + optargs->highquality : 0; + + /* Favicons are never high quality, so ... */ + if (highquality) + favicon = 0; + + /* Try looking for a favicon first. */ + if (favicon) { + r = icon_favicon (g, fs, &size); + if (!r) + return NULL; + + if (r != NOT_FOUND) { + /* try_favicon succeeded in finding a favicon. */ + *size_r = size; + return r; + } + } + + /* Favicon failed, so let's try a method based on the detected operating + * system. + */ + switch (fs->type) { + case OS_TYPE_LINUX: + case OS_TYPE_HURD: + switch (fs->distro) { + case OS_DISTRO_FEDORA: + r = icon_fedora (g, fs, &size); + break; + + case OS_DISTRO_RHEL: + case OS_DISTRO_REDHAT_BASED: + case OS_DISTRO_CENTOS: + case OS_DISTRO_SCIENTIFIC_LINUX: + r = icon_rhel (g, fs, &size); + break; + + case OS_DISTRO_DEBIAN: + r = icon_debian (g, fs, &size); + break; + + case OS_DISTRO_UBUNTU: + r = icon_ubuntu (g, fs, &size); + break; + + case OS_DISTRO_MAGEIA: + r = icon_mageia (g, fs, &size); + break; + + case OS_DISTRO_OPENSUSE: + r = icon_opensuse (g, fs, &size); + break; + + case OS_DISTRO_CIRROS: +#if CAN_DO_CIRROS + r = icon_cirros (g, fs, &size); +#endif + break; + + /* These are just to keep gcc warnings happy. */ + case OS_DISTRO_ARCHLINUX: + case OS_DISTRO_BUILDROOT: + case OS_DISTRO_FREEDOS: + case OS_DISTRO_GENTOO: + case OS_DISTRO_LINUX_MINT: + case OS_DISTRO_MANDRIVA: + case OS_DISTRO_MEEGO: + case OS_DISTRO_PARDUS: + case OS_DISTRO_SLACKWARE: + case OS_DISTRO_TTYLINUX: + case OS_DISTRO_WINDOWS: + case OS_DISTRO_UNKNOWN: + default: ; + } + break; + + case OS_TYPE_WINDOWS: +#if CAN_DO_WINDOWS + /* We don't know how to get high quality icons from a Windows guest, + * so disable this if high quality was specified. + */ + if (!highquality) + r = icon_windows (g, fs, &size); +#endif + break; + + case OS_TYPE_FREEBSD: + case OS_TYPE_NETBSD: + case OS_TYPE_DOS: + case OS_TYPE_UNKNOWN: + default: ; + } + + if (r == NOT_FOUND) { + /* Not found, but not an error. So return the special zero-length + * buffer. Use malloc(1) here to ensure that malloc won't return + * NULL. + */ + r = safe_malloc (g, 1); + size = 0; + } + + *size_r = size; + return r; +} + +/* Check that the named file 'filename' is a PNG file and is reasonable. + * If it is, download and return it. + */ +static char * +get_png (guestfs_h *g, struct inspect_fs *fs, const char *filename, + size_t *size_r, size_t max_size) +{ + char *ret = NOT_FOUND; + char *type = NULL; + char *local = NULL; + int r, w, h; + + r = guestfs_exists (g, filename); + if (r == -1) { + ret = NULL; /* a real error */ + goto out; + } + if (r == 0) goto out; + + /* Check the file type and geometry. */ + type = guestfs_file (g, filename); + if (!type) goto out; + + if (!STRPREFIX (type, "PNG image data, ")) goto out; + if (sscanf (&type[16], "%d x %d", &w, &h) != 2) goto out; + if (w < 16 || h < 16 || w > 1024 || h > 1024) goto out; + + /* Define a maximum reasonable size based on the geometry. This + * also limits the maximum we allocate below to around 4 MB. + */ + if (max_size == 0) + max_size = 4 * w * h; + + local = guestfs___download_to_tmp (g, fs, filename, "icon", max_size); + if (!local) goto out; + + /* Successfully passed checks and downloaded. Read it into memory. */ + if (read_whole_file (g, local, &ret, size_r) == -1) { + ret = NULL; + goto out; + } + + out: + free (local); + free (type); + + return ret; +} + +/* Return /etc/favicon.png (or \etc\favicon.png) if it exists and if + * it has a reasonable size and format. + */ +static char * +icon_favicon (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + char *ret; + char *filename = safe_strdup (g, "/etc/favicon.png"); + + if (fs->type == OS_TYPE_WINDOWS) { + char *f = guestfs___case_sensitive_path_silently (g, filename); + if (f) { + free (filename); + filename = f; + } + } + + ret = get_png (g, fs, filename, size_r, 0); + free (filename); + return ret; +} + +/* Return FEDORA_ICON. I checked that this exists on at least Fedora 6 + * through 16. + */ +#define FEDORA_ICON "/usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png" + +static char * +icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, FEDORA_ICON, size_r, 0); +} + +/* RHEL 3, 4: + * /usr/share/pixmaps/redhat/shadowman-transparent.png is a 517x515 + * PNG with alpha channel, around 64K in size. + * + * RHEL 5, 6: + * As above, but the file has been optimized to about 16K. + * + * Conveniently the RHEL clones also have the same file with the + * same name, but containing their own logos. Sense prevails! + */ +#define SHADOWMAN_ICON "/usr/share/pixmaps/redhat/shadowman-transparent.png" + +static char * +icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + size_t max_size = 0; + + if (fs->distro == OS_DISTRO_RHEL) { + if (fs->major_version <= 4) + max_size = 66000; + else + max_size = 17000; + } + + return get_png (g, fs, SHADOWMAN_ICON, size_r, max_size); +} + +#define DEBIAN_ICON "/usr/share/pixmaps/debian-logo.png" + +static char * +icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, DEBIAN_ICON, size_r, 2048); +} + +#define UBUNTU_ICON "/usr/share/icons/gnome/24x24/places/ubuntu-logo.png" + +static char * +icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, UBUNTU_ICON, size_r, 2048); +} + +#define MAGEIA_ICON "/usr/share/icons/mageia.png" + +static char * +icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, MAGEIA_ICON, size_r, 2048); +} + +#define OPENSUSE_ICON "/usr/share/icons/hicolor/24x24/apps/distributor.png" + +static char * +icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, OPENSUSE_ICON, size_r, 2048); +} + +#if CAN_DO_CIRROS + +/* Cirros's logo is a text file! */ +#define CIRROS_LOGO "/usr/share/cirros/logo" + +static char * +icon_cirros (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + char *ret = NOT_FOUND; + char *type = NULL; + char *local = NULL; + char *pngfile = NULL; + char *cmd = NULL; + int r; + + r = guestfs_exists (g, CIRROS_LOGO); + if (r == -1) { + ret = NULL; /* a real error */ + goto out; + } + if (r == 0) goto out; + + /* Check the file type and geometry. */ + type = guestfs_file (g, CIRROS_LOGO); + if (!type) goto out; + + if (!STRPREFIX (type, "ASCII text")) goto out; + + local = guestfs___download_to_tmp (g, fs, CIRROS_LOGO, "icon", 1024); + if (!local) goto out; + + /* Use pbmtext to render it. */ + pngfile = safe_asprintf (g, "%s/cirros.png", g->tmpdir); + + cmd = safe_asprintf (g, PBMTEXT " < %s | " PNMTOPNG " > %s", + local, pngfile); + r = system (cmd); + if (r == -1 || WEXITSTATUS (r) != 0) { + debug (g, "external command failed: %s", cmd); + goto out; + } + + /* Read it into memory. */ + if (read_whole_file (g, pngfile, &ret, size_r) == -1) { + ret = NULL; + goto out; + } + + out: + free (pngfile); + free (cmd); + free (local); + free (type); + + return ret; +} + +#endif /* CAN_DO_CIRROS */ + +#if CAN_DO_WINDOWS + +/* Windows, as usual, has to be much more complicated and stupid than + * anything else. + * + * We have to download %systemroot%\explorer.exe and use a special + * program called 'wrestool' to extract the icons from this file. For + * each version of Windows, the icon we want is in a different place. + * The icon is in a stupid format (BMP), and in some cases multiple + * icons are in a single BMP file so we have to do some manipulation + * on the file. + * + * XXX I've only bothered with this nonsense for a few versions of + * Windows that I have handy. Please send patches to support other + * versions. + */ + +static char * +icon_windows_xp (guestfs_h *g, struct inspect_fs *fs, const char *explorer, + size_t *size_r) +{ + char *ret; + char *pngfile; + char *cmd; + int r; + + pngfile = safe_asprintf (g, "%s/windows-xp-icon.png", g->tmpdir); + + cmd = safe_asprintf (g, + WRESTOOL " -x --type=2 --name=143 %s | " + BMPTOPNM " 2>/dev/null | " PNMTOPNG " > %s", + explorer, pngfile); + r = system (cmd); + if (r == -1 || WEXITSTATUS (r) != 0) { + debug (g, "external command failed: %s", cmd); + free (cmd); + free (pngfile); + return NOT_FOUND; + } + + free (cmd); + + if (read_whole_file (g, pngfile, &ret, size_r) == -1) { + free (pngfile); + return NULL; + } + + free (pngfile); + + return ret; +} + +static char * +icon_windows_7 (guestfs_h *g, struct inspect_fs *fs, const char *explorer, + size_t *size_r) +{ + char *ret; + char *pngfile; + char *cmd; + int r; + + pngfile = safe_asprintf (g, "%s/windows-7-icon.png", g->tmpdir); + + cmd = safe_asprintf (g, + WRESTOOL " -x --type=2 --name=6801 %s | " + BMPTOPNM " 2>/dev/null | " PAMCUT " -bottom 54 | " + PNMTOPNG " > %s", + explorer, pngfile); + r = system (cmd); + if (r == -1 || WEXITSTATUS (r) != 0) { + debug (g, "external command failed: %s", cmd); + free (cmd); + free (pngfile); + return NOT_FOUND; + } + + free (cmd); + + if (read_whole_file (g, pngfile, &ret, size_r) == -1) { + free (pngfile); + return NULL; + } + + free (pngfile); + + return ret; +} + +static char * +icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + char *(*fn) (guestfs_h *g, struct inspect_fs *fs, const char *explorer, + size_t *size_r); + char *filename1, *filename2, *filename3; + char *ret; + + /* Windows XP. */ + if (fs->major_version == 5 && fs->minor_version == 1) + fn = icon_windows_xp; + + /* Windows 7. */ + else if (fs->major_version == 6 && fs->minor_version == 1) + fn = icon_windows_7; + + /* Not (yet) a supported version of Windows. */ + else return NOT_FOUND; + + if (fs->windows_systemroot == NULL) + return NOT_FOUND; + + /* Download %systemroot%\explorer.exe */ + filename1 = safe_asprintf (g, "%s/explorer.exe", fs->windows_systemroot); + filename2 = guestfs___case_sensitive_path_silently (g, filename1); + free (filename1); + if (filename2 == NULL) + return NOT_FOUND; + + filename3 = guestfs___download_to_tmp (g, fs, filename2, "explorer", + MAX_WINDOWS_EXPLORER_SIZE); + free (filename2); + if (filename3 == NULL) + return NOT_FOUND; + + ret = fn (g, fs, filename3, size_r); + free (filename3); + return ret; +} + +#endif /* CAN_DO_WINDOWS */ + +/* Read the whole file into a memory buffer and return it. The file + * should be a regular, local, trusted file. + */ +static int +read_whole_file (guestfs_h *g, const char *filename, + char **data_r, size_t *size_r) +{ + int fd; + char *data; + off_t size; + off_t n; + ssize_t r; + struct stat statbuf; + + fd = open (filename, O_RDONLY|O_CLOEXEC); + if (fd == -1) { + perrorf (g, "open: %s", filename); + return -1; + } + + if (fstat (fd, &statbuf) == -1) { + perrorf (g, "stat: %s", filename); + close (fd); + return -1; + } + + size = statbuf.st_size; + data = safe_malloc (g, size); + + n = 0; + while (n < size) { + r = read (fd, &data[n], size - n); + if (r == -1) { + perrorf (g, "read: %s", filename); + free (data); + close (fd); + return -1; + } + if (r == 0) { + error (g, _("read: %s: unexpected end of file"), filename); + free (data); + close (fd); + return -1; + } + n += r; + } + + if (close (fd) == -1) { + perrorf (g, "close: %s", filename); + free (data); + return -1; + } + + *data_r = data; + *size_r = size; + + return 0; +} diff --git a/src/inspect_apps.c b/src/inspect_apps.c deleted file mode 100644 index 0ee39546..00000000 --- a/src/inspect_apps.c +++ /dev/null @@ -1,621 +0,0 @@ -/* libguestfs - * Copyright (C) 2010-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_HIVEX -#include -#endif - -#include "c-ctype.h" -#include "ignore-value.h" -#include "xstrtol.h" - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -#if defined(HAVE_HIVEX) - -#ifdef DB_DUMP -static struct guestfs_application_list *list_applications_rpm (guestfs_h *g, struct inspect_fs *fs); -#endif -static struct guestfs_application_list *list_applications_deb (guestfs_h *g, struct inspect_fs *fs); -static struct guestfs_application_list *list_applications_windows (guestfs_h *g, struct inspect_fs *fs); -static void add_application (guestfs_h *g, struct guestfs_application_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *install_path, const char *publisher, const char *url, const char *description); -static void sort_applications (struct guestfs_application_list *); - -/* Unlike the simple inspect-get-* calls, this one assumes that the - * disks are mounted up, and reads files from the mounted disks. - */ -struct guestfs_application_list * -guestfs__inspect_list_applications (guestfs_h *g, const char *root) -{ - struct inspect_fs *fs = guestfs___search_for_root (g, root); - if (!fs) - return NULL; - - struct guestfs_application_list *ret = NULL; - - /* Presently we can only list applications for installed disks. It - * is possible in future to get lists of packages from installers. - */ - if (fs->format == OS_FORMAT_INSTALLED) { - switch (fs->type) { - case OS_TYPE_LINUX: - case OS_TYPE_HURD: - switch (fs->package_format) { - case OS_PACKAGE_FORMAT_RPM: -#ifdef DB_DUMP - ret = list_applications_rpm (g, fs); - if (ret == NULL) - return NULL; -#endif - break; - - case OS_PACKAGE_FORMAT_DEB: - ret = list_applications_deb (g, fs); - if (ret == NULL) - return NULL; - break; - - case OS_PACKAGE_FORMAT_PACMAN: - case OS_PACKAGE_FORMAT_EBUILD: - case OS_PACKAGE_FORMAT_PISI: - case OS_PACKAGE_FORMAT_PKGSRC: - case OS_PACKAGE_FORMAT_UNKNOWN: - default: - /* nothing - keep GCC happy */; - } - break; - - case OS_TYPE_WINDOWS: - ret = list_applications_windows (g, fs); - if (ret == NULL) - return NULL; - break; - - case OS_TYPE_FREEBSD: - case OS_TYPE_NETBSD: - case OS_TYPE_DOS: - case OS_TYPE_UNKNOWN: - default: - /* nothing - keep GCC happy */; - } - } - - if (ret == NULL) { - /* Don't know how to do inspection. Not an error, return an - * empty list. - */ - ret = safe_malloc (g, sizeof *ret); - ret->len = 0; - ret->val = NULL; - } - - sort_applications (ret); - - return ret; -} - -#ifdef DB_DUMP - -/* This data comes from the Name database, and contains the application - * names and the first 4 bytes of the link field. - */ -struct rpm_names_list { - struct rpm_name *names; - size_t len; -}; -struct rpm_name { - char *name; - char link[4]; -}; - -static void -free_rpm_names_list (struct rpm_names_list *list) -{ - size_t i; - - for (i = 0; i < list->len; ++i) - free (list->names[i].name); - free (list->names); -} - -static int -compare_links (const void *av, const void *bv) -{ - const struct rpm_name *a = av; - const struct rpm_name *b = bv; - return memcmp (a->link, b->link, 4); -} - -static int -read_rpm_name (guestfs_h *g, - const unsigned char *key, size_t keylen, - const unsigned char *value, size_t valuelen, - void *listv) -{ - struct rpm_names_list *list = listv; - char *name; - - /* Ignore bogus entries. */ - if (keylen == 0 || valuelen < 4) - return 0; - - /* The name (key) field won't be NUL-terminated, so we must do that. */ - name = safe_malloc (g, keylen+1); - memcpy (name, key, keylen); - name[keylen] = '\0'; - - list->names = safe_realloc (g, list->names, - (list->len + 1) * sizeof (struct rpm_name)); - list->names[list->len].name = name; - memcpy (list->names[list->len].link, value, 4); - list->len++; - - return 0; -} - -struct read_package_data { - struct rpm_names_list *list; - struct guestfs_application_list *apps; -}; - -static int -read_package (guestfs_h *g, - const unsigned char *key, size_t keylen, - const unsigned char *value, size_t valuelen, - void *datav) -{ - struct read_package_data *data = datav; - struct rpm_name nkey, *entry; - char *p; - size_t len; - ssize_t max; - char *nul_name_nul, *version, *release; - - /* This function reads one (key, value) pair from the Packages - * database. The key is the link field (see struct rpm_name). The - * value is a long binary string, but we can extract the version - * number from it as below. First we have to look up the link field - * in the list of links (which is sorted by link field). - */ - - /* Ignore bogus entries. */ - if (keylen < 4 || valuelen == 0) - return 0; - - /* Look up the link (key) in the list. */ - memcpy (nkey.link, key, 4); - entry = bsearch (&nkey, data->list->names, data->list->len, - sizeof (struct rpm_name), compare_links); - if (!entry) - return 0; /* Not found - ignore it. */ - - /* We found a matching link entry, so that gives us the application - * name (entry->name). Now we can get other data for this - * application out of the binary value string. XXX This is a real - * hack. - */ - - /* Look for \0\0 */ - len = strlen (entry->name); - nul_name_nul = safe_malloc (g, len + 2); - nul_name_nul[0] = '\0'; - memcpy (&nul_name_nul[1], entry->name, len); - nul_name_nul[len+1] = '\0'; - p = memmem (value, valuelen, nul_name_nul, len+2); - free (nul_name_nul); - if (!p) - return 0; - - /* Following that are \0-delimited version and release fields. */ - p += len + 2; /* Note we have to skip \0 + name + \0. */ - max = valuelen - (p - (char *) value); - if (max < 0) - max = 0; - version = safe_strndup (g, p, max); - - len = strlen (version); - p += len + 1; - max = valuelen - (p - (char *) value); - if (max < 0) - max = 0; - release = safe_strndup (g, p, max); - - /* Add the application and what we know. */ - add_application (g, data->apps, entry->name, "", 0, version, release, - "", "", "", ""); - - free (version); - free (release); - - return 0; -} - -static struct guestfs_application_list * -list_applications_rpm (guestfs_h *g, struct inspect_fs *fs) -{ - char *Name = NULL, *Packages = NULL; - struct rpm_names_list list = { .names = NULL, .len = 0 }; - struct guestfs_application_list *apps = NULL; - - Name = guestfs___download_to_tmp (g, fs, - "/var/lib/rpm/Name", "rpm_Name", - MAX_PKG_DB_SIZE); - if (Name == NULL) - goto error; - - Packages = guestfs___download_to_tmp (g, fs, - "/var/lib/rpm/Packages", "rpm_Packages", - MAX_PKG_DB_SIZE); - if (Packages == NULL) - goto error; - - /* Read Name database. */ - if (guestfs___read_db_dump (g, Name, &list, read_rpm_name) == -1) - goto error; - - /* Sort the names by link field for fast searching. */ - qsort (list.names, list.len, sizeof (struct rpm_name), compare_links); - - /* Allocate 'apps' list. */ - apps = safe_malloc (g, sizeof *apps); - apps->len = 0; - apps->val = NULL; - - /* Read Packages database. */ - struct read_package_data data = { .list = &list, .apps = apps }; - if (guestfs___read_db_dump (g, Packages, &data, read_package) == -1) - goto error; - - free (Name); - free (Packages); - free_rpm_names_list (&list); - - return apps; - - error: - free (Name); - free (Packages); - free_rpm_names_list (&list); - if (apps != NULL) - guestfs_free_application_list (apps); - - return NULL; -} - -#endif /* defined DB_DUMP */ - -static struct guestfs_application_list * -list_applications_deb (guestfs_h *g, struct inspect_fs *fs) -{ - char *status = NULL; - status = guestfs___download_to_tmp (g, fs, "/var/lib/dpkg/status", "status", - MAX_PKG_DB_SIZE); - if (status == NULL) - return NULL; - - struct guestfs_application_list *apps = NULL, *ret = NULL; - FILE *fp = NULL; - char line[1024]; - size_t len; - char *name = NULL, *version = NULL, *release = NULL; - int installed_flag = 0; - - fp = fopen (status, "r"); - if (fp == NULL) { - perrorf (g, "fopen: %s", status); - goto out; - } - - /* Allocate 'apps' list. */ - apps = safe_malloc (g, sizeof *apps); - apps->len = 0; - apps->val = NULL; - - /* Read the temporary file. Each package entry is separated by - * a blank line. - * XXX Strictly speaking this is in mailbox header format, so it - * would be possible for fields to spread across multiple lines, - * although for the short fields that we are concerned about this is - * unlikely and not seen in practice. - */ - while (fgets (line, sizeof line, fp) != NULL) { - len = strlen (line); - if (len > 0 && line[len-1] == '\n') { - line[len-1] = '\0'; - len--; - } - - if (STRPREFIX (line, "Package: ")) { - free (name); - name = safe_strdup (g, &line[9]); - } - else if (STRPREFIX (line, "Status: ")) { - installed_flag = strstr (&line[8], "installed") != NULL; - } - else if (STRPREFIX (line, "Version: ")) { - free (version); - free (release); - char *p = strchr (&line[9], '-'); - if (p) { - *p = '\0'; - version = safe_strdup (g, &line[9]); - release = safe_strdup (g, p+1); - } else { - version = safe_strdup (g, &line[9]); - release = NULL; - } - } - else if (STREQ (line, "")) { - if (installed_flag && name && version) - add_application (g, apps, name, "", 0, version, release ? : "", - "", "", "", ""); - free (name); - free (version); - free (release); - name = version = release = NULL; - installed_flag = 0; - } - } - - if (fclose (fp) == -1) { - perrorf (g, "fclose: %s", status); - fp = NULL; - goto out; - } - fp = NULL; - - ret = apps; - - out: - if (ret == NULL && apps != NULL) - guestfs_free_application_list (apps); - if (fp) - fclose (fp); - free (name); - free (version); - free (release); - free (status); - return ret; -} - -static void list_applications_windows_from_path (guestfs_h *g, hive_h *h, struct guestfs_application_list *apps, const char **path, size_t path_len); - -static struct guestfs_application_list * -list_applications_windows (guestfs_h *g, struct inspect_fs *fs) -{ - size_t len = strlen (fs->windows_systemroot) + 64; - char software[len]; - snprintf (software, len, "%s/system32/config/software", - fs->windows_systemroot); - - char *software_path = guestfs___case_sensitive_path_silently (g, software); - if (!software_path) { - /* Missing software hive is a problem. */ - error (g, "no HKLM\\SOFTWARE hive found in the guest"); - return NULL; - } - - char *software_hive = NULL; - struct guestfs_application_list *ret = NULL; - hive_h *h = NULL; - - software_hive = guestfs___download_to_tmp (g, fs, software_path, "software", - MAX_REGISTRY_SIZE); - if (software_hive == NULL) - goto out; - - free (software_path); - software_path = NULL; - - h = hivex_open (software_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); - if (h == NULL) { - perrorf (g, "hivex_open"); - goto out; - } - - /* Allocate apps list. */ - ret = safe_malloc (g, sizeof *ret); - ret->len = 0; - ret->val = NULL; - - /* Ordinary native applications. */ - const char *hivepath[] = - { "Microsoft", "Windows", "CurrentVersion", "Uninstall" }; - list_applications_windows_from_path (g, h, ret, hivepath, - sizeof hivepath / sizeof hivepath[0]); - - /* 32-bit emulated Windows apps running on the WOW64 emulator. - * http://support.microsoft.com/kb/896459 (RHBZ#692545). - */ - const char *hivepath2[] = - { "WOW6432node", "Microsoft", "Windows", "CurrentVersion", "Uninstall" }; - list_applications_windows_from_path (g, h, ret, hivepath2, - sizeof hivepath2 / sizeof hivepath2[0]); - - out: - if (h) hivex_close (h); - free (software_path); - free (software_hive); - - return ret; -} - -static void -list_applications_windows_from_path (guestfs_h *g, hive_h *h, - struct guestfs_application_list *apps, - const char **path, size_t path_len) -{ - hive_node_h *children = NULL; - hive_node_h node; - size_t i; - - node = hivex_root (h); - - for (i = 0; node != 0 && i < path_len; ++i) - node = hivex_node_get_child (h, node, path[i]); - - if (node == 0) - return; - - children = hivex_node_children (h, node); - if (children == NULL) - return; - - /* Consider any child node that has a DisplayName key. - * See also: - * http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs#Optional_values - */ - for (i = 0; children[i] != 0; ++i) { - hive_value_h value; - char *name = NULL; - char *display_name = NULL; - char *version = NULL; - char *install_path = NULL; - char *publisher = NULL; - char *url = NULL; - char *comments = NULL; - - /* Use the node name as a proxy for the package name in Linux. The - * display name is not language-independent, so it cannot be used. - */ - name = hivex_node_name (h, children[i]); - if (name == NULL) - continue; - - value = hivex_node_get_value (h, children[i], "DisplayName"); - if (value) { - display_name = hivex_value_string (h, value); - if (display_name) { - value = hivex_node_get_value (h, children[i], "DisplayVersion"); - if (value) - version = hivex_value_string (h, value); - value = hivex_node_get_value (h, children[i], "InstallLocation"); - if (value) - install_path = hivex_value_string (h, value); - value = hivex_node_get_value (h, children[i], "Publisher"); - if (value) - publisher = hivex_value_string (h, value); - value = hivex_node_get_value (h, children[i], "URLInfoAbout"); - if (value) - url = hivex_value_string (h, value); - value = hivex_node_get_value (h, children[i], "Comments"); - if (value) - comments = hivex_value_string (h, value); - - add_application (g, apps, name, display_name, 0, - version ? : "", - "", - install_path ? : "", - publisher ? : "", - url ? : "", - comments ? : ""); - } - } - - free (name); - free (display_name); - free (version); - free (install_path); - free (publisher); - free (url); - free (comments); - } - - free (children); -} - -static void -add_application (guestfs_h *g, struct guestfs_application_list *apps, - const char *name, const char *display_name, int32_t epoch, - const char *version, const char *release, - const char *install_path, - const char *publisher, const char *url, - const char *description) -{ - apps->len++; - apps->val = safe_realloc (g, apps->val, - apps->len * sizeof (struct guestfs_application)); - apps->val[apps->len-1].app_name = safe_strdup (g, name); - apps->val[apps->len-1].app_display_name = safe_strdup (g, display_name); - apps->val[apps->len-1].app_epoch = epoch; - apps->val[apps->len-1].app_version = safe_strdup (g, version); - apps->val[apps->len-1].app_release = safe_strdup (g, release); - apps->val[apps->len-1].app_install_path = safe_strdup (g, install_path); - /* XXX Translated path is not implemented yet. */ - apps->val[apps->len-1].app_trans_path = safe_strdup (g, ""); - apps->val[apps->len-1].app_publisher = safe_strdup (g, publisher); - apps->val[apps->len-1].app_url = safe_strdup (g, url); - /* XXX The next two are not yet implemented for any package - * format, but we could easily support them for rpm and deb. - */ - apps->val[apps->len-1].app_source_package = safe_strdup (g, ""); - apps->val[apps->len-1].app_summary = safe_strdup (g, ""); - apps->val[apps->len-1].app_description = safe_strdup (g, description); -} - -/* Sort applications by name before returning the list. */ -static int -compare_applications (const void *vp1, const void *vp2) -{ - const struct guestfs_application *v1 = vp1; - const struct guestfs_application *v2 = vp2; - - return strcmp (v1->app_name, v2->app_name); -} - -static void -sort_applications (struct guestfs_application_list *apps) -{ - if (apps && apps->val) - qsort (apps->val, apps->len, sizeof (struct guestfs_application), - compare_applications); -} - -#else /* no hivex at compile time */ - -/* XXX These functions should be in an optgroup. */ - -#define NOT_IMPL(r) \ - error (g, _("inspection API not available since this version of libguestfs was compiled without the hivex library")); \ - return r - -struct guestfs_application_list * -guestfs__inspect_list_applications (guestfs_h *g, const char *root) -{ - NOT_IMPL(NULL); -} - -#endif /* no hivex at compile time */ diff --git a/src/inspect_fs.c b/src/inspect_fs.c deleted file mode 100644 index 0859a2b4..00000000 --- a/src/inspect_fs.c +++ /dev/null @@ -1,597 +0,0 @@ -/* libguestfs - * Copyright (C) 2010-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_HIVEX -#include -#endif - -#include "c-ctype.h" -#include "ignore-value.h" -#include "xstrtol.h" - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -#if defined(HAVE_HIVEX) - -/* Compile all the regular expressions once when the shared library is - * loaded. PCRE is thread safe so we're supposedly OK here if - * multiple threads call into the libguestfs API functions below - * simultaneously. - */ -static pcre *re_first_partition; -static pcre *re_major_minor; - -static void compile_regexps (void) __attribute__((constructor)); -static void free_regexps (void) __attribute__((destructor)); - -static void -compile_regexps (void) -{ - const char *err; - int offset; - -#define COMPILE(re,pattern,options) \ - do { \ - re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ - if (re == NULL) { \ - ignore_value (write (2, err, strlen (err))); \ - abort (); \ - } \ - } while (0) - - COMPILE (re_first_partition, "^/dev/(?:h|s|v)d.1$", 0); - COMPILE (re_major_minor, "(\\d+)\\.(\\d+)", 0); -} - -static void -free_regexps (void) -{ - pcre_free (re_first_partition); - pcre_free (re_major_minor); -} - -static int check_filesystem (guestfs_h *g, const char *device, int is_block, int is_partnum); -static void check_package_format (guestfs_h *g, struct inspect_fs *fs); -static void check_package_management (guestfs_h *g, struct inspect_fs *fs); -static int extend_fses (guestfs_h *g); - -/* Find out if 'device' contains a filesystem. If it does, add - * another entry in g->fses. - */ -int -guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, - int is_block, int is_partnum) -{ - /* Get vfs-type in order to check if it's a Linux(?) swap device. - * If there's an error we should ignore it, so to do that we have to - * temporarily replace the error handler with a null one. - */ - guestfs_error_handler_cb old_error_cb = g->error_cb; - g->error_cb = NULL; - char *vfs_type = guestfs_vfs_type (g, device); - g->error_cb = old_error_cb; - - int is_swap = vfs_type && STREQ (vfs_type, "swap"); - - debug (g, "check_for_filesystem_on: %s %d %d (%s)", - device, is_block, is_partnum, - vfs_type ? vfs_type : "failed to get vfs type"); - - if (is_swap) { - free (vfs_type); - if (extend_fses (g) == -1) - return -1; - g->fses[g->nr_fses-1].is_swap = 1; - return 0; - } - - /* Try mounting the device. As above, ignore errors. */ - g->error_cb = NULL; - int r; - if (vfs_type && STREQ (vfs_type, "ufs")) { /* Hack for the *BSDs. */ - /* FreeBSD fs is a variant of ufs called ufs2 ... */ - r = guestfs_mount_vfs (g, "ro,ufstype=ufs2", "ufs", device, "/"); - if (r == -1) - /* while NetBSD and OpenBSD use another variant labeled 44bsd */ - r = guestfs_mount_vfs (g, "ro,ufstype=44bsd", "ufs", device, "/"); - } else { - r = guestfs_mount_ro (g, device, "/"); - } - free (vfs_type); - g->error_cb = old_error_cb; - if (r == -1) - return 0; - - /* Do the rest of the checks. */ - r = check_filesystem (g, device, is_block, is_partnum); - - /* Unmount the filesystem. */ - if (guestfs_umount_all (g) == -1) - return -1; - - return r; -} - -/* is_block and is_partnum are just hints: is_block is true if the - * filesystem is a whole block device (eg. /dev/sda). is_partnum - * is > 0 if the filesystem is a direct partition, and in this case - * it is the partition number counting from 1 - * (eg. /dev/sda1 => is_partnum == 1). - */ -static int -check_filesystem (guestfs_h *g, const char *device, - int is_block, int is_partnum) -{ - if (extend_fses (g) == -1) - return -1; - - struct inspect_fs *fs = &g->fses[g->nr_fses-1]; - - fs->device = safe_strdup (g, device); - fs->is_mountable = 1; - - /* Optimize some of the tests by avoiding multiple tests of the same thing. */ - int is_dir_etc = guestfs_is_dir (g, "/etc") > 0; - int is_dir_bin = guestfs_is_dir (g, "/bin") > 0; - int is_dir_share = guestfs_is_dir (g, "/share") > 0; - - /* Grub /boot? */ - if (guestfs_is_file (g, "/grub/menu.lst") > 0 || - guestfs_is_file (g, "/grub/grub.conf") > 0 || - guestfs_is_file (g, "/grub2/grub.cfg") > 0) - fs->content = FS_CONTENT_LINUX_BOOT; - /* FreeBSD root? */ - else if (is_dir_etc && - is_dir_bin && - guestfs_is_file (g, "/etc/freebsd-update.conf") > 0 && - guestfs_is_file (g, "/etc/fstab") > 0) { - /* Ignore /dev/sda1 which is a shadow of the real root filesystem - * that is probably /dev/sda5 (see: - * http://www.freebsd.org/doc/handbook/disk-organization.html) - */ - if (match (g, device, re_first_partition)) - return 0; - - fs->is_root = 1; - fs->content = FS_CONTENT_FREEBSD_ROOT; - fs->format = OS_FORMAT_INSTALLED; - if (guestfs___check_freebsd_root (g, fs) == -1) - return -1; - } - else if (is_dir_etc && - is_dir_bin && - guestfs_is_file (g, "/etc/fstab") > 0 && - guestfs_is_file (g, "/etc/release") > 0) { - /* Ignore /dev/sda1 which is a shadow of the real root filesystem - * that is probably /dev/sda5 (see: - * http://www.freebsd.org/doc/handbook/disk-organization.html) - */ - if (match (g, device, re_first_partition)) - return 0; - - fs->is_root = 1; - fs->content = FS_CONTENT_NETBSD_ROOT; - fs->format = OS_FORMAT_INSTALLED; - if (guestfs___check_netbsd_root (g, fs) == -1) - return -1; - } - /* Hurd root? */ - else if (guestfs_is_file (g, "/hurd/console") > 0 && - guestfs_is_file (g, "/hurd/hello") > 0 && - guestfs_is_file (g, "/hurd/null") > 0) { - fs->is_root = 1; - fs->content = FS_CONTENT_HURD_ROOT; - fs->format = OS_FORMAT_INSTALLED; /* XXX could be more specific */ - if (guestfs___check_hurd_root (g, fs) == -1) - return -1; - } - /* Linux root? */ - else if (is_dir_etc && - (is_dir_bin || - (guestfs_is_symlink (g, "/bin") > 0 && - guestfs_is_dir (g, "/usr/bin") > 0)) && - guestfs_is_file (g, "/etc/fstab") > 0) { - fs->is_root = 1; - fs->content = FS_CONTENT_LINUX_ROOT; - fs->format = OS_FORMAT_INSTALLED; - if (guestfs___check_linux_root (g, fs) == -1) - return -1; - } - /* Linux /usr/local? */ - else if (is_dir_etc && - is_dir_bin && - is_dir_share && - guestfs_exists (g, "/local") == 0 && - guestfs_is_file (g, "/etc/fstab") == 0) - fs->content = FS_CONTENT_LINUX_USR_LOCAL; - /* Linux /usr? */ - else if (is_dir_etc && - is_dir_bin && - is_dir_share && - guestfs_exists (g, "/local") > 0 && - guestfs_is_file (g, "/etc/fstab") == 0) - fs->content = FS_CONTENT_LINUX_USR; - /* Linux /var? */ - else if (guestfs_is_dir (g, "/log") > 0 && - guestfs_is_dir (g, "/run") > 0 && - guestfs_is_dir (g, "/spool") > 0) - fs->content = FS_CONTENT_LINUX_VAR; - /* Windows root? */ - else if (guestfs___has_windows_systemroot (g) >= 0) { - fs->is_root = 1; - fs->content = FS_CONTENT_WINDOWS_ROOT; - fs->format = OS_FORMAT_INSTALLED; - if (guestfs___check_windows_root (g, fs) == -1) - return -1; - } - /* Windows volume with installed applications (but not root)? */ - else if (guestfs___is_dir_nocase (g, "/System Volume Information") > 0 && - guestfs___is_dir_nocase (g, "/Program Files") > 0) - fs->content = FS_CONTENT_WINDOWS_VOLUME_WITH_APPS; - /* Windows volume (but not root)? */ - else if (guestfs___is_dir_nocase (g, "/System Volume Information") > 0) - fs->content = FS_CONTENT_WINDOWS_VOLUME; - /* FreeDOS? */ - else if (guestfs___is_dir_nocase (g, "/FDOS") > 0 && - guestfs___is_file_nocase (g, "/FDOS/FREEDOS.BSS") > 0) { - fs->is_root = 1; - fs->content = FS_CONTENT_FREEBSD_ROOT; - fs->format = OS_FORMAT_INSTALLED; - fs->type = OS_TYPE_DOS; - fs->distro = OS_DISTRO_FREEDOS; - /* FreeDOS is a mix of 16 and 32 bit, but assume it requires a - * 32 bit i386 processor. - */ - fs->arch = safe_strdup (g, "i386"); - } - /* Install CD/disk? Skip these checks if it's not a whole device - * (eg. CD) or the first partition (eg. bootable USB key). - */ - else if ((is_block || is_partnum == 1) && - (guestfs_is_file (g, "/isolinux/isolinux.cfg") > 0 || - guestfs_is_dir (g, "/EFI/BOOT") > 0 || - guestfs_is_file (g, "/images/install.img") > 0 || - guestfs_is_dir (g, "/.disk") > 0 || - guestfs_is_file (g, "/.discinfo") > 0 || - guestfs_is_file (g, "/i386/txtsetup.sif") > 0 || - guestfs_is_file (g, "/amd64/txtsetup.sif") > 0 || - guestfs_is_file (g, "/freedos/freedos.ico") > 0)) { - fs->is_root = 1; - fs->content = FS_CONTENT_INSTALLER; - fs->format = OS_FORMAT_INSTALLER; - if (guestfs___check_installer_root (g, fs) == -1) - return -1; - } - - /* The above code should have set fs->type and fs->distro fields, so - * we can now guess the package management system. - */ - check_package_format (g, fs); - check_package_management (g, fs); - - return 0; -} - -static int -extend_fses (guestfs_h *g) -{ - size_t n = g->nr_fses + 1; - struct inspect_fs *p; - - p = realloc (g->fses, n * sizeof (struct inspect_fs)); - if (p == NULL) { - perrorf (g, "realloc"); - return -1; - } - - g->fses = p; - g->nr_fses = n; - - memset (&g->fses[n-1], 0, sizeof (struct inspect_fs)); - - return 0; -} - -int -guestfs___is_file_nocase (guestfs_h *g, const char *path) -{ - char *p; - int r; - - p = guestfs___case_sensitive_path_silently (g, path); - if (!p) - return 0; - r = guestfs_is_file (g, p); - free (p); - return r > 0; -} - -int -guestfs___is_dir_nocase (guestfs_h *g, const char *path) -{ - char *p; - int r; - - p = guestfs___case_sensitive_path_silently (g, path); - if (!p) - return 0; - r = guestfs_is_dir (g, p); - free (p); - return r > 0; -} - -/* Parse small, unsigned ints, as used in version numbers. */ -int -guestfs___parse_unsigned_int (guestfs_h *g, const char *str) -{ - long ret; - int r = xstrtol (str, NULL, 10, &ret, ""); - if (r != LONGINT_OK) { - error (g, _("could not parse integer in version number: %s"), str); - return -1; - } - return ret; -} - -/* Like parse_unsigned_int, but ignore trailing stuff. */ -int -guestfs___parse_unsigned_int_ignore_trailing (guestfs_h *g, const char *str) -{ - long ret; - int r = xstrtol (str, NULL, 10, &ret, NULL); - if (r != LONGINT_OK) { - error (g, _("could not parse integer in version number: %s"), str); - return -1; - } - return ret; -} - -/* Parse generic MAJOR.MINOR from the fs->product_name string. */ -int -guestfs___parse_major_minor (guestfs_h *g, struct inspect_fs *fs) -{ - char *major, *minor; - - if (match2 (g, fs->product_name, re_major_minor, &major, &minor)) { - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) - return -1; - } - return 0; -} - -/* At the moment, package format and package management is just a - * simple function of the distro and major_version fields, so these - * can never return an error. We might be cleverer in future. - */ -static void -check_package_format (guestfs_h *g, struct inspect_fs *fs) -{ - switch (fs->distro) { - case OS_DISTRO_FEDORA: - case OS_DISTRO_MEEGO: - case OS_DISTRO_REDHAT_BASED: - case OS_DISTRO_RHEL: - case OS_DISTRO_MAGEIA: - case OS_DISTRO_MANDRIVA: - case OS_DISTRO_OPENSUSE: - case OS_DISTRO_CENTOS: - case OS_DISTRO_SCIENTIFIC_LINUX: - fs->package_format = OS_PACKAGE_FORMAT_RPM; - break; - - case OS_DISTRO_DEBIAN: - case OS_DISTRO_UBUNTU: - case OS_DISTRO_LINUX_MINT: - fs->package_format = OS_PACKAGE_FORMAT_DEB; - break; - - case OS_DISTRO_ARCHLINUX: - fs->package_format = OS_PACKAGE_FORMAT_PACMAN; - break; - case OS_DISTRO_GENTOO: - fs->package_format = OS_PACKAGE_FORMAT_EBUILD; - break; - case OS_DISTRO_PARDUS: - fs->package_format = OS_PACKAGE_FORMAT_PISI; - break; - - case OS_DISTRO_SLACKWARE: - case OS_DISTRO_TTYLINUX: - case OS_DISTRO_WINDOWS: - case OS_DISTRO_BUILDROOT: - case OS_DISTRO_CIRROS: - case OS_DISTRO_FREEDOS: - case OS_DISTRO_UNKNOWN: - default: - fs->package_format = OS_PACKAGE_FORMAT_UNKNOWN; - break; - } -} - -static void -check_package_management (guestfs_h *g, struct inspect_fs *fs) -{ - switch (fs->distro) { - case OS_DISTRO_FEDORA: - case OS_DISTRO_MEEGO: - fs->package_management = OS_PACKAGE_MANAGEMENT_YUM; - break; - - case OS_DISTRO_REDHAT_BASED: - case OS_DISTRO_RHEL: - case OS_DISTRO_CENTOS: - case OS_DISTRO_SCIENTIFIC_LINUX: - if (fs->major_version >= 5) - fs->package_management = OS_PACKAGE_MANAGEMENT_YUM; - else - fs->package_management = OS_PACKAGE_MANAGEMENT_UP2DATE; - break; - - case OS_DISTRO_DEBIAN: - case OS_DISTRO_UBUNTU: - case OS_DISTRO_LINUX_MINT: - fs->package_management = OS_PACKAGE_MANAGEMENT_APT; - break; - - case OS_DISTRO_ARCHLINUX: - fs->package_management = OS_PACKAGE_MANAGEMENT_PACMAN; - break; - case OS_DISTRO_GENTOO: - fs->package_management = OS_PACKAGE_MANAGEMENT_PORTAGE; - break; - case OS_DISTRO_PARDUS: - fs->package_management = OS_PACKAGE_MANAGEMENT_PISI; - break; - case OS_DISTRO_MAGEIA: - case OS_DISTRO_MANDRIVA: - fs->package_management = OS_PACKAGE_MANAGEMENT_URPMI; - break; - - case OS_DISTRO_OPENSUSE: - fs->package_management = OS_PACKAGE_MANAGEMENT_ZYPPER; - break; - - case OS_DISTRO_SLACKWARE: - case OS_DISTRO_TTYLINUX: - case OS_DISTRO_WINDOWS: - case OS_DISTRO_BUILDROOT: - case OS_DISTRO_CIRROS: - case OS_DISTRO_FREEDOS: - case OS_DISTRO_UNKNOWN: - default: - fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN; - break; - } -} - -/* Get the first line of a small file, without any trailing newline - * character. - * - * NOTE: If the file is completely empty or begins with a '\n' - * character, this returns an empty string (not NULL). The caller - * will usually need to check for this case. - */ -char * -guestfs___first_line_of_file (guestfs_h *g, const char *filename) -{ - char **lines; - int64_t size; - char *ret; - - /* Don't trust guestfs_head_n not to break with very large files. - * Check the file size is something reasonable first. - */ - size = guestfs_filesize (g, filename); - if (size == -1) - /* guestfs_filesize failed and has already set error in handle */ - return NULL; - if (size > MAX_SMALL_FILE_SIZE) { - error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), - filename, size); - return NULL; - } - - lines = guestfs_head_n (g, 1, filename); - if (lines == NULL) - return NULL; - if (lines[0] == NULL) { - guestfs___free_string_list (lines); - /* Empty file: Return an empty string as explained above. */ - return safe_strdup (g, ""); - } - /* lines[1] should be NULL because of '1' argument above ... */ - - ret = lines[0]; /* caller frees */ - free (lines); /* free the array */ - - return ret; -} - -/* Get the first matching line (using guestfs_egrep{,i}) of a small file, - * without any trailing newline character. - * - * Returns: 1 = returned a line (in *ret) - * 0 = no match - * -1 = error - */ -int -guestfs___first_egrep_of_file (guestfs_h *g, const char *filename, - const char *eregex, int iflag, char **ret) -{ - char **lines; - int64_t size; - size_t i; - - /* Don't trust guestfs_egrep not to break with very large files. - * Check the file size is something reasonable first. - */ - size = guestfs_filesize (g, filename); - if (size == -1) - /* guestfs_filesize failed and has already set error in handle */ - return -1; - if (size > MAX_SMALL_FILE_SIZE) { - error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), - filename, size); - return -1; - } - - lines = (!iflag ? guestfs_egrep : guestfs_egrepi) (g, eregex, filename); - if (lines == NULL) - return -1; - if (lines[0] == NULL) { - guestfs___free_string_list (lines); - return 0; - } - - *ret = lines[0]; /* caller frees */ - - /* free up any other matches and the array itself */ - for (i = 1; lines[i] != NULL; ++i) - free (lines[i]); - free (lines); - - return 1; -} - -#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect_fs_cd.c b/src/inspect_fs_cd.c deleted file mode 100644 index 12c1a6d8..00000000 --- a/src/inspect_fs_cd.c +++ /dev/null @@ -1,485 +0,0 @@ -/* libguestfs - * Copyright (C) 2010-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_HIVEX -#include -#endif - -#include "c-ctype.h" -#include "ignore-value.h" -#include "xstrtol.h" - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -#if defined(HAVE_HIVEX) - -/* Debian/Ubuntu install disks are easy ... - * - * These files are added by the debian-cd program, and it is worth - * looking at the source code to determine exact values, in - * particular '/usr/share/debian-cd/tools/start_new_disc' - * - * XXX Architecture? We could parse it out of the product name - * string, but that seems quite hairy. We could look for the names - * of packages. Also note that some Debian install disks are - * multiarch. - */ -static int -check_debian_installer_root (guestfs_h *g, struct inspect_fs *fs) -{ - fs->product_name = guestfs___first_line_of_file (g, "/.disk/info"); - if (!fs->product_name) - return -1; - - fs->type = OS_TYPE_LINUX; - if (STRPREFIX (fs->product_name, "Ubuntu")) - fs->distro = OS_DISTRO_UBUNTU; - else if (STRPREFIX (fs->product_name, "Debian")) - fs->distro = OS_DISTRO_DEBIAN; - - (void) guestfs___parse_major_minor (g, fs); - - if (guestfs_is_file (g, "/.disk/cd_type") > 0) { - char *cd_type = guestfs___first_line_of_file (g, "/.disk/cd_type"); - if (!cd_type) - return -1; - - if (STRPREFIX (cd_type, "dvd/single") || - STRPREFIX (cd_type, "full_cd/single")) { - fs->is_multipart_disk = 0; - fs->is_netinst_disk = 0; - } - else if (STRPREFIX (cd_type, "dvd") || - STRPREFIX (cd_type, "full_cd")) { - fs->is_multipart_disk = 1; - fs->is_netinst_disk = 0; - } - else if (STRPREFIX (cd_type, "not_complete")) { - fs->is_multipart_disk = 0; - fs->is_netinst_disk = 1; - } - - free (cd_type); - } - - return 0; -} - -/* Take string which must look like "key = value" and find the value. - * There may or may not be spaces before and after the equals sign. - * This function is used by both check_fedora_installer_root and - * check_w2k3_installer_root. - */ -static const char * -find_value (const char *kv) -{ - const char *p; - - p = strchr (kv, '='); - if (!p) - abort (); - - do { - ++p; - } while (c_isspace (*p)); - - return p; -} - -/* RHEL 5 has a DVD.iso and several CD-sized -discX-ftp.iso alternatives. - * - * The DVD.iso contains: - * /.treeinfo: - * [general] - * family = Red Hat Enterprise Linux Server - * timestamp = 1328200566.61 - * totaldiscs = 1 - * version = 5.8 - * discnum = 1 - * packagedir = Server - * arch = x86_64 - * [...] - * - * /.discinfo: - * 1328205744.315196 - * Red Hat Enterprise Linux Server 5.8 # product name - * x86_64 # arch - * 1 # disk number - * Server/base - * Server/RPMS - * Server/pixmaps - * - * The alternative CD-sized ISOs contain: - * - * disc1: - * /.treeinfo: - * [general] - * family = Red Hat Enterprise Linux Server - * timestamp = 1328200566.61 - * totaldiscs = 1 - * version = 5.8 - * discnum = 1 - * packagedir = Server - * arch = x86_64 - * [...] - * - * /.discinfo: - * 1328205744.315196 - * Red Hat Enterprise Linux Server 5.8 # product name - * x86_64 # arch - * 1 # disk number - * Server/base - * Server/RPMS - * Server/pixmaps - * - * discN (N > 1): - * /.discinfo: - * 1328205744.315196 - * Red Hat Enterprise Linux Server 5.8 # product name - * x86_64 # arch - * 2 # disk number - * Server/base - * Server/RPMS - * Server/pixmaps - */ - -/* Fedora CDs and DVD (not netinst). The /.treeinfo file contains - * an initial section somewhat like this: - * - * [general] - * version = 14 - * arch = x86_64 - * family = Fedora - * variant = Fedora - * discnum = 1 - * totaldiscs = 1 - */ -static int -check_fedora_installer_root (guestfs_h *g, struct inspect_fs *fs) -{ - char *str; - const char *v; - int r; - int discnum = 0, totaldiscs = 0; - - fs->type = OS_TYPE_LINUX; - - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^family = Fedora$", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - fs->distro = OS_DISTRO_FEDORA; - free (str); - } - - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^family = Red Hat Enterprise Linux$", - 0, &str); - if (r == -1) - return -1; - if (r > 0) { - fs->distro = OS_DISTRO_RHEL; - free (str); - } - - /* XXX should do major.minor before this */ - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^version = [[:digit:]]+", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - v = find_value (str); - fs->major_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); - free (str); - if (fs->major_version == -1) - return -1; - } - - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^arch = [-_[:alnum:]]+$", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - v = find_value (str); - fs->arch = safe_strdup (g, v); - free (str); - } - - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^discnum = [[:digit:]]+$", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - v = find_value (str); - discnum = guestfs___parse_unsigned_int (g, v); - free (str); - if (discnum == -1) - return -1; - } - - r = guestfs___first_egrep_of_file (g, "/.treeinfo", - "^totaldiscs = [[:digit:]]+$", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - v = find_value (str); - totaldiscs = guestfs___parse_unsigned_int (g, v); - free (str); - if (totaldiscs == -1) - return -1; - } - - fs->is_multipart_disk = totaldiscs > 1; - /* and what about discnum? */ - - return 0; -} - -/* Linux with /isolinux/isolinux.cfg. - * - * This file is not easily parsable so we have to do our best. - * Look for the "menu title" line which contains: - * menu title Welcome to Fedora 14! # since at least Fedora 10 - * menu title Welcome to Red Hat Enterprise Linux 6.0! - * menu title Welcome to RHEL6.2-20111117.0-Workstation-x! - */ -static int -check_isolinux_installer_root (guestfs_h *g, struct inspect_fs *fs) -{ - char *str; - int r; - - fs->type = OS_TYPE_LINUX; - - r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", - "^menu title Welcome to Fedora [[:digit:]]+", - 0, &str); - if (r == -1) - return -1; - if (r > 0) { - fs->distro = OS_DISTRO_FEDORA; - fs->major_version = - guestfs___parse_unsigned_int_ignore_trailing (g, &str[29]); - free (str); - if (fs->major_version == -1) - return -1; - } - - /* XXX parse major.minor */ - r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", - "^menu title Welcome to Red Hat Enterprise Linux [[:digit:]]+", - 0, &str); - if (r == -1) - return -1; - if (r > 0) { - fs->distro = OS_DISTRO_RHEL; - fs->major_version = - guestfs___parse_unsigned_int_ignore_trailing (g, &str[47]); - free (str); - if (fs->major_version == -1) - return -1; - } - - /* XXX parse major.minor */ - r = guestfs___first_egrep_of_file (g, "/isolinux/isolinux.cfg", - "^menu title Welcome to RHEL[[:digit:]]+", - 0, &str); - if (r == -1) - return -1; - if (r > 0) { - fs->distro = OS_DISTRO_RHEL; - fs->major_version = - guestfs___parse_unsigned_int_ignore_trailing (g, &str[26]); - free (str); - if (fs->major_version == -1) - return -1; - } - - return 0; -} - -/* Windows 2003 and similar versions. - * - * NB: txtsetup file contains Windows \r\n line endings, which guestfs_grep - * does not remove. We have to remove them by hand here. - */ -static void -trim_cr (char *str) -{ - size_t n = strlen (str); - if (n > 0 && str[n-1] == '\r') - str[n-1] = '\0'; -} - -static void -trim_quot (char *str) -{ - size_t n = strlen (str); - if (n > 0 && str[n-1] == '"') - str[n-1] = '\0'; -} - -static int -check_w2k3_installer_root (guestfs_h *g, struct inspect_fs *fs, - const char *txtsetup) -{ - char *str; - const char *v; - int r; - - fs->type = OS_TYPE_WINDOWS; - fs->distro = OS_DISTRO_WINDOWS; - - r = guestfs___first_egrep_of_file (g, txtsetup, - "^productname[[:space:]]*=[[:space:]]*\"", 1, &str); - if (r == -1) - return -1; - if (r > 0) { - trim_cr (str); - trim_quot (str); - v = find_value (str); - fs->product_name = safe_strdup (g, v+1); - free (str); - } - - r = guestfs___first_egrep_of_file (g, txtsetup, - "^majorversion[[:space:]]*=[[:space:]]*[[:digit:]]+", - 1, &str); - if (r == -1) - return -1; - if (r > 0) { - trim_cr (str); - v = find_value (str); - fs->major_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); - free (str); - if (fs->major_version == -1) - return -1; - } - - r = guestfs___first_egrep_of_file (g, txtsetup, - "^minorversion[[:space:]]*=[[:space:]]*[[:digit:]]+", - 1, &str); - if (r == -1) - return -1; - if (r > 0) { - trim_cr (str); - v = find_value (str); - fs->minor_version = guestfs___parse_unsigned_int_ignore_trailing (g, v); - free (str); - if (fs->minor_version == -1) - return -1; - } - - /* This is the windows systemroot that would be chosen on - * installation by default, although not necessarily the one that - * the user will finally choose. - */ - r = guestfs___first_egrep_of_file (g, txtsetup, - "^defaultpath[[:space:]]*=[[:space:]]*", - 1, &str); - if (r == -1) - return -1; - if (r > 0) { - trim_cr (str); - v = find_value (str); - fs->windows_systemroot = safe_strdup (g, v); - free (str); - } - - return 0; -} - -/* The currently mounted device is very likely to be an installer. */ -int -guestfs___check_installer_root (guestfs_h *g, struct inspect_fs *fs) -{ - /* The presence of certain files indicates a live CD. - * - * XXX Fedora netinst contains a ~120MB squashfs called - * /images/install.img. However this is not a live CD (unlike the - * Fedora live CDs which contain the same, but larger file). We - * need to unpack this and look inside to tell the difference. - */ - if (guestfs_is_file (g, "/casper/filesystem.squashfs") > 0) - fs->is_live_disk = 1; - - /* Debian/Ubuntu. */ - if (guestfs_is_file (g, "/.disk/info") > 0) { - if (check_debian_installer_root (g, fs) == -1) - return -1; - } - - /* Fedora CDs and DVD (not netinst). */ - else if (guestfs_is_file (g, "/.treeinfo") > 0) { - if (check_fedora_installer_root (g, fs) == -1) - return -1; - } - - /* FreeDOS install CD. */ - else if (guestfs_is_file (g, "/freedos/freedos.ico") > 0 && - guestfs_is_file (g, "/setup.bat") > 0) { - fs->type = OS_TYPE_DOS; - fs->distro = OS_DISTRO_FREEDOS; - fs->arch = safe_strdup (g, "i386"); - } - - /* Linux with /isolinux/isolinux.cfg (note that non-Linux can use - * ISOLINUX too, eg. FreeDOS). - */ - else if (guestfs_is_file (g, "/isolinux/isolinux.cfg") > 0) { - if (check_isolinux_installer_root (g, fs) == -1) - return -1; - } - - /* Windows 2003 64 bit */ - else if (guestfs_is_file (g, "/amd64/txtsetup.sif") > 0) { - fs->arch = safe_strdup (g, "x86_64"); - if (check_w2k3_installer_root (g, fs, "/amd64/txtsetup.sif") == -1) - return -1; - } - - /* Windows 2003 32 bit */ - else if (guestfs_is_file (g, "/i386/txtsetup.sif") > 0) { - fs->arch = safe_strdup (g, "i386"); - if (check_w2k3_installer_root (g, fs, "/i386/txtsetup.sif") == -1) - return -1; - } - - return 0; -} - -#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c deleted file mode 100644 index 6d574292..00000000 --- a/src/inspect_fs_unix.c +++ /dev/null @@ -1,1537 +0,0 @@ -/* libguestfs - * Copyright (C) 2010-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_HIVEX -#include -#endif - -#include "c-ctype.h" -#include "ignore-value.h" -#include "xstrtol.h" -#include "hash.h" -#include "hash-pjw.h" - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -#if defined(HAVE_HIVEX) - -/* Compile all the regular expressions once when the shared library is - * loaded. PCRE is thread safe so we're supposedly OK here if - * multiple threads call into the libguestfs API functions below - * simultaneously. - */ -static pcre *re_fedora; -static pcre *re_rhel_old; -static pcre *re_rhel; -static pcre *re_rhel_no_minor; -static pcre *re_centos_old; -static pcre *re_centos; -static pcre *re_centos_no_minor; -static pcre *re_scientific_linux_old; -static pcre *re_scientific_linux; -static pcre *re_scientific_linux_no_minor; -static pcre *re_major_minor; -static pcre *re_xdev; -static pcre *re_cciss; -static pcre *re_mdN; -static pcre *re_freebsd; -static pcre *re_diskbyid; -static pcre *re_netbsd; - -static void compile_regexps (void) __attribute__((constructor)); -static void free_regexps (void) __attribute__((destructor)); - -static void -compile_regexps (void) -{ - const char *err; - int offset; - -#define COMPILE(re,pattern,options) \ - do { \ - re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ - if (re == NULL) { \ - ignore_value (write (2, err, strlen (err))); \ - abort (); \ - } \ - } while (0) - - COMPILE (re_fedora, "Fedora release (\\d+)", 0); - COMPILE (re_rhel_old, - "Red Hat.*release (\\d+).*Update (\\d+)", 0); - COMPILE (re_rhel, - "Red Hat.*release (\\d+)\\.(\\d+)", 0); - COMPILE (re_rhel_no_minor, - "Red Hat.*release (\\d+)", 0); - COMPILE (re_centos_old, - "CentOS.*release (\\d+).*Update (\\d+)", 0); - COMPILE (re_centos, - "CentOS.*release (\\d+)\\.(\\d+)", 0); - COMPILE (re_centos_no_minor, - "CentOS.*release (\\d+)", 0); - COMPILE (re_scientific_linux_old, - "Scientific Linux.*release (\\d+).*Update (\\d+)", 0); - COMPILE (re_scientific_linux, - "Scientific Linux.*release (\\d+)\\.(\\d+)", 0); - COMPILE (re_scientific_linux_no_minor, - "Scientific Linux.*release (\\d+)", 0); - COMPILE (re_major_minor, "(\\d+)\\.(\\d+)", 0); - COMPILE (re_xdev, "^/dev/(h|s|v|xv)d([a-z]+)(\\d*)$", 0); - COMPILE (re_cciss, "^/dev/(cciss/c\\d+d\\d+)(?:p(\\d+))?$", 0); - COMPILE (re_mdN, "^(/dev/md\\d+)$", 0); - COMPILE (re_freebsd, "^/dev/ad(\\d+)s(\\d+)([a-z])$", 0); - COMPILE (re_diskbyid, "^/dev/disk/by-id/.*-part(\\d+)$", 0); - COMPILE (re_netbsd, "^NetBSD (\\d+)\\.(\\d+)", 0); -} - -static void -free_regexps (void) -{ - pcre_free (re_fedora); - pcre_free (re_rhel_old); - pcre_free (re_rhel); - pcre_free (re_rhel_no_minor); - pcre_free (re_centos_old); - pcre_free (re_centos); - pcre_free (re_centos_no_minor); - pcre_free (re_scientific_linux_old); - pcre_free (re_scientific_linux); - pcre_free (re_scientific_linux_no_minor); - pcre_free (re_major_minor); - pcre_free (re_xdev); - pcre_free (re_cciss); - pcre_free (re_mdN); - pcre_free (re_freebsd); - pcre_free (re_diskbyid); - pcre_free (re_netbsd); -} - -static void check_architecture (guestfs_h *g, struct inspect_fs *fs); -static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); -static int check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs); -static int check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs); -static int check_fstab (guestfs_h *g, struct inspect_fs *fs); -static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, - const char *spec, const char *mp, - Hash_table *md_map); -static char *resolve_fstab_device (guestfs_h *g, const char *spec, - Hash_table *md_map); -static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); -static int is_partition (guestfs_h *g, const char *partition); - -/* Hash structure for uuid->path lookups */ -typedef struct md_uuid { - uint32_t uuid[4]; - char *path; -} md_uuid; - -static size_t uuid_hash(const void *x, size_t table_size); -static bool uuid_cmp(const void *x, const void *y); -static void md_uuid_free(void *x); - -static int parse_uuid(const char *str, uint32_t *uuid); - -/* Hash structure for path(mdadm)->path(appliance) lookup */ -typedef struct { - char *mdadm; - char *app; -} mdadm_app; - -static size_t mdadm_app_hash(const void *x, size_t table_size); -static bool mdadm_app_cmp(const void *x, const void *y); -static void mdadm_app_free(void *x); - -static ssize_t map_app_md_devices (guestfs_h *g, Hash_table **map); -static int map_md_devices(guestfs_h *g, Hash_table **map); - -/* Set fs->product_name to the first line of the release file. */ -static int -parse_release_file (guestfs_h *g, struct inspect_fs *fs, - const char *release_filename) -{ - fs->product_name = guestfs___first_line_of_file (g, release_filename); - if (fs->product_name == NULL) - return -1; - if (STREQ (fs->product_name, "")) { - free (fs->product_name); - fs->product_name = NULL; - error (g, _("release file %s is empty or malformed"), release_filename); - return -1; - } - return 0; -} - -/* Ubuntu has /etc/lsb-release containing: - * DISTRIB_ID=Ubuntu # Distro - * DISTRIB_RELEASE=10.04 # Version - * DISTRIB_CODENAME=lucid - * DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" # Product name - * - * [Ubuntu-derived ...] Linux Mint was found to have this: - * DISTRIB_ID=LinuxMint - * DISTRIB_RELEASE=10 - * DISTRIB_CODENAME=julia - * DISTRIB_DESCRIPTION="Linux Mint 10 Julia" - * Linux Mint also has /etc/linuxmint/info with more information, - * but we can use the LSB file. - * - * Mandriva has: - * LSB_VERSION=lsb-4.0-amd64:lsb-4.0-noarch - * DISTRIB_ID=MandrivaLinux - * DISTRIB_RELEASE=2010.1 - * DISTRIB_CODENAME=Henry_Farman - * DISTRIB_DESCRIPTION="Mandriva Linux 2010.1" - * Mandriva also has a normal release file called /etc/mandriva-release. - */ -static int -parse_lsb_release (guestfs_h *g, struct inspect_fs *fs) -{ - const char *filename = "/etc/lsb-release"; - int64_t size; - char **lines; - size_t i; - int r = 0; - - /* Don't trust guestfs_head_n not to break with very large files. - * Check the file size is something reasonable first. - */ - size = guestfs_filesize (g, filename); - if (size == -1) - /* guestfs_filesize failed and has already set error in handle */ - return -1; - if (size > MAX_SMALL_FILE_SIZE) { - error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), - filename, size); - return -1; - } - - lines = guestfs_head_n (g, 10, filename); - if (lines == NULL) - return -1; - - for (i = 0; lines[i] != NULL; ++i) { - if (fs->distro == 0 && - STREQ (lines[i], "DISTRIB_ID=Ubuntu")) { - fs->distro = OS_DISTRO_UBUNTU; - r = 1; - } - else if (fs->distro == 0 && - STREQ (lines[i], "DISTRIB_ID=LinuxMint")) { - fs->distro = OS_DISTRO_LINUX_MINT; - r = 1; - } - else if (fs->distro == 0 && - STREQ (lines[i], "DISTRIB_ID=MandrivaLinux")) { - fs->distro = OS_DISTRO_MANDRIVA; - r = 1; - } - else if (fs->distro == 0 && - STREQ (lines[i], "DISTRIB_ID=\"Mageia\"")) { - fs->distro = OS_DISTRO_MAGEIA; - r = 1; - } - else if (STRPREFIX (lines[i], "DISTRIB_RELEASE=")) { - char *major, *minor; - if (match2 (g, &lines[i][16], re_major_minor, &major, &minor)) { - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - guestfs___free_string_list (lines); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) { - guestfs___free_string_list (lines); - return -1; - } - } - } - else if (fs->product_name == NULL && - (STRPREFIX (lines[i], "DISTRIB_DESCRIPTION=\"") || - STRPREFIX (lines[i], "DISTRIB_DESCRIPTION='"))) { - size_t len = strlen (lines[i]) - 21 - 1; - fs->product_name = safe_strndup (g, &lines[i][21], len); - r = 1; - } - else if (fs->product_name == NULL && - STRPREFIX (lines[i], "DISTRIB_DESCRIPTION=")) { - size_t len = strlen (lines[i]) - 20; - fs->product_name = safe_strndup (g, &lines[i][20], len); - r = 1; - } - } - - guestfs___free_string_list (lines); - - /* The unnecessary construct in the next line is required to - * workaround -Wstrict-overflow warning in gcc 4.5.1. - */ - return r ? 1 : 0; -} - -/* The currently mounted device is known to be a Linux root. Try to - * determine from this the distro, version, etc. Also parse - * /etc/fstab to determine the arrangement of mountpoints and - * associated devices. - */ -int -guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs) -{ - int r; - - fs->type = OS_TYPE_LINUX; - - if (guestfs_exists (g, "/etc/lsb-release") > 0) { - r = parse_lsb_release (g, fs); - if (r == -1) /* error */ - return -1; - if (r == 1) /* ok - detected the release from this file */ - goto skip_release_checks; - } - - if (guestfs_exists (g, "/etc/redhat-release") > 0) { - fs->distro = OS_DISTRO_REDHAT_BASED; /* Something generic Red Hat-like. */ - - if (parse_release_file (g, fs, "/etc/redhat-release") == -1) - return -1; - - char *major, *minor; - if ((major = match1 (g, fs->product_name, re_fedora)) != NULL) { - fs->distro = OS_DISTRO_FEDORA; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) - return -1; - } - else if (match2 (g, fs->product_name, re_rhel_old, &major, &minor) || - match2 (g, fs->product_name, re_rhel, &major, &minor)) { - fs->distro = OS_DISTRO_RHEL; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) - return -1; - } - else if ((major = match1 (g, fs->product_name, re_rhel_no_minor)) != NULL) { - fs->distro = OS_DISTRO_RHEL; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) - return -1; - fs->minor_version = 0; - } - else if (match2 (g, fs->product_name, re_centos_old, &major, &minor) || - match2 (g, fs->product_name, re_centos, &major, &minor)) { - fs->distro = OS_DISTRO_CENTOS; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) - return -1; - } - else if ((major = match1 (g, fs->product_name, re_centos_no_minor)) != NULL) { - fs->distro = OS_DISTRO_CENTOS; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) - return -1; - fs->minor_version = 0; - } - else if (match2 (g, fs->product_name, re_scientific_linux_old, &major, &minor) || - match2 (g, fs->product_name, re_scientific_linux, &major, &minor)) { - fs->distro = OS_DISTRO_SCIENTIFIC_LINUX; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) - return -1; - } - else if ((major = match1 (g, fs->product_name, re_scientific_linux_no_minor)) != NULL) { - fs->distro = OS_DISTRO_SCIENTIFIC_LINUX; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) - return -1; - fs->minor_version = 0; - } - } - else if (guestfs_exists (g, "/etc/debian_version") > 0) { - fs->distro = OS_DISTRO_DEBIAN; - - if (parse_release_file (g, fs, "/etc/debian_version") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/pardus-release") > 0) { - fs->distro = OS_DISTRO_PARDUS; - - if (parse_release_file (g, fs, "/etc/pardus-release") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/arch-release") > 0) { - fs->distro = OS_DISTRO_ARCHLINUX; - - /* /etc/arch-release file is empty and I can't see a way to - * determine the actual release or product string. - */ - } - else if (guestfs_exists (g, "/etc/gentoo-release") > 0) { - fs->distro = OS_DISTRO_GENTOO; - - if (parse_release_file (g, fs, "/etc/gentoo-release") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/meego-release") > 0) { - fs->distro = OS_DISTRO_MEEGO; - - if (parse_release_file (g, fs, "/etc/meego-release") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/slackware-version") > 0) { - fs->distro = OS_DISTRO_SLACKWARE; - - if (parse_release_file (g, fs, "/etc/slackware-version") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/ttylinux-target") > 0) { - fs->distro = OS_DISTRO_TTYLINUX; - - if (parse_release_file (g, fs, "/etc/ttylinux-target") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - else if (guestfs_exists (g, "/etc/SuSE-release") > 0) { - fs->distro = OS_DISTRO_OPENSUSE; - - if (parse_release_file (g, fs, "/etc/SuSE-release") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - /* Buildroot (http://buildroot.net) is an embedded Linux distro - * toolkit. It is used by specific distros such as Cirros. - */ - else if (guestfs_exists (g, "/etc/br-version") > 0) { - if (guestfs_exists (g, "/usr/share/cirros/logo") > 0) - fs->distro = OS_DISTRO_CIRROS; - else - fs->distro = OS_DISTRO_BUILDROOT; - - /* /etc/br-version has the format YYYY.MM[-git/hg/svn release] */ - if (parse_release_file (g, fs, "/etc/br-version") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - - skip_release_checks:; - - /* Determine the architecture. */ - check_architecture (g, fs); - - /* We already know /etc/fstab exists because it's part of the test - * for Linux root above. We must now parse this file to determine - * which filesystems are used by the operating system and how they - * are mounted. - */ - const char *configfiles[] = { "/etc/fstab", "/etc/mdadm.conf", NULL }; - if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) - return -1; - - /* Determine hostname. */ - if (check_hostname_unix (g, fs) == -1) - return -1; - - return 0; -} - -/* The currently mounted device is known to be a FreeBSD root. */ -int -guestfs___check_freebsd_root (guestfs_h *g, struct inspect_fs *fs) -{ - fs->type = OS_TYPE_FREEBSD; - - /* FreeBSD has no authoritative version file. The version number is - * in /etc/motd, which the system administrator might edit, but - * we'll use that anyway. - */ - - if (guestfs_exists (g, "/etc/motd") > 0) { - if (parse_release_file (g, fs, "/etc/motd") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - - /* Determine the architecture. */ - check_architecture (g, fs); - - /* We already know /etc/fstab exists because it's part of the test above. */ - const char *configfiles[] = { "/etc/fstab", NULL }; - if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) - return -1; - - /* Determine hostname. */ - if (check_hostname_unix (g, fs) == -1) - return -1; - - return 0; -} - -/* The currently mounted device is maybe to be a *BSD root. */ -int -guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) -{ - - if (guestfs_exists (g, "/etc/release") > 0) { - char *major, *minor; - if (parse_release_file (g, fs, "/etc/release") == -1) - return -1; - - if (match2 (g, fs->product_name, re_netbsd, &major, &minor)) { - fs->type = OS_TYPE_NETBSD; - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - return -1; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) - return -1; - } - } else { - return -1; - } - - /* Determine the architecture. */ - check_architecture (g, fs); - - /* We already know /etc/fstab exists because it's part of the test above. */ - const char *configfiles[] = { "/etc/fstab", NULL }; - if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) - return -1; - - /* Determine hostname. */ - if (check_hostname_unix (g, fs) == -1) - return -1; - - return 0; -} - -/* The currently mounted device may be a Hurd root. Hurd has distros - * just like Linux. - */ -int -guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs) -{ - fs->type = OS_TYPE_HURD; - - if (guestfs_exists (g, "/etc/debian_version") > 0) { - fs->distro = OS_DISTRO_DEBIAN; - - if (parse_release_file (g, fs, "/etc/debian_version") == -1) - return -1; - - if (guestfs___parse_major_minor (g, fs) == -1) - return -1; - } - - /* Arch Hurd also exists, but inconveniently it doesn't have - * the normal /etc/arch-release file. XXX - */ - - /* Determine the architecture. */ - check_architecture (g, fs); - - /* XXX Check for /etc/fstab. */ - - /* Determine hostname. */ - if (check_hostname_unix (g, fs) == -1) - return -1; - - return 0; -} - -static void -check_architecture (guestfs_h *g, struct inspect_fs *fs) -{ - const char *binaries[] = - { "/bin/bash", "/bin/ls", "/bin/echo", "/bin/rm", "/bin/sh" }; - size_t i; - - for (i = 0; i < sizeof binaries / sizeof binaries[0]; ++i) { - if (guestfs_is_file (g, binaries[i]) > 0) { - /* Ignore errors from file_architecture call. */ - guestfs_error_handler_cb old_error_cb = g->error_cb; - g->error_cb = NULL; - char *arch = guestfs_file_architecture (g, binaries[i]); - g->error_cb = old_error_cb; - - if (arch) { - /* String will be owned by handle, freed by - * guestfs___free_inspect_info. - */ - fs->arch = arch; - break; - } - } - } -} - -/* Try several methods to determine the hostname from a Linux or - * FreeBSD guest. Note that type and distro have been set, so we can - * use that information to direct the search. - */ -static int -check_hostname_unix (guestfs_h *g, struct inspect_fs *fs) -{ - switch (fs->type) { - case OS_TYPE_LINUX: - case OS_TYPE_HURD: - /* Red Hat-derived would be in /etc/sysconfig/network, and - * Debian-derived in the file /etc/hostname. Very old Debian and - * SUSE use /etc/HOSTNAME. It's best to just look for each of - * these files in turn, rather than try anything clever based on - * distro. - */ - if (guestfs_is_file (g, "/etc/HOSTNAME")) { - fs->hostname = guestfs___first_line_of_file (g, "/etc/HOSTNAME"); - if (fs->hostname == NULL) - return -1; - if (STREQ (fs->hostname, "")) { - free (fs->hostname); - fs->hostname = NULL; - } - } - - if (!fs->hostname && guestfs_is_file (g, "/etc/hostname")) { - fs->hostname = guestfs___first_line_of_file (g, "/etc/hostname"); - if (fs->hostname == NULL) - return -1; - if (STREQ (fs->hostname, "")) { - free (fs->hostname); - fs->hostname = NULL; - } - } - - if (!fs->hostname && guestfs_is_file (g, "/etc/sysconfig/network")) { - const char *configfiles[] = { "/etc/sysconfig/network", NULL }; - if (inspect_with_augeas (g, fs, configfiles, - check_hostname_redhat) == -1) - return -1; - } - break; - - case OS_TYPE_FREEBSD: - case OS_TYPE_NETBSD: - /* /etc/rc.conf contains the hostname, but there is no Augeas lens - * for this file. - */ - if (guestfs_is_file (g, "/etc/rc.conf")) { - if (check_hostname_freebsd (g, fs) == -1) - return -1; - } - break; - - case OS_TYPE_WINDOWS: /* not here, see check_windows_system_registry */ - case OS_TYPE_DOS: - case OS_TYPE_UNKNOWN: - default: - /* nothing, keep GCC warnings happy */; - } - - return 0; -} - -/* Parse the hostname from /etc/sysconfig/network. This must be called - * from the inspect_with_augeas wrapper. - */ -static int -check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs) -{ - char *hostname; - - /* Errors here are not fatal (RHBZ#726739), since it could be - * just missing HOSTNAME field in the file. - */ - guestfs_error_handler_cb old_error_cb = g->error_cb; - g->error_cb = NULL; - hostname = guestfs_aug_get (g, "/files/etc/sysconfig/network/HOSTNAME"); - g->error_cb = old_error_cb; - - /* This is freed by guestfs___free_inspect_info. Note that hostname - * could be NULL because we ignored errors above. - */ - fs->hostname = hostname; - return 0; -} - -/* Parse the hostname from /etc/rc.conf. On FreeBSD this file - * contains comments, blank lines and: - * hostname="freebsd8.example.com" - * ifconfig_re0="DHCP" - * keymap="uk.iso" - * sshd_enable="YES" - */ -static int -check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs) -{ - const char *filename = "/etc/rc.conf"; - int64_t size; - char **lines; - size_t i; - - /* Don't trust guestfs_read_lines not to break with very large files. - * Check the file size is something reasonable first. - */ - size = guestfs_filesize (g, filename); - if (size == -1) - /* guestfs_filesize failed and has already set error in handle */ - return -1; - if (size > MAX_SMALL_FILE_SIZE) { - error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), - filename, size); - return -1; - } - - lines = guestfs_read_lines (g, filename); - if (lines == NULL) - return -1; - - for (i = 0; lines[i] != NULL; ++i) { - if (STRPREFIX (lines[i], "hostname=\"") || - STRPREFIX (lines[i], "hostname='")) { - size_t len = strlen (lines[i]) - 10 - 1; - fs->hostname = safe_strndup (g, &lines[i][10], len); - break; - } else if (STRPREFIX (lines[i], "hostname=")) { - size_t len = strlen (lines[i]) - 9; - fs->hostname = safe_strndup (g, &lines[i][9], len); - break; - } - } - - guestfs___free_string_list (lines); - return 0; -} - -static int -check_fstab (guestfs_h *g, struct inspect_fs *fs) -{ - char **entries, **entry; - char augpath[256]; - char *spec, *mp; - int r; - - /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device - * paths in the guestfs appliance */ - Hash_table *md_map; - if (map_md_devices (g, &md_map) == -1) return -1; - - entries = guestfs_aug_match (g, "/files/etc/fstab/*[label() != '#comment']"); - if (entries == NULL) goto error; - - if (entries[0] == NULL) { - error (g, _("could not parse /etc/fstab or empty file")); - goto error; - } - - for (entry = entries; *entry != NULL; entry++) { - snprintf (augpath, sizeof augpath, "%s/spec", *entry); - spec = guestfs_aug_get (g, augpath); - if (spec == NULL) goto error; - - snprintf (augpath, sizeof augpath, "%s/file", *entry); - mp = guestfs_aug_get (g, augpath); - if (mp == NULL) { - free (spec); - goto error; - } - - r = add_fstab_entry (g, fs, spec, mp, md_map); - free (spec); - free (mp); - - if (r == -1) goto error; - } - - if (md_map) hash_free (md_map); - guestfs___free_string_list (entries); - return 0; - -error: - if (md_map) hash_free (md_map); - if (entries) guestfs___free_string_list (entries); - return -1; -} - -/* Add a filesystem and possibly a mountpoint entry for - * the root filesystem 'fs'. - * - * 'spec' is the fstab spec field, which might be a device name or a - * pseudodevice or 'UUID=...' or 'LABEL=...'. - * - * 'mp' is the mount point, which could also be 'swap' or 'none'. - */ -static int -add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, - const char *spec, const char *mp, Hash_table *md_map) -{ - /* Ignore certain mountpoints. */ - if (STRPREFIX (mp, "/dev/") || - STREQ (mp, "/dev") || - STRPREFIX (mp, "/media/") || - STRPREFIX (mp, "/proc/") || - STREQ (mp, "/proc") || - STRPREFIX (mp, "/selinux/") || - STREQ (mp, "/selinux") || - STRPREFIX (mp, "/sys/") || - STREQ (mp, "/sys")) - return 0; - - /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives. */ - if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) || - STREQ (spec, "/dev/floppy") || - STREQ (spec, "/dev/cdrom")) - return 0; - - /* Resolve UUID= and LABEL= to the actual device. */ - char *device = NULL; - if (STRPREFIX (spec, "UUID=")) - device = guestfs_findfs_uuid (g, &spec[5]); - else if (STRPREFIX (spec, "LABEL=")) - device = guestfs_findfs_label (g, &spec[6]); - /* Ignore "/.swap" (Pardus) and pseudo-devices like "tmpfs". */ - else if (STREQ (spec, "/dev/root")) - /* Resolve /dev/root to the current device. */ - device = safe_strdup (g, fs->device); - else if (STRPREFIX (spec, "/dev/")) - /* Resolve guest block device names. */ - device = resolve_fstab_device (g, spec, md_map); - - /* If we haven't resolved the device successfully by this point, - * we don't care, just ignore it. - */ - if (device == NULL) - return 0; - - char *mountpoint = safe_strdup (g, mp); - - /* Add this to the fstab entry in 'fs'. - * Note these are further filtered by guestfs_inspect_get_mountpoints - * and guestfs_inspect_get_filesystems. - */ - size_t n = fs->nr_fstab + 1; - struct inspect_fstab_entry *p; - - p = realloc (fs->fstab, n * sizeof (struct inspect_fstab_entry)); - if (p == NULL) { - perrorf (g, "realloc"); - free (device); - free (mountpoint); - return -1; - } - - fs->fstab = p; - fs->nr_fstab = n; - - /* These are owned by the handle and freed by guestfs___free_inspect_info. */ - fs->fstab[n-1].device = device; - fs->fstab[n-1].mountpoint = mountpoint; - - debug (g, "fstab: device=%s mountpoint=%s", device, mountpoint); - - return 0; -} - -/* Compute a uuid hash as a simple xor of of its 4 32bit components */ -static size_t -uuid_hash(const void *x, size_t table_size) -{ - const md_uuid *a = x; - - size_t h = a->uuid[0]; - for (size_t i = 1; i < 4; i++) { - h ^= a->uuid[i]; - } - - return h % table_size; -} - -static bool -uuid_cmp(const void *x, const void *y) -{ - const md_uuid *a = x; - const md_uuid *b = y; - - for (size_t i = 0; i < 1; i++) { - if (a->uuid[i] != b->uuid[i]) return 0; - } - - return 1; -} - -static void -md_uuid_free(void *x) -{ - md_uuid *a = x; - free(a->path); - free(a); -} - -/* Taken from parse_uuid in mdadm */ -static int -parse_uuid (const char *str, uint32_t *uuid) -{ - size_t hit = 0; /* number of Hex digIT */ - char c; - size_t i; - int n; - - for (i = 0; i < 4; i++) - uuid[i] = 0; - - while ((c = *str++)) { - if (c >= '0' && c <= '9') - n = c - '0'; - else if (c >= 'a' && c <= 'f') - n = 10 + c - 'a'; - else if (c >= 'A' && c <= 'F') - n = 10 + c - 'A'; - else if (strchr (":. -", c)) - continue; - else - return -1; - - if (hit < 32) { - uuid[hit / 8] <<= 4; - uuid[hit / 8] += n; - } - hit++; - } - if (hit == 32) return 0; - - return -1; -} - -/* Create a mapping of uuids to appliance md device names */ -static ssize_t -map_app_md_devices (guestfs_h *g, Hash_table **map) -{ - char **mds = NULL; - size_t n = 0; - - /* A hash mapping uuids to md device names */ - *map = hash_initialize(16, NULL, uuid_hash, uuid_cmp, md_uuid_free); - if (*map == NULL) g->abort_cb(); - - mds = guestfs_list_md_devices(g); - if (mds == NULL) goto error; - - for (char **md = mds; *md != NULL; md++) { - char **detail = guestfs_md_detail(g, *md); - if (detail == NULL) goto error; - - /* Iterate over keys until we find uuid */ - char **i; - for (i = detail; *i != NULL; i += 2) { - if (STREQ(*i, "uuid")) break; - } - - /* We found it */ - if (*i) { - /* Next item is the uuid value */ - i++; - - md_uuid *entry = safe_malloc(g, sizeof(md_uuid)); - entry->path = safe_strdup(g, *md); - - if (parse_uuid(*i, entry->uuid) == -1) { - /* Invalid UUID is weird, but not fatal. */ - debug(g, "inspect-os: guestfs_md_detail returned invalid " - "uuid for %s: %s", *md, *i); - guestfs___free_string_list(detail); - md_uuid_free(entry); - continue; - } - - const void *matched = NULL; - switch (hash_insert_if_absent(*map, entry, &matched)) { - case -1: - g->abort_cb(); - - case 0: - /* Duplicate uuid in for md device is weird, but not fatal. */ - debug(g, "inspect-os: md devices %s and %s have the same uuid", - ((md_uuid *)matched)->path, entry->path); - md_uuid_free(entry); - break; - - default: - n++; - } - } - - guestfs___free_string_list(detail); - } - - guestfs___free_string_list(mds); - - return n; - -error: - hash_free(*map); *map = NULL; - guestfs___free_string_list(mds); - - return -1; -} - -static size_t -mdadm_app_hash(const void *x, size_t table_size) -{ - const mdadm_app *a = x; - return hash_pjw(a->mdadm, table_size); -} - -static bool -mdadm_app_cmp(const void *x, const void *y) -{ - const mdadm_app *a = x; - const mdadm_app *b = y; - - return strcmp(a->mdadm, b->mdadm) == 0; -} - -static void -mdadm_app_free(void *x) -{ - mdadm_app *a = x; - free(a->mdadm); - free(a->app); - free(a); -} - -/* Get a map of md device names in mdadm.conf to their device names in the - * appliance */ -static int -map_md_devices(guestfs_h *g, Hash_table **map) -{ - Hash_table *app_map = NULL; - char **matches = NULL; - ssize_t n_app_md_devices; - - *map = NULL; - - /* Get a map of md device uuids to their device names in the appliance */ - n_app_md_devices = map_app_md_devices (g, &app_map); - if (n_app_md_devices == -1) goto error; - - /* Nothing to do if there are no md devices */ - if (n_app_md_devices == 0) { - hash_free(app_map); - return 0; - } - - /* Get all arrays listed in mdadm.conf */ - matches = guestfs_aug_match(g, "/files/etc/mdadm.conf/array"); - if (!matches) goto error; - - /* Log a debug message if we've got md devices, but nothing in mdadm.conf */ - if (matches[0] == NULL) { - debug(g, "Appliance has MD devices, but augeas returned no array matches " - "in mdadm.conf"); - guestfs___free_string_list(matches); - hash_free(app_map); - return 0; - } - - *map = hash_initialize(16, NULL, mdadm_app_hash, mdadm_app_cmp, - mdadm_app_free); - if (!*map) g->abort_cb(); - - for (char **match = matches; *match != NULL; match++) { - /* Get device name and uuid for each array */ - char *dev_path = safe_asprintf(g, "%s/devicename", *match); - char *dev = guestfs_aug_get(g, dev_path); - free(dev_path); - if (!dev) goto error; - - char *uuid_path = safe_asprintf(g, "%s/uuid", *match); - char *uuid = guestfs_aug_get(g, uuid_path); - free(uuid_path); - if (!uuid) { - free(dev); - continue; - } - - /* Parse the uuid into an md_uuid structure so we can look it up in the - * uuid->appliance device map */ - md_uuid mdadm; - mdadm.path = dev; - if (parse_uuid(uuid, mdadm.uuid) == -1) { - /* Invalid uuid. Weird, but not fatal. */ - debug(g, "inspect-os: mdadm.conf contains invalid uuid for %s: %s", - dev, uuid); - free(dev); - free(uuid); - continue; - } - free(uuid); - - /* If there's a corresponding uuid in the appliance, create a new - * entry in the transitive map */ - md_uuid *app = hash_lookup(app_map, &mdadm); - if (app) { - mdadm_app *entry = safe_malloc(g, sizeof(mdadm_app)); - entry->mdadm = dev; - entry->app = safe_strdup(g, app->path); - - switch (hash_insert_if_absent(*map, entry, NULL)) { - case -1: - g->abort_cb(); - - case 0: - /* Duplicate uuid in for md device is weird, but not fatal. */ - debug(g, "inspect-os: mdadm.conf contains multiple entries for %s", - app->path); - mdadm_app_free(entry); - continue; - - default: - ;; - } - } else { - free(dev); - } - } - - hash_free(app_map); - guestfs___free_string_list(matches); - - return 0; - -error: - if (app_map) hash_free(app_map); - if (matches) guestfs___free_string_list(matches); - if (*map) hash_free(*map); - - return -1; -} - -static int -resolve_fstab_device_xdev (guestfs_h *g, const char *type, const char *disk, - const char *part, char **device_ret) -{ - char *name, *device; - char **devices; - size_t i, count; - struct drive *drive; - const char *p; - - /* type: (h|s|v|xv) - * disk: ([a-z]+) - * part: (\d*) - */ - - devices = guestfs_list_devices (g); - if (devices == NULL) - return -1; - - /* Check any hints we were passed for a non-heuristic mapping */ - name = safe_asprintf (g, "%sd%s", type, disk); - i = 0; - drive = g->drives; - while (drive) { - if (drive->name && STREQ (drive->name, name)) { - device = safe_asprintf (g, "%s%s", devices[i], part); - if (!is_partition (g, device)) { - free (device); - goto out; - } - *device_ret = device; - break; - } - - i++; drive = drive->next; - } - free (name); - - /* Guess the appliance device name if we didn't find a matching hint */ - if (!*device_ret) { - /* Count how many disks the libguestfs appliance has */ - for (count = 0; devices[count] != NULL; count++) - ; - - /* Calculate the numerical index of the disk */ - i = disk[0] - 'a'; - for (p = disk + 1; *p != '\0'; p++) { - i += 1; i *= 26; - i += *p - 'a'; - } - - /* Check the index makes sense wrt the number of disks the appliance has. - * If it does, map it to an appliance disk. - */ - if (i < count) { - device = safe_asprintf (g, "%s%s", devices[i], part); - if (!is_partition (g, device)) { - free (device); - goto out; - } - *device_ret = device; - } - } - - out: - guestfs___free_string_list (devices); - return 0; -} - -static int -resolve_fstab_device_cciss (guestfs_h *g, const char *disk, const char *part, - char **device_ret) -{ - char *device; - char **devices; - size_t i; - struct drive *drive; - - /* disk: (cciss/c\d+d\d+) - * part: (\d+)? - */ - - devices = guestfs_list_devices (g); - if (devices == NULL) - return -1; - - /* Check any hints we were passed for a non-heuristic mapping */ - i = 0; - drive = g->drives; - while (drive) { - if (drive->name && STREQ(drive->name, disk)) { - if (part) { - device = safe_asprintf (g, "%s%s", devices[i], part); - if (!is_partition (g, device)) { - free (device); - goto out; - } - *device_ret = device; - } - else - *device_ret = safe_strdup (g, devices[i]); - break; - } - - i++; drive = drive->next; - } - - /* We don't try to guess mappings for cciss devices */ - - out: - guestfs___free_string_list (devices); - return 0; -} - -static int -resolve_fstab_device_diskbyid (guestfs_h *g, const char *part, - char **device_ret) -{ - int nr_devices; - char *device; - - /* For /dev/disk/by-id there is a limit to what we can do because - * original SCSI ID information has likely been lost. This - * heuristic will only work for guests that have a single block - * device. - * - * So the main task here is to make sure the assumptions above are - * true. - * - * XXX Use hints from virt-p2v if available. - * See also: https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3 - */ - - nr_devices = guestfs_nr_devices (g); - if (nr_devices == -1) - return -1; - - /* If #devices isn't 1, give up trying to translate this fstab entry. */ - if (nr_devices != 1) - return 0; - - /* Make the partition name and check it exists. */ - device = safe_asprintf (g, "/dev/sda%s", part); - if (!is_partition (g, device)) { - free (device); - return 0; - } - - *device_ret = device; - return 0; -} - -/* Resolve block device name to the libguestfs device name, eg. - * /dev/xvdb1 => /dev/vdb1; and /dev/mapper/VG-LV => /dev/VG/LV. This - * assumes that disks were added in the same order as they appear to - * the real VM, which is a reasonable assumption to make. Return - * anything we don't recognize unchanged. - */ -static char * -resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) -{ - char *device = NULL; - char *type, *slice, *disk, *part; - int r; - - if (STRPREFIX (spec, "/dev/mapper/") && guestfs_exists (g, spec) > 0) { - /* LVM2 does some strange munging on /dev/mapper paths for VGs and - * LVs which contain '-' character: - * - * > lvcreate LV--test VG--test 32 - * > debug ls /dev/mapper - * VG----test-LV----test - * - * This makes it impossible to reverse those paths directly, so - * we have implemented lvm_canonical_lv_name in the daemon. - */ - device = guestfs_lvm_canonical_lv_name (g, spec); - } - else if (match3 (g, spec, re_xdev, &type, &disk, &part)) { - r = resolve_fstab_device_xdev (g, type, disk, part, &device); - free (type); - free (disk); - free (part); - if (r == -1) - return NULL; - } - else if (match2 (g, spec, re_cciss, &disk, &part)) { - r = resolve_fstab_device_cciss (g, disk, part, &device); - free (disk); - free (part); - if (r == -1) - return NULL; - } - else if (md_map && (disk = match1 (g, spec, re_mdN)) != NULL) { - mdadm_app entry; - entry.mdadm = disk; - - mdadm_app *app = hash_lookup (md_map, &entry); - if (app) device = safe_strdup (g, app->app); - - free(disk); - } - else if (match3 (g, spec, re_freebsd, &disk, &slice, &part)) { - /* FreeBSD disks are organized quite differently. See: - * http://www.freebsd.org/doc/handbook/disk-organization.html - * FreeBSD "partitions" are exposed as quasi-extended partitions - * numbered from 5 in Linux. I have no idea what happens when you - * have multiple "slices" (the FreeBSD term for MBR partitions). - */ - int disk_i = guestfs___parse_unsigned_int (g, disk); - int slice_i = guestfs___parse_unsigned_int (g, slice); - int part_i = part[0] - 'a' /* counting from 0 */; - free (disk); - free (slice); - free (part); - - if (disk_i != -1 && disk_i <= 26 && - slice_i > 0 && slice_i <= 1 /* > 4 .. see comment above */ && - part_i >= 0 && part_i < 26) { - device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); - } - } - else if ((part = match1 (g, spec, re_diskbyid)) != NULL) { - r = resolve_fstab_device_diskbyid (g, part, &device); - free (part); - if (r == -1) - return NULL; - } - - /* Didn't match device pattern, return original spec unchanged. */ - if (device == NULL) - device = safe_strdup (g, spec); - - return device; -} - -/* Call 'f' with Augeas opened and having parsed 'filename' (this file - * must exist). As a security measure, this bails if the file is too - * large for a reasonable configuration file. After the call to 'f' - * Augeas is closed. - */ -static int -inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, - const char **configfiles, - int (*f) (guestfs_h *, struct inspect_fs *)) -{ - /* Security: Refuse to do this if a config file is too large. */ - for (const char **i = configfiles; *i != NULL; i++) { - if (guestfs_exists(g, *i) == 0) continue; - - int64_t size = guestfs_filesize (g, *i); - if (size == -1) - /* guestfs_filesize failed and has already set error in handle */ - return -1; - if (size > MAX_AUGEAS_FILE_SIZE) { - error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), - *i, size); - return -1; - } - } - - /* If !feature_available (g, "augeas") then the next call will fail. - * Arguably we might want to fall back to a non-Augeas method in - * this case. - */ - if (guestfs_aug_init (g, "/", 16|32) == -1) - return -1; - - int r = -1; - - /* Tell Augeas to only load one file (thanks RaphaĆ«l Pinson). */ -#define AUGEAS_LOAD "/augeas/load//incl[. != \"" -#define AUGEAS_LOAD_LEN (strlen(AUGEAS_LOAD)) - size_t conflen = strlen(configfiles[0]); - size_t buflen = AUGEAS_LOAD_LEN + conflen + 1 /* Closing " */; - char *buf = safe_malloc(g, buflen + 2 /* Closing ] + null terminator */); - - memcpy(buf, AUGEAS_LOAD, AUGEAS_LOAD_LEN); - memcpy(buf + AUGEAS_LOAD_LEN, configfiles[0], conflen); - buf[buflen - 1] = '"'; -#undef AUGEAS_LOAD_LEN -#undef AUGEAS_LOAD - -#define EXCL " and . != \"" -#define EXCL_LEN (strlen(EXCL)) - for (const char **i = &configfiles[1]; *i != NULL; i++) { - size_t orig_buflen = buflen; - conflen = strlen(*i); - buflen += EXCL_LEN + conflen + 1 /* Closing " */; - buf = safe_realloc(g, buf, buflen + 2 /* Closing ] + null terminator */); - char *s = buf + orig_buflen; - - memcpy(s, EXCL, EXCL_LEN); - memcpy(s + EXCL_LEN, *i, conflen); - buf[buflen - 1] = '"'; - } -#undef EXCL_LEN -#undef EXCL - - buf[buflen] = ']'; - buf[buflen + 1] = '\0'; - - if (guestfs_aug_rm (g, buf) == -1) { - free(buf); - goto out; - } - free(buf); - - if (guestfs_aug_load (g) == -1) - goto out; - - r = f (g, fs); - - out: - guestfs_aug_close (g); - - return r; -} - -static int -is_partition (guestfs_h *g, const char *partition) -{ - char *device; - guestfs_error_handler_cb old_error_cb; - - old_error_cb = g->error_cb; - g->error_cb = NULL; - - if ((device = guestfs_part_to_dev (g, partition)) == NULL) { - g->error_cb = old_error_cb; - return 0; - } - - if (guestfs_device_index (g, device) == -1) { - g->error_cb = old_error_cb; - free (device); - return 0; - } - - g->error_cb = old_error_cb; - free (device); - - return 1; -} - -#endif /* defined(HAVE_HIVEX) */ diff --git a/src/inspect_fs_windows.c b/src/inspect_fs_windows.c deleted file mode 100644 index 1a341927..00000000 --- a/src/inspect_fs_windows.c +++ /dev/null @@ -1,586 +0,0 @@ -/* libguestfs - * Copyright (C) 2010-2012 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_HIVEX -#include -#endif - -#include "c-ctype.h" -#include "ignore-value.h" -#include "xstrtol.h" - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -#if defined(HAVE_HIVEX) - -/* Compile all the regular expressions once when the shared library is - * loaded. PCRE is thread safe so we're supposedly OK here if - * multiple threads call into the libguestfs API functions below - * simultaneously. - */ -static pcre *re_windows_version; - -static void compile_regexps (void) __attribute__((constructor)); -static void free_regexps (void) __attribute__((destructor)); - -static void -compile_regexps (void) -{ - const char *err; - int offset; - -#define COMPILE(re,pattern,options) \ - do { \ - re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ - if (re == NULL) { \ - ignore_value (write (2, err, strlen (err))); \ - abort (); \ - } \ - } while (0) - - COMPILE (re_windows_version, "^(\\d+)\\.(\\d+)", 0); -} - -static void -free_regexps (void) -{ - pcre_free (re_windows_version); -} - -static int check_windows_arch (guestfs_h *g, struct inspect_fs *fs); -static int check_windows_software_registry (guestfs_h *g, struct inspect_fs *fs); -static int check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs); -static char *map_registry_disk_blob (guestfs_h *g, const char *blob); - -/* XXX Handling of boot.ini in the Perl version was pretty broken. It - * essentially didn't do anything for modern Windows guests. - * Therefore I've omitted all that code. - */ - -/* Try to find Windows systemroot using some common locations. - * - * Notes: - * - * (1) We check for some directories inside to see if it is a real - * systemroot, and not just a directory that happens to have the same - * name. - * - * (2) If a Windows guest has multiple disks and applications are - * installed on those other disks, then those other disks will contain - * "/Program Files" and "/System Volume Information". Those would - * *not* be Windows root disks. (RHBZ#674130) - */ -static const char *systemroots[] = - { "/windows", "/winnt", "/win32", "/win", NULL }; - -int -guestfs___has_windows_systemroot (guestfs_h *g) -{ - size_t i; - char *systemroot; - char path[256]; - - for (i = 0; i < sizeof systemroots / sizeof systemroots[0]; ++i) { - systemroot = guestfs___case_sensitive_path_silently (g, systemroots[i]); - if (!systemroot) - continue; - - snprintf (path, sizeof path, "%s/system32", systemroot); - if (!guestfs___is_dir_nocase (g, path)) { - free (systemroot); - continue; - } - - snprintf (path, sizeof path, "%s/system32/config", systemroot); - if (!guestfs___is_dir_nocase (g, path)) { - free (systemroot); - continue; - } - - snprintf (path, sizeof path, "%s/system32/cmd.exe", systemroot); - if (!guestfs___is_file_nocase (g, path)) { - free (systemroot); - continue; - } - - free (systemroot); - - return (int)i; - } - - return -1; /* not found */ -} - -int -guestfs___check_windows_root (guestfs_h *g, struct inspect_fs *fs) -{ - int i; - char *systemroot; - - fs->type = OS_TYPE_WINDOWS; - fs->distro = OS_DISTRO_WINDOWS; - - i = guestfs___has_windows_systemroot (g); - if (i == -1) { - error (g, "check_windows_root: has_windows_systemroot unexpectedly returned -1"); - return -1; - } - - systemroot = guestfs___case_sensitive_path_silently (g, systemroots[i]); - if (!systemroot) { - error (g, _("cannot resolve Windows %%SYSTEMROOT%%")); - return -1; - } - - debug (g, "windows %%SYSTEMROOT%% = %s", systemroot); - - /* Freed by guestfs___free_inspect_info. */ - fs->windows_systemroot = systemroot; - - if (check_windows_arch (g, fs) == -1) - return -1; - - /* Product name and version. */ - if (check_windows_software_registry (g, fs) == -1) - return -1; - - /* Hostname. */ - if (check_windows_system_registry (g, fs) == -1) - return -1; - - return 0; -} - -static int -check_windows_arch (guestfs_h *g, struct inspect_fs *fs) -{ - size_t len = strlen (fs->windows_systemroot) + 32; - char cmd_exe[len]; - snprintf (cmd_exe, len, "%s/system32/cmd.exe", fs->windows_systemroot); - - char *cmd_exe_path = guestfs___case_sensitive_path_silently (g, cmd_exe); - if (!cmd_exe_path) - return 0; - - char *arch = guestfs_file_architecture (g, cmd_exe_path); - free (cmd_exe_path); - - if (arch) - fs->arch = arch; /* freed by guestfs___free_inspect_info */ - - return 0; -} - -/* At the moment, pull just the ProductName and version numbers from - * the registry. In future there is a case for making many more - * registry fields available to callers. - */ -static int -check_windows_software_registry (guestfs_h *g, struct inspect_fs *fs) -{ - size_t len = strlen (fs->windows_systemroot) + 64; - char software[len]; - snprintf (software, len, "%s/system32/config/software", - fs->windows_systemroot); - - char *software_path = guestfs___case_sensitive_path_silently (g, software); - if (!software_path) - /* If the software hive doesn't exist, just accept that we cannot - * find product_name etc. - */ - return 0; - - char *software_hive = NULL; - int ret = -1; - hive_h *h = NULL; - hive_value_h *values = NULL; - - software_hive = guestfs___download_to_tmp (g, fs, software_path, "software", - MAX_REGISTRY_SIZE); - if (software_hive == NULL) - goto out; - - h = hivex_open (software_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); - if (h == NULL) { - perrorf (g, "hivex_open"); - goto out; - } - - hive_node_h node = hivex_root (h); - const char *hivepath[] = - { "Microsoft", "Windows NT", "CurrentVersion" }; - size_t i; - for (i = 0; - node != 0 && i < sizeof hivepath / sizeof hivepath[0]; - ++i) { - node = hivex_node_get_child (h, node, hivepath[i]); - } - - if (node == 0) { - perrorf (g, "hivex: cannot locate HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"); - goto out; - } - - values = hivex_node_values (h, node); - - for (i = 0; values[i] != 0; ++i) { - char *key = hivex_value_key (h, values[i]); - if (key == NULL) { - perrorf (g, "hivex_value_key"); - goto out; - } - - if (STRCASEEQ (key, "ProductName")) { - fs->product_name = hivex_value_string (h, values[i]); - if (!fs->product_name) { - perrorf (g, "hivex_value_string"); - free (key); - goto out; - } - } - else if (STRCASEEQ (key, "CurrentVersion")) { - char *version = hivex_value_string (h, values[i]); - if (!version) { - perrorf (g, "hivex_value_string"); - free (key); - goto out; - } - char *major, *minor; - if (match2 (g, version, re_windows_version, &major, &minor)) { - fs->major_version = guestfs___parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - free (minor); - free (key); - free (version); - goto out; - } - fs->minor_version = guestfs___parse_unsigned_int (g, minor); - free (minor); - if (fs->minor_version == -1) { - free (key); - free (version); - goto out; - } - } - - free (version); - } - else if (STRCASEEQ (key, "InstallationType")) { - fs->product_variant = hivex_value_string (h, values[i]); - if (!fs->product_variant) { - perrorf (g, "hivex_value_string"); - free (key); - goto out; - } - } - - free (key); - } - - ret = 0; - - out: - if (h) hivex_close (h); - free (values); - free (software_path); - free (software_hive); - - return ret; -} - -static int -check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs) -{ - size_t len = strlen (fs->windows_systemroot) + 64; - char system[len]; - snprintf (system, len, "%s/system32/config/system", - fs->windows_systemroot); - - char *system_path = guestfs___case_sensitive_path_silently (g, system); - if (!system_path) - /* If the system hive doesn't exist, just accept that we cannot - * find hostname etc. - */ - return 0; - - char *system_hive = NULL; - int ret = -1; - hive_h *h = NULL; - hive_node_h root, node; - hive_value_h value, *values = NULL; - int32_t dword; - size_t i, count; - - system_hive = - guestfs___download_to_tmp (g, fs, system_path, "system", - MAX_REGISTRY_SIZE); - if (system_hive == NULL) - goto out; - - h = hivex_open (system_hive, g->verbose ? HIVEX_OPEN_VERBOSE : 0); - if (h == NULL) { - perrorf (g, "hivex_open"); - goto out; - } - - root = hivex_root (h); - if (root == 0) { - perrorf (g, "hivex_root"); - goto out; - } - - /* Get the CurrentControlSet. */ - errno = 0; - node = hivex_node_get_child (h, root, "Select"); - if (node == 0) { - if (errno != 0) - perrorf (g, "hivex_node_get_child"); - else - error (g, "hivex: could not locate HKLM\\SYSTEM\\Select"); - goto out; - } - - errno = 0; - value = hivex_node_get_value (h, node, "Current"); - if (value == 0) { - if (errno != 0) - perrorf (g, "hivex_node_get_value"); - else - error (g, "hivex: HKLM\\System\\Select Default entry not found."); - goto out; - } - - /* XXX Should check the type. */ - dword = hivex_value_dword (h, value); - fs->windows_current_control_set = safe_asprintf (g, "ControlSet%03d", dword); - - /* Get the drive mappings. - * This page explains the contents of HKLM\System\MountedDevices: - * http://www.goodells.net/multiboot/partsigs.shtml - */ - errno = 0; - node = hivex_node_get_child (h, root, "MountedDevices"); - if (node == 0) { - if (errno == 0) - /* Not found: skip getting drive letter mappings (RHBZ#803664). */ - goto skip_drive_letter_mappings; - /* errno != 0, so it's some other error from hivex */ - perrorf (g, "hivex_node_get_child"); - goto out; - } - - values = hivex_node_values (h, node); - - /* Count how many DOS drive letter mappings there are. This doesn't - * ignore removable devices, so it overestimates, but that doesn't - * matter because it just means we'll allocate a few bytes extra. - */ - for (i = count = 0; values[i] != 0; ++i) { - char *key = hivex_value_key (h, values[i]); - if (key == NULL) { - perrorf (g, "hivex_value_key"); - goto out; - } - if (STRCASEEQLEN (key, "\\DosDevices\\", 12) && - c_isalpha (key[12]) && key[13] == ':') - count++; - free (key); - } - - fs->drive_mappings = calloc (2*count + 1, sizeof (char *)); - if (fs->drive_mappings == NULL) { - perrorf (g, "calloc"); - goto out; - } - - for (i = count = 0; values[i] != 0; ++i) { - char *key = hivex_value_key (h, values[i]); - if (key == NULL) { - perrorf (g, "hivex_value_key"); - goto out; - } - if (STRCASEEQLEN (key, "\\DosDevices\\", 12) && - c_isalpha (key[12]) && key[13] == ':') { - /* Get the binary value. Is it a fixed disk? */ - char *blob, *device; - size_t len; - hive_type type; - - blob = hivex_value_value (h, values[i], &type, &len); - if (blob != NULL && type == 3 && len == 12) { - /* Try to map the blob to a known disk and partition. */ - device = map_registry_disk_blob (g, blob); - if (device != NULL) { - fs->drive_mappings[count++] = safe_strndup (g, &key[12], 1); - fs->drive_mappings[count++] = device; - } - } - free (blob); - } - free (key); - } - - skip_drive_letter_mappings:; - /* Get the hostname. */ - const char *hivepath[] = - { fs->windows_current_control_set, "Services", "Tcpip", "Parameters" }; - for (node = root, i = 0; - node != 0 && i < sizeof hivepath / sizeof hivepath[0]; - ++i) { - node = hivex_node_get_child (h, node, hivepath[i]); - } - - if (node == 0) { - perrorf (g, "hivex: cannot locate HKLM\\SYSTEM\\%s\\Services\\Tcpip\\Parameters", - fs->windows_current_control_set); - goto out; - } - - free (values); - values = hivex_node_values (h, node); - - for (i = 0; values[i] != 0; ++i) { - char *key = hivex_value_key (h, values[i]); - if (key == NULL) { - perrorf (g, "hivex_value_key"); - goto out; - } - - if (STRCASEEQ (key, "Hostname")) { - fs->hostname = hivex_value_string (h, values[i]); - if (!fs->hostname) { - perrorf (g, "hivex_value_string"); - free (key); - goto out; - } - } - /* many other interesting fields here ... */ - - free (key); - } - - ret = 0; - - out: - if (h) hivex_close (h); - free (values); - free (system_path); - free (system_hive); - - return ret; -} - -/* Windows Registry HKLM\SYSTEM\MountedDevices uses a blob of data - * to store partitions. This blob is described here: - * http://www.goodells.net/multiboot/partsigs.shtml - * The following function maps this blob to a libguestfs partition - * name, if possible. - */ -static char * -map_registry_disk_blob (guestfs_h *g, const char *blob) -{ - char **devices = NULL; - struct guestfs_partition_list *partitions = NULL; - char *diskid; - size_t i, j, len; - char *ret = NULL; - uint64_t part_offset; - - /* First 4 bytes are the disk ID. Search all devices to find the - * disk with this disk ID. - */ - devices = guestfs_list_devices (g); - if (devices == NULL) - goto out; - - for (i = 0; devices[i] != NULL; ++i) { - /* Read the disk ID. */ - diskid = guestfs_pread_device (g, devices[i], 4, 0x01b8, &len); - if (diskid == NULL) - continue; - if (len < 4) { - free (diskid); - continue; - } - if (memcmp (diskid, blob, 4) == 0) { /* found it */ - free (diskid); - goto found_disk; - } - free (diskid); - } - goto out; - - found_disk: - /* Next 8 bytes are the offset of the partition in bytes(!) given as - * a 64 bit little endian number. Luckily it's easy to get the - * partition byte offset from guestfs_part_list. - */ - part_offset = le64toh (* (uint64_t *) &blob[4]); - - partitions = guestfs_part_list (g, devices[i]); - if (partitions == NULL) - goto out; - - for (j = 0; j < partitions->len; ++j) { - if (partitions->val[j].part_start == part_offset) /* found it */ - goto found_partition; - } - goto out; - - found_partition: - /* Construct the full device name. */ - ret = safe_asprintf (g, "%s%d", devices[i], partitions->val[j].part_num); - - out: - if (devices) - guestfs___free_string_list (devices); - if (partitions) - guestfs_free_partition_list (partitions); - return ret; -} - -#endif /* defined(HAVE_HIVEX) */ - -char * -guestfs___case_sensitive_path_silently (guestfs_h *g, const char *path) -{ - guestfs_error_handler_cb old_error_cb = g->error_cb; - g->error_cb = NULL; - char *ret = guestfs_case_sensitive_path (g, path); - g->error_cb = old_error_cb; - return ret; -} diff --git a/src/inspect_icon.c b/src/inspect_icon.c deleted file mode 100644 index 19acfb9c..00000000 --- a/src/inspect_icon.c +++ /dev/null @@ -1,599 +0,0 @@ -/* libguestfs - * Copyright (C) 2011 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "guestfs.h" -#include "guestfs-internal.h" -#include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" - -/* External tools are required for some icon types. Check we have them. */ -#if defined(PBMTEXT) && defined (PNMTOPNG) -#define CAN_DO_CIRROS 1 -#endif -#if defined(WRESTOOL) && defined(BMPTOPNM) && defined(PNMTOPNG) && \ - defined(PAMCUT) -#define CAN_DO_WINDOWS 1 -#endif - -static int read_whole_file (guestfs_h *g, const char *filename, char **data_r, size_t *size_r); - -/* All these icon_*() functions return the same way. One of: - * - * ret == NULL: - * An error occurred. Error has been set in the handle. The caller - * should return NULL immediately. - * - * ret == NOT_FOUND: - * Not an error, but no icon was found. 'ret' is just a dummy value - * which should be ignored (do not free it!) - * - * ret == ordinary pointer: - * An icon was found. 'ret' points to the icon buffer, and *size_r - * is the size. - */ -static char *icon_favicon (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -static char *icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -#if CAN_DO_CIRROS -static char *icon_cirros (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -#endif -#if CAN_DO_WINDOWS -static char *icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); -#endif - -/* Dummy static object. */ -static char *NOT_FOUND = (char *) "not_found"; - -/* For the unexpected legal consequences of this function, see: - * http://lists.fedoraproject.org/pipermail/legal/2011-April/001615.html - * - * Returns an RBufferOut, so the length of the returned buffer is - * returned in *size_r. - * - * Check optargs for the optional argument. - */ -char * -guestfs__inspect_get_icon (guestfs_h *g, const char *root, size_t *size_r, - const struct guestfs_inspect_get_icon_argv *optargs) -{ - struct inspect_fs *fs; - char *r = NOT_FOUND; - int favicon, highquality; - size_t size; - - fs = guestfs___search_for_root (g, root); - if (!fs) - return NULL; - - /* Get optargs, or defaults. */ - favicon = - optargs->bitmask & GUESTFS_INSPECT_GET_ICON_FAVICON_BITMASK ? - optargs->favicon : 1; - - highquality = - optargs->bitmask & GUESTFS_INSPECT_GET_ICON_HIGHQUALITY_BITMASK ? - optargs->highquality : 0; - - /* Favicons are never high quality, so ... */ - if (highquality) - favicon = 0; - - /* Try looking for a favicon first. */ - if (favicon) { - r = icon_favicon (g, fs, &size); - if (!r) - return NULL; - - if (r != NOT_FOUND) { - /* try_favicon succeeded in finding a favicon. */ - *size_r = size; - return r; - } - } - - /* Favicon failed, so let's try a method based on the detected operating - * system. - */ - switch (fs->type) { - case OS_TYPE_LINUX: - case OS_TYPE_HURD: - switch (fs->distro) { - case OS_DISTRO_FEDORA: - r = icon_fedora (g, fs, &size); - break; - - case OS_DISTRO_RHEL: - case OS_DISTRO_REDHAT_BASED: - case OS_DISTRO_CENTOS: - case OS_DISTRO_SCIENTIFIC_LINUX: - r = icon_rhel (g, fs, &size); - break; - - case OS_DISTRO_DEBIAN: - r = icon_debian (g, fs, &size); - break; - - case OS_DISTRO_UBUNTU: - r = icon_ubuntu (g, fs, &size); - break; - - case OS_DISTRO_MAGEIA: - r = icon_mageia (g, fs, &size); - break; - - case OS_DISTRO_OPENSUSE: - r = icon_opensuse (g, fs, &size); - break; - - case OS_DISTRO_CIRROS: -#if CAN_DO_CIRROS - r = icon_cirros (g, fs, &size); -#endif - break; - - /* These are just to keep gcc warnings happy. */ - case OS_DISTRO_ARCHLINUX: - case OS_DISTRO_BUILDROOT: - case OS_DISTRO_FREEDOS: - case OS_DISTRO_GENTOO: - case OS_DISTRO_LINUX_MINT: - case OS_DISTRO_MANDRIVA: - case OS_DISTRO_MEEGO: - case OS_DISTRO_PARDUS: - case OS_DISTRO_SLACKWARE: - case OS_DISTRO_TTYLINUX: - case OS_DISTRO_WINDOWS: - case OS_DISTRO_UNKNOWN: - default: ; - } - break; - - case OS_TYPE_WINDOWS: -#if CAN_DO_WINDOWS - /* We don't know how to get high quality icons from a Windows guest, - * so disable this if high quality was specified. - */ - if (!highquality) - r = icon_windows (g, fs, &size); -#endif - break; - - case OS_TYPE_FREEBSD: - case OS_TYPE_NETBSD: - case OS_TYPE_DOS: - case OS_TYPE_UNKNOWN: - default: ; - } - - if (r == NOT_FOUND) { - /* Not found, but not an error. So return the special zero-length - * buffer. Use malloc(1) here to ensure that malloc won't return - * NULL. - */ - r = safe_malloc (g, 1); - size = 0; - } - - *size_r = size; - return r; -} - -/* Check that the named file 'filename' is a PNG file and is reasonable. - * If it is, download and return it. - */ -static char * -get_png (guestfs_h *g, struct inspect_fs *fs, const char *filename, - size_t *size_r, size_t max_size) -{ - char *ret = NOT_FOUND; - char *type = NULL; - char *local = NULL; - int r, w, h; - - r = guestfs_exists (g, filename); - if (r == -1) { - ret = NULL; /* a real error */ - goto out; - } - if (r == 0) goto out; - - /* Check the file type and geometry. */ - type = guestfs_file (g, filename); - if (!type) goto out; - - if (!STRPREFIX (type, "PNG image data, ")) goto out; - if (sscanf (&type[16], "%d x %d", &w, &h) != 2) goto out; - if (w < 16 || h < 16 || w > 1024 || h > 1024) goto out; - - /* Define a maximum reasonable size based on the geometry. This - * also limits the maximum we allocate below to around 4 MB. - */ - if (max_size == 0) - max_size = 4 * w * h; - - local = guestfs___download_to_tmp (g, fs, filename, "icon", max_size); - if (!local) goto out; - - /* Successfully passed checks and downloaded. Read it into memory. */ - if (read_whole_file (g, local, &ret, size_r) == -1) { - ret = NULL; - goto out; - } - - out: - free (local); - free (type); - - return ret; -} - -/* Return /etc/favicon.png (or \etc\favicon.png) if it exists and if - * it has a reasonable size and format. - */ -static char * -icon_favicon (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - char *ret; - char *filename = safe_strdup (g, "/etc/favicon.png"); - - if (fs->type == OS_TYPE_WINDOWS) { - char *f = guestfs___case_sensitive_path_silently (g, filename); - if (f) { - free (filename); - filename = f; - } - } - - ret = get_png (g, fs, filename, size_r, 0); - free (filename); - return ret; -} - -/* Return FEDORA_ICON. I checked that this exists on at least Fedora 6 - * through 16. - */ -#define FEDORA_ICON "/usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png" - -static char * -icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - return get_png (g, fs, FEDORA_ICON, size_r, 0); -} - -/* RHEL 3, 4: - * /usr/share/pixmaps/redhat/shadowman-transparent.png is a 517x515 - * PNG with alpha channel, around 64K in size. - * - * RHEL 5, 6: - * As above, but the file has been optimized to about 16K. - * - * Conveniently the RHEL clones also have the same file with the - * same name, but containing their own logos. Sense prevails! - */ -#define SHADOWMAN_ICON "/usr/share/pixmaps/redhat/shadowman-transparent.png" - -static char * -icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - size_t max_size = 0; - - if (fs->distro == OS_DISTRO_RHEL) { - if (fs->major_version <= 4) - max_size = 66000; - else - max_size = 17000; - } - - return get_png (g, fs, SHADOWMAN_ICON, size_r, max_size); -} - -#define DEBIAN_ICON "/usr/share/pixmaps/debian-logo.png" - -static char * -icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - return get_png (g, fs, DEBIAN_ICON, size_r, 2048); -} - -#define UBUNTU_ICON "/usr/share/icons/gnome/24x24/places/ubuntu-logo.png" - -static char * -icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - return get_png (g, fs, UBUNTU_ICON, size_r, 2048); -} - -#define MAGEIA_ICON "/usr/share/icons/mageia.png" - -static char * -icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - return get_png (g, fs, MAGEIA_ICON, size_r, 2048); -} - -#define OPENSUSE_ICON "/usr/share/icons/hicolor/24x24/apps/distributor.png" - -static char * -icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - return get_png (g, fs, OPENSUSE_ICON, size_r, 2048); -} - -#if CAN_DO_CIRROS - -/* Cirros's logo is a text file! */ -#define CIRROS_LOGO "/usr/share/cirros/logo" - -static char * -icon_cirros (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - char *ret = NOT_FOUND; - char *type = NULL; - char *local = NULL; - char *pngfile = NULL; - char *cmd = NULL; - int r; - - r = guestfs_exists (g, CIRROS_LOGO); - if (r == -1) { - ret = NULL; /* a real error */ - goto out; - } - if (r == 0) goto out; - - /* Check the file type and geometry. */ - type = guestfs_file (g, CIRROS_LOGO); - if (!type) goto out; - - if (!STRPREFIX (type, "ASCII text")) goto out; - - local = guestfs___download_to_tmp (g, fs, CIRROS_LOGO, "icon", 1024); - if (!local) goto out; - - /* Use pbmtext to render it. */ - pngfile = safe_asprintf (g, "%s/cirros.png", g->tmpdir); - - cmd = safe_asprintf (g, PBMTEXT " < %s | " PNMTOPNG " > %s", - local, pngfile); - r = system (cmd); - if (r == -1 || WEXITSTATUS (r) != 0) { - debug (g, "external command failed: %s", cmd); - goto out; - } - - /* Read it into memory. */ - if (read_whole_file (g, pngfile, &ret, size_r) == -1) { - ret = NULL; - goto out; - } - - out: - free (pngfile); - free (cmd); - free (local); - free (type); - - return ret; -} - -#endif /* CAN_DO_CIRROS */ - -#if CAN_DO_WINDOWS - -/* Windows, as usual, has to be much more complicated and stupid than - * anything else. - * - * We have to download %systemroot%\explorer.exe and use a special - * program called 'wrestool' to extract the icons from this file. For - * each version of Windows, the icon we want is in a different place. - * The icon is in a stupid format (BMP), and in some cases multiple - * icons are in a single BMP file so we have to do some manipulation - * on the file. - * - * XXX I've only bothered with this nonsense for a few versions of - * Windows that I have handy. Please send patches to support other - * versions. - */ - -static char * -icon_windows_xp (guestfs_h *g, struct inspect_fs *fs, const char *explorer, - size_t *size_r) -{ - char *ret; - char *pngfile; - char *cmd; - int r; - - pngfile = safe_asprintf (g, "%s/windows-xp-icon.png", g->tmpdir); - - cmd = safe_asprintf (g, - WRESTOOL " -x --type=2 --name=143 %s | " - BMPTOPNM " 2>/dev/null | " PNMTOPNG " > %s", - explorer, pngfile); - r = system (cmd); - if (r == -1 || WEXITSTATUS (r) != 0) { - debug (g, "external command failed: %s", cmd); - free (cmd); - free (pngfile); - return NOT_FOUND; - } - - free (cmd); - - if (read_whole_file (g, pngfile, &ret, size_r) == -1) { - free (pngfile); - return NULL; - } - - free (pngfile); - - return ret; -} - -static char * -icon_windows_7 (guestfs_h *g, struct inspect_fs *fs, const char *explorer, - size_t *size_r) -{ - char *ret; - char *pngfile; - char *cmd; - int r; - - pngfile = safe_asprintf (g, "%s/windows-7-icon.png", g->tmpdir); - - cmd = safe_asprintf (g, - WRESTOOL " -x --type=2 --name=6801 %s | " - BMPTOPNM " 2>/dev/null | " PAMCUT " -bottom 54 | " - PNMTOPNG " > %s", - explorer, pngfile); - r = system (cmd); - if (r == -1 || WEXITSTATUS (r) != 0) { - debug (g, "external command failed: %s", cmd); - free (cmd); - free (pngfile); - return NOT_FOUND; - } - - free (cmd); - - if (read_whole_file (g, pngfile, &ret, size_r) == -1) { - free (pngfile); - return NULL; - } - - free (pngfile); - - return ret; -} - -static char * -icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) -{ - char *(*fn) (guestfs_h *g, struct inspect_fs *fs, const char *explorer, - size_t *size_r); - char *filename1, *filename2, *filename3; - char *ret; - - /* Windows XP. */ - if (fs->major_version == 5 && fs->minor_version == 1) - fn = icon_windows_xp; - - /* Windows 7. */ - else if (fs->major_version == 6 && fs->minor_version == 1) - fn = icon_windows_7; - - /* Not (yet) a supported version of Windows. */ - else return NOT_FOUND; - - if (fs->windows_systemroot == NULL) - return NOT_FOUND; - - /* Download %systemroot%\explorer.exe */ - filename1 = safe_asprintf (g, "%s/explorer.exe", fs->windows_systemroot); - filename2 = guestfs___case_sensitive_path_silently (g, filename1); - free (filename1); - if (filename2 == NULL) - return NOT_FOUND; - - filename3 = guestfs___download_to_tmp (g, fs, filename2, "explorer", - MAX_WINDOWS_EXPLORER_SIZE); - free (filename2); - if (filename3 == NULL) - return NOT_FOUND; - - ret = fn (g, fs, filename3, size_r); - free (filename3); - return ret; -} - -#endif /* CAN_DO_WINDOWS */ - -/* Read the whole file into a memory buffer and return it. The file - * should be a regular, local, trusted file. - */ -static int -read_whole_file (guestfs_h *g, const char *filename, - char **data_r, size_t *size_r) -{ - int fd; - char *data; - off_t size; - off_t n; - ssize_t r; - struct stat statbuf; - - fd = open (filename, O_RDONLY|O_CLOEXEC); - if (fd == -1) { - perrorf (g, "open: %s", filename); - return -1; - } - - if (fstat (fd, &statbuf) == -1) { - perrorf (g, "stat: %s", filename); - close (fd); - return -1; - } - - size = statbuf.st_size; - data = safe_malloc (g, size); - - n = 0; - while (n < size) { - r = read (fd, &data[n], size - n); - if (r == -1) { - perrorf (g, "read: %s", filename); - free (data); - close (fd); - return -1; - } - if (r == 0) { - error (g, _("read: %s: unexpected end of file"), filename); - free (data); - close (fd); - return -1; - } - n += r; - } - - if (close (fd) == -1) { - perrorf (g, "close: %s", filename); - free (data); - return -1; - } - - *data_r = data; - *size_r = size; - - return 0; -} diff --git a/tests/xml/Makefile.am b/tests/xml/Makefile.am index 797656a5..eff67beb 100644 --- a/tests/xml/Makefile.am +++ b/tests/xml/Makefile.am @@ -26,7 +26,7 @@ if HAVE_LIBVIRT # returned by libvirt. check_LTLIBRARIES = libfakevirtxml.la -libfakevirtxml_la_SOURCES = fake_libvirt_xml.c +libfakevirtxml_la_SOURCES = fake-libvirt-xml.c libfakevirtxml_la_CFLAGS = $(LIBVIRT_CFLAGS) # -version-info and -rpath force libtool to build a shared library. libfakevirtxml_la_LDFLAGS = -version-info 0:0:0 -rpath /nowhere diff --git a/tests/xml/fake-libvirt-xml.c b/tests/xml/fake-libvirt-xml.c new file mode 100644 index 00000000..61065d3d --- /dev/null +++ b/tests/xml/fake-libvirt-xml.c @@ -0,0 +1,98 @@ +/* libguestfs + * Copyright (C) 2012 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + +/* Old had a slightly different definition of + * virDomainGetXMLDesc (using 'int' for flags instead of 'unsigned + * int'). To avoid an error trying to redefine it with a different + * declaration, don't include at all. Just copy enough to + * make the code compile. + */ +typedef struct _virDomain virDomain; +typedef virDomain *virDomainPtr; + +char * +virDomainGetXMLDesc (virDomainPtr dom, unsigned int flags) +{ + const char *path; + int fd; + struct stat statbuf; + char *buf, *p; + size_t n; + ssize_t r; + + path = getenv ("FAKE_LIBVIRT_XML"); + + if (!path) { + fprintf (stderr, "environment variable FAKE_LIBVIRT_XML is not set\n"); + _exit (1); + } + + fprintf (stderr, + "fake_libvirt_xml: returning fake libvirt XML from %s\n", path); + + fd = open (path, O_RDONLY | O_CLOEXEC); + if (fd == -1) { + perror (path); + _exit (1); + } + + if (fstat (fd, &statbuf) == -1) { + perror ("fstat"); + _exit (1); + } + + buf = malloc (statbuf.st_size + 1); + if (buf == NULL) { + perror ("malloc"); + _exit (1); + } + + for (n = 0, p = buf; n < statbuf.st_size; ++n) { + r = read (fd, p, statbuf.st_size - n); + if (r == -1) { + perror ("read"); + _exit (1); + } + if (r == 0) + break; + n += r; + p += r; + } + + *p = '\0'; + + if (close (fd) == -1) { + perror ("close"); + _exit (1); + } + + return buf; /* caller frees */ +} diff --git a/tests/xml/fake_libvirt_xml.c b/tests/xml/fake_libvirt_xml.c deleted file mode 100644 index 61065d3d..00000000 --- a/tests/xml/fake_libvirt_xml.c +++ /dev/null @@ -1,98 +0,0 @@ -/* libguestfs - * Copyright (C) 2012 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - -/* Old had a slightly different definition of - * virDomainGetXMLDesc (using 'int' for flags instead of 'unsigned - * int'). To avoid an error trying to redefine it with a different - * declaration, don't include at all. Just copy enough to - * make the code compile. - */ -typedef struct _virDomain virDomain; -typedef virDomain *virDomainPtr; - -char * -virDomainGetXMLDesc (virDomainPtr dom, unsigned int flags) -{ - const char *path; - int fd; - struct stat statbuf; - char *buf, *p; - size_t n; - ssize_t r; - - path = getenv ("FAKE_LIBVIRT_XML"); - - if (!path) { - fprintf (stderr, "environment variable FAKE_LIBVIRT_XML is not set\n"); - _exit (1); - } - - fprintf (stderr, - "fake_libvirt_xml: returning fake libvirt XML from %s\n", path); - - fd = open (path, O_RDONLY | O_CLOEXEC); - if (fd == -1) { - perror (path); - _exit (1); - } - - if (fstat (fd, &statbuf) == -1) { - perror ("fstat"); - _exit (1); - } - - buf = malloc (statbuf.st_size + 1); - if (buf == NULL) { - perror ("malloc"); - _exit (1); - } - - for (n = 0, p = buf; n < statbuf.st_size; ++n) { - r = read (fd, p, statbuf.st_size - n); - if (r == -1) { - perror ("read"); - _exit (1); - } - if (r == 0) - break; - n += r; - p += r; - } - - *p = '\0'; - - if (close (fd) == -1) { - perror ("close"); - _exit (1); - } - - return buf; /* caller frees */ -} -- cgit