X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=po-docs%2Flibguestfs-docs.pot;h=f4eb2ad9264d28794e7547a0a9995334cd65bb12;hp=29ffb8d1620c6016d119349cfb5b6d3edf0bd6e0;hb=504b9d95c4afdc83efd5cca6d98cb73111e8c652;hpb=8df8ccb287b739748294d4074c09448bd2b2e62b diff --git a/po-docs/libguestfs-docs.pot b/po-docs/libguestfs-docs.pot index 29ffb8d..f4eb2ad 100644 --- a/po-docs/libguestfs-docs.pot +++ b/po-docs/libguestfs-docs.pot @@ -6,9293 +6,8509 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: libguestfs 1.9.0\n" +"Project-Id-Version: libguestfs 1.13.11\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2010-12-19 15:53+0000\n" +"POT-Creation-Date: 2011-09-01 14:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: ENCODING" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" -# type: =encoding -#: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../tools/virt-edit.pl:30 ../tools/virt-win-reg.pl:33 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-tar.pl:29 ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28 -msgid "utf8" -msgstr "" - -# type: =head1 -#: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30 +#. type: =head1 +#: ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35 msgid "NAME" msgstr "" -# type: textblock -#: ../src/guestfs.pod:5 -msgid "guestfs - Library for accessing and modifying virtual machine images" +#. type: textblock +#: ../cat/virt-cat.pod:5 +msgid "virt-cat - Display files in a virtual machine" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34 +#. type: =head1 +#: ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39 msgid "SYNOPSIS" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:9 -#, no-wrap -msgid "" -" #include \n" -" \n" -msgstr "" - -# type: verbatim -#: ../src/guestfs.pod:11 +#. type: verbatim +#: ../cat/virt-cat.pod:9 #, no-wrap msgid "" -" guestfs_h *g = guestfs_create ();\n" -" guestfs_add_drive (g, \"guest.img\");\n" -" guestfs_launch (g);\n" -" guestfs_mount (g, \"/dev/sda1\", \"/\");\n" -" guestfs_touch (g, \"/hello\");\n" -" guestfs_umount (g, \"/\");\n" -" guestfs_close (g);\n" +" virt-cat [--options] -d domname file [file ...]\n" "\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:19 +#. type: verbatim +#: ../cat/virt-cat.pod:11 #, no-wrap msgid "" -" cc prog.c -o prog -lguestfs\n" -"or:\n" -" cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n" +" virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n" "\n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:23 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-tar.pl:72 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40 -msgid "DESCRIPTION" +#. type: textblock +#: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13 +msgid "Old-style:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:25 +#. type: verbatim +#: ../cat/virt-cat.pod:15 +#, no-wrap msgid "" -"Libguestfs is a library for accessing and modifying guest disk images. " -"Amongst the things this is good for: making batch configuration changes to " -"guests, getting disk used/free statistics (see also: virt-df), migrating " -"between virtualization systems (see also: virt-p2v), performing partial " -"backups, performing partial guest clones, cloning guests and changing " -"registry/UUID/hostname info, and much else besides." +" virt-cat domname file\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:33 +#. type: verbatim +#: ../cat/virt-cat.pod:17 +#, no-wrap msgid "" -"Libguestfs uses Linux kernel and qemu code, and can access any type of guest " -"filesystem that Linux and qemu can, including but not limited to: ext2/3/4, " -"btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, " -"qcow2, vmdk." +" virt-cat disk.img file\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:38 -msgid "" -"Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, " -"what filesystem is in each LV, etc.). It can also run commands in the " -"context of the guest. Also you can access filesystems over FUSE." +#. type: =head1 +#: ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63 +msgid "DESCRIPTION" msgstr "" -# type: textblock -#: ../src/guestfs.pod:43 +#. type: textblock +#: ../cat/virt-cat.pod:21 msgid "" -"Libguestfs is a library that can be linked with C and C++ management " -"programs (or management programs written in OCaml, Perl, Python, Ruby, Java, " -"PHP, Haskell or C#). You can also use it from shell scripts or the command " -"line." +"C is a command line tool to display the contents of C where " +"C exists in the named virtual machine (or disk image)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:48 +#. type: textblock +#: ../cat/virt-cat.pod:24 msgid "" -"You don't need to be root to use libguestfs, although obviously you do need " -"enough permissions to access the disk images." +"Multiple filenames can be given, in which case they are concatenated " +"together. Each filename must be a full path, starting at the root directory " +"(starting with '/')." msgstr "" -# type: textblock -#: ../src/guestfs.pod:51 +#. type: textblock +#: ../cat/virt-cat.pod:28 msgid "" -"Libguestfs is a large API because it can do many things. For a gentle " -"introduction, please read the L section next." +"C can be used to quickly view a file. To edit a file, use " +"C. For more complex cases you should look at the L " +"tool (see L below)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:54 -msgid "" -"There are also some example programs in the L manual " -"page." +#. type: =head1 +#: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 ../fish/guestfish.pod:1018 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../tools/virt-tar.pl:50 +msgid "EXAMPLES" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:57 -msgid "API OVERVIEW" +#. type: textblock +#: ../cat/virt-cat.pod:34 +msgid "Display C file from inside the libvirt VM called C:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:59 +#. type: verbatim +#: ../cat/virt-cat.pod:37 +#, no-wrap msgid "" -"This section provides a gentler overview of the libguestfs API. We also try " -"to group API calls together, where that may not be obvious from reading " -"about the individual calls in the main section of this manual." +" virt-cat -d mydomain /etc/fstab\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:64 -msgid "HANDLES" +#. type: textblock +#: ../cat/virt-cat.pod:39 +msgid "List syslog messages from a VM disk image file:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:66 +#. type: verbatim +#: ../cat/virt-cat.pod:41 +#, no-wrap msgid "" -"Before you can use libguestfs calls, you have to create a handle. Then you " -"must add at least one disk image to the handle, followed by launching the " -"handle, then performing whatever operations you want, and finally closing " -"the handle. By convention we use the single letter C for the name of the " -"handle variable, although of course you can use any name you want." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:73 -msgid "The general structure of all libguestfs-using programs looks like this:" +" virt-cat -a disk.img /var/log/messages | tail\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:76 -#, no-wrap -msgid "" -" guestfs_h *g = guestfs_create ();\n" -" \n" +#. type: textblock +#: ../cat/virt-cat.pod:43 +msgid "Find out what DHCP IP address a VM acquired:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:78 +#. type: verbatim +#: ../cat/virt-cat.pod:45 #, no-wrap msgid "" -" /* Call guestfs_add_drive additional times if there are\n" -" * multiple disk images.\n" -" */\n" -" guestfs_add_drive (g, \"guest.img\");\n" -" \n" +" virt-cat -d mydomain /var/log/messages | \\\n" +" grep 'dhclient: bound to' | tail\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:83 -#, no-wrap -msgid "" -" /* Most manipulation calls won't work until you've launched\n" -" * the handle 'g'. You have to do this _after_ adding drives\n" -" * and _before_ other commands.\n" -" */\n" -" guestfs_launch (g);\n" -" \n" +#. type: textblock +#: ../cat/virt-cat.pod:48 +msgid "Find out what packages were recently installed:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:89 +#. type: verbatim +#: ../cat/virt-cat.pod:50 #, no-wrap msgid "" -" /* Now you can examine what partitions, LVs etc are available.\n" -" */\n" -" char **partitions = guestfs_list_partitions (g);\n" -" char **logvols = guestfs_lvs (g);\n" -" \n" +" virt-cat -d mydomain /var/log/yum.log | tail\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:94 -#, no-wrap -msgid "" -" /* To access a filesystem in the image, you must mount it.\n" -" */\n" -" guestfs_mount (g, \"/dev/sda1\", \"/\");\n" -" \n" +#. type: textblock +#: ../cat/virt-cat.pod:52 +msgid "Find out who is logged on inside a virtual machine:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:98 +#. type: verbatim +#: ../cat/virt-cat.pod:54 #, no-wrap msgid "" -" /* Now you can perform filesystem actions on the guest\n" -" * disk image.\n" -" */\n" -" guestfs_touch (g, \"/hello\");\n" +" virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n" +" who /tmp/utmp\n" "\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:103 -#, no-wrap -msgid "" -" /* This is only needed for libguestfs < 1.5.24. Since then\n" -" * it is done automatically when you close the handle. See\n" -" * discussion of autosync in this page.\n" -" */\n" -" guestfs_sync (g);\n" -" \n" +#. type: textblock +#: ../cat/virt-cat.pod:57 +msgid "or who was logged on:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:109 +#. type: verbatim +#: ../cat/virt-cat.pod:59 #, no-wrap msgid "" -" /* Close the handle 'g'. */\n" -" guestfs_close (g);\n" +" virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n" +" last -f /tmp/wtmp\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:112 -msgid "" -"The code above doesn't include any error checking. In real code you should " -"check return values carefully for errors. In general all functions that " -"return integers return C<-1> on error, and all functions that return " -"pointers return C on error. See section L below for " -"how to handle errors, and consult the documentation for each function call " -"below to see precisely how they return error indications. See " -"L for fully worked examples." +#. type: =head1 +#: ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:83 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84 ../resize/virt-resize.pod:241 ../test-tool/libguestfs-test-tool.pod:37 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96 +msgid "OPTIONS" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:121 -msgid "DISK IMAGES" +#. type: =item +#: ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:151 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88 ../resize/virt-resize.pod:245 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104 +msgid "B<--help>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:123 -msgid "" -"The image filename (C<\"guest.img\"> in the example above) could be a disk " -"image from a virtual machine, a L copy of a physical hard disk, an " -"actual block device, or simply an empty file of zeroes that you have created " -"through L. Libguestfs lets you do useful things to all " -"of these." +#. type: textblock +#: ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106 +msgid "Display brief help." msgstr "" -# type: textblock -#: ../src/guestfs.pod:129 -msgid "" -"The call you should use in modern code for adding drives is " -"L. To add a disk image, allowing writes, and " -"specifying that the format is raw, do:" +#. type: =item +#: ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92 +msgid "B<-a> file" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:133 -#, no-wrap -msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n" -" -1);\n" -"\n" +#. type: =item +#: ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94 +msgid "B<--add> file" msgstr "" -# type: textblock -#: ../src/guestfs.pod:137 -msgid "You can add a disk read-only using:" +#. type: textblock +#: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96 +msgid "" +"Add I which should be a disk image from a virtual machine. If the " +"virtual machine has multiple block devices, you must supply all of them with " +"separate I<-a> options." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:139 -#, no-wrap +#. type: textblock +#: ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:93 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100 msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n" -" GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n" -" -1);\n" -"\n" +"The format of the disk image is auto-detected. To override this and force a " +"particular format use the I<--format=..> option." msgstr "" -# type: textblock -#: ../src/guestfs.pod:144 -msgid "" -"or by calling the older function L. In either case " -"libguestfs won't modify the file." +#. type: =item +#: ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107 +msgid "B<-c> URI" msgstr "" -# type: textblock -#: ../src/guestfs.pod:147 -msgid "" -"Be extremely cautious if the disk image is in use, eg. if it is being used " -"by a virtual machine. Adding it read-write will almost certainly cause disk " -"corruption, but adding it read-only is safe." +#. type: =item +#: ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109 +msgid "B<--connect> URI" msgstr "" -# type: textblock -#: ../src/guestfs.pod:151 +#. type: textblock +#: ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132 msgid "" -"You must add at least one disk image, and you may add multiple disk images. " -"In the API, the disk images are usually referred to as C (for the " -"first one you added), C (for the second one you added), etc." +"If using libvirt, connect to the given I. If omitted, then we connect " +"to the default libvirt hypervisor." msgstr "" -# type: textblock -#: ../src/guestfs.pod:156 +#. type: textblock +#: ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114 msgid "" -"Once L has been called you cannot add any more images. You " -"can call L to get a list of the device names, in the " -"order that you added them. See also L below." +"If you specify guest block devices directly (I<-a>), then libvirt is not " +"used at all." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:161 -msgid "MOUNTING" +#. type: =item +#: ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117 +msgid "B<-d> guest" msgstr "" -# type: textblock -#: ../src/guestfs.pod:163 -msgid "" -"Before you can read or write files, create directories and so on in a disk " -"image that contains filesystems, you have to mount those filesystems using " -"L. If you already know that a disk image contains (for " -"example) one partition with a filesystem on that partition, then you can " -"mount it directly:" +#. type: =item +#: ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119 +msgid "B<--domain> guest" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:169 -#, no-wrap +#. type: textblock +#: ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121 msgid "" -" guestfs_mount (g, \"/dev/sda1\", \"/\");\n" -"\n" +"Add all the disks from the named libvirt guest. Domain UUIDs can be used " +"instead of names." msgstr "" -# type: textblock -#: ../src/guestfs.pod:171 -msgid "" -"where C means literally the first partition (C<1>) of the first " -"disk image that we added (C). If the disk contains Linux LVM2 " -"logical volumes you could refer to those instead (eg. C)." +#. type: =item +#: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 ../fuse/guestmount.pod:126 ../inspector/virt-inspector.pod:92 +msgid "B<--echo-keys>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:175 +#. type: textblock +#: ../cat/virt-cat.pod:100 msgid "" -"If you are given a disk image and you don't know what it contains then you " -"have to find out. Libguestfs can do that too: use " -"L and L to list possible partitions " -"and LVs, and either try mounting each to see what is mountable, or else " -"examine them with L or L. Libguestfs also " -"has a set of APIs for inspection of disk images (see L below). " -"But you might find it easier to look at higher level programs built on top " -"of libguestfs, in particular L." +"When prompting for keys and passphrases, virt-cat normally turns echoing off " +"so you cannot see what you are typing. If you are not worried about Tempest " +"attacks and there is no one else in the room you can specify this flag to " +"see what you are typing." msgstr "" -# type: textblock -#: ../src/guestfs.pod:185 -msgid "" -"To mount a disk image read-only, use L. There are " -"several other variations of the C call." +#. type: =item +#: ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:133 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124 +msgid "B<--format=raw|qcow2|..>" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:188 -msgid "FILESYSTEM ACCESS AND MODIFICATION" +#. type: =item +#: ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126 +msgid "B<--format>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:190 +#. type: textblock +#: ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:137 ../rescue/virt-rescue.pod:128 msgid "" -"The majority of the libguestfs API consists of fairly low-level calls for " -"accessing and modifying the files, directories, symlinks etc on mounted " -"filesystems. There are over a hundred such calls which you can find listed " -"in detail below in this man page, and we don't even pretend to cover them " -"all in this overview." +"The default for the I<-a> option is to auto-detect the format of the disk " +"image. Using this forces the disk format for I<-a> options which follow on " +"the command line. Using I<--format> with no argument switches back to " +"auto-detection for subsequent I<-a> options." msgstr "" -# type: textblock -#: ../src/guestfs.pod:196 -msgid "" -"Specify filenames as full paths, starting with C<\"/\"> and including the " -"mount point." +#. type: textblock +#: ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336 ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2668 +msgid "For example:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:199 +#. type: verbatim +#: ../cat/virt-cat.pod:116 +#, no-wrap msgid "" -"For example, if you mounted a filesystem at C<\"/\"> and you want to read " -"the file called C<\"etc/passwd\"> then you could do:" +" virt-cat --format=raw -a disk.img file\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:202 +#. type: textblock +#: ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137 +msgid "forces raw format (no auto-detection) for C." +msgstr "" + +#. type: verbatim +#: ../cat/virt-cat.pod:120 #, no-wrap msgid "" -" char *data = guestfs_cat (g, \"/etc/passwd\");\n" +" virt-cat --format=raw -a disk.img --format -a another.img file\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:204 +#. type: textblock +#: ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141 msgid "" -"This would return C as a newly allocated buffer containing the full " -"content of that file (with some conditions: see also L below), " -"or C if there was an error." +"forces raw format (no auto-detection) for C and reverts to " +"auto-detection for C." msgstr "" -# type: textblock -#: ../src/guestfs.pod:208 +#. type: textblock +#: ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144 msgid "" -"As another example, to create a top-level directory on that filesystem " -"called C<\"var\"> you would do:" +"If you have untrusted raw-format guest disk images, you should use this " +"option to specify the disk format. This avoids a possible security problem " +"with malicious guests (CVE-2010-3851)." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:211 -#, no-wrap -msgid "" -" guestfs_mkdir (g, \"/var\");\n" -"\n" +#. type: =item +#: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 ../fuse/guestmount.pod:163 ../inspector/virt-inspector.pod:114 +msgid "B<--keys-from-stdin>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:213 -msgid "To create a symlink you could do:" +#. type: textblock +#: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 ../fuse/guestmount.pod:165 ../inspector/virt-inspector.pod:116 +msgid "" +"Read key or passphrase parameters from stdin. The default is to try to read " +"passphrases from the user by opening C." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:215 -#, no-wrap -msgid "" -" guestfs_ln_s (g, \"/etc/init.d/portmap\",\n" -" \"/etc/rc3.d/S30portmap\");\n" -"\n" +#. type: =item +#: ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:257 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:178 +msgid "B<-v>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:218 -msgid "" -"Libguestfs will reject attempts to use relative paths and there is no " -"concept of a current working directory." +#. type: =item +#: ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:259 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:180 +msgid "B<--verbose>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:221 -msgid "" -"Libguestfs can return errors in many situations: for example if the " -"filesystem isn't writable, or if a file or directory that you requested " -"doesn't exist. If you are using the C API (documented here) you have to " -"check for those error conditions after each call. (Other language bindings " -"turn these errors into exceptions)." +#. type: textblock +#: ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:182 +msgid "Enable verbose messages for debugging." msgstr "" -# type: textblock -#: ../src/guestfs.pod:227 -msgid "" -"File writes are affected by the per-handle umask, set by calling " -"L and defaulting to 022. See L." +#. type: =item +#: ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:184 ../resize/virt-resize.pod:484 +msgid "B<-V>" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:230 -msgid "PARTITIONING" +#. type: =item +#: ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:265 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:186 ../resize/virt-resize.pod:486 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112 +msgid "B<--version>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:232 -msgid "" -"Libguestfs contains API calls to read, create and modify partition tables on " -"disk images." +#. type: textblock +#: ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:488 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114 +msgid "Display version number and exit." +msgstr "" + +#. type: =item +#: ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:278 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:199 ../tools/virt-tar.pl:158 +msgid "B<-x>" +msgstr "" + +#. type: textblock +#: ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:201 +msgid "Enable tracing of libguestfs API calls." +msgstr "" + +#. type: =head1 +#: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:205 +msgid "OLD-STYLE COMMAND LINE ARGUMENTS" +msgstr "" + +#. type: textblock +#: ../cat/virt-cat.pod:154 +msgid "Previous versions of virt-cat allowed you to write either:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:235 +#. type: verbatim +#: ../cat/virt-cat.pod:156 +#, no-wrap msgid "" -"In the common case where you want to create a single partition covering the " -"whole disk, you should use the L call:" +" virt-cat disk.img [disk.img ...] file\n" +"\n" +msgstr "" + +#. type: textblock +#: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:211 +msgid "or" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:239 +#. type: verbatim +#: ../cat/virt-cat.pod:160 #, no-wrap msgid "" -" const char *parttype = \"mbr\";\n" -" if (disk_is_larger_than_2TB)\n" -" parttype = \"gpt\";\n" -" guestfs_part_disk (g, \"/dev/sda\", parttype);\n" +" virt-cat guestname file\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:244 +#. type: textblock +#: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:215 msgid "" -"Obviously this effectively wipes anything that was on that disk image " -"before." +"whereas in this version you should use I<-a> or I<-d> respectively to avoid " +"the confusing case where a disk image might have the same name as a guest." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:247 -msgid "LVM2" +#. type: textblock +#: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:219 +msgid "For compatibility the old style is still supported." msgstr "" -# type: textblock -#: ../src/guestfs.pod:249 -msgid "" -"Libguestfs provides access to a large part of the LVM2 API, such as " -"L and L. It won't make much sense " -"unless you familiarize yourself with the concepts of physical volumes, " -"volume groups and logical volumes." +#. type: =head1 +#: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297 +msgid "USING GUESTFISH" msgstr "" -# type: textblock -#: ../src/guestfs.pod:254 +#. type: textblock +#: ../cat/virt-cat.pod:170 msgid "" -"This author strongly recommends reading the LVM HOWTO, online at " -"L." +"L is a more powerful, lower level tool which you can use when " +"C doesn't work." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:257 -msgid "DOWNLOADING" +#. type: textblock +#: ../cat/virt-cat.pod:173 +msgid "Using C is approximately equivalent to doing:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:259 +#. type: verbatim +#: ../cat/virt-cat.pod:175 +#, no-wrap msgid "" -"Use L to download small, text only files. This call is " -"limited to files which are less than 2 MB and which cannot contain any ASCII " -"NUL (C<\\0>) characters. However it has a very simple to use API." +" guestfish --ro -i -d domname download file -\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:264 +#. type: textblock +#: ../cat/virt-cat.pod:177 msgid "" -"L can be used to read files which contain arbitrary 8 " -"bit data, since it returns a (pointer, size) pair. However it is still " -"limited to \"small\" files, less than 2 MB." +"where C is the name of the libvirt guest, and C is the full " +"path to the file. Note the final C<-> (meaning \"output to stdout\")." msgstr "" -# type: textblock -#: ../src/guestfs.pod:268 +#. type: textblock +#: ../cat/virt-cat.pod:181 msgid "" -"L can be used to download any file, with no limits on " -"content or size (even files larger than 4 GB)." +"The command above uses libguestfs's guest inspection feature and so does not " +"work on guests that libguestfs cannot inspect, or on things like arbitrary " +"disk images that don't contain guests. To display a file from a disk image " +"directly, use:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:271 -msgid "To download multiple files, see L and L." +#. type: verbatim +#: ../cat/virt-cat.pod:186 +#, no-wrap +msgid "" +" guestfish --ro -a disk.img -m /dev/sda1 download file -\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:274 -msgid "UPLOADING" +#. type: textblock +#: ../cat/virt-cat.pod:188 +msgid "" +"where C is the disk image, C is the filesystem within " +"the disk image, and C is the full path to the file." msgstr "" -# type: textblock -#: ../src/guestfs.pod:276 -msgid "" -"It's often the case that you want to write a file or files to the disk " -"image." +#. type: =head1 +#: ../cat/virt-cat.pod:191 ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352 ../rescue/virt-rescue.pod:262 ../resize/virt-resize.pod:601 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:532 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:733 +msgid "SHELL QUOTING" msgstr "" -# type: textblock -#: ../src/guestfs.pod:279 +#. type: textblock +#: ../cat/virt-cat.pod:193 ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354 ../rescue/virt-rescue.pod:264 ../resize/virt-resize.pod:603 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:534 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:741 msgid "" -"To write a small file with fixed content, use L. To create " -"a file of all zeroes, use L (sparse) or " -"L (with all disk blocks allocated). There are a " -"variety of other functions for creating test files, for example " -"L and L." +"Libvirt guest names can contain arbitrary characters, some of which have " +"meaning to the shell such as C<#> and space. You may need to quote or " +"escape these characters on the command line. See the shell manual page " +"L for details." msgstr "" -# type: textblock -#: ../src/guestfs.pod:285 -msgid "" -"To upload a single file, use L. This call has no limits on " -"file content or size (even files larger than 4 GB)." +#. type: =head1 +#: ../cat/virt-cat.pod:198 ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1081 ../fuse/guestmount.pod:303 ../inspector/virt-inspector.pod:375 ../resize/virt-resize.pod:608 ../test-tool/libguestfs-test-tool.pod:77 +msgid "EXIT STATUS" msgstr "" -# type: textblock -#: ../src/guestfs.pod:288 -msgid "To upload multiple files, see L and L." +#. type: textblock +#: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:305 ../inspector/virt-inspector.pod:377 ../resize/virt-resize.pod:610 +msgid "This program returns 0 if successful, or non-zero if there was an error." msgstr "" -# type: textblock -#: ../src/guestfs.pod:290 +#. type: =head1 +#: ../cat/virt-cat.pod:203 ../cat/virt-filesystems.pod:377 ../cat/virt-ls.pod:495 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1235 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:308 ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:284 ../resize/virt-resize.pod:613 ../ruby/examples/guestfs-ruby.pod:36 ../src/guestfs.pod:3042 ../test-tool/libguestfs-test-tool.pod:87 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:746 +msgid "SEE ALSO" +msgstr "" + +#. type: textblock +#: ../cat/virt-cat.pod:205 msgid "" -"However the fastest way to upload I is to " -"turn them into a squashfs or CD ISO (see L and " -"L), then attach this using L. If you add " -"the drive in a predictable way (eg. adding it last after all other drives) " -"then you can get the device name from L and mount it " -"directly using L. Note that squashfs images are " -"sometimes non-portable between kernel versions, and they don't support " -"labels or UUIDs. If you want to pre-build an image or you need to mount it " -"using a label or UUID, use an ISO image instead." +"L, L, L, L, " +"L, L." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:301 -msgid "COPYING" +#. type: =head1 +#: ../cat/virt-cat.pod:212 ../cat/virt-filesystems.pod:388 ../cat/virt-ls.pod:507 ../df/virt-df.pod:235 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:292 ../resize/virt-resize.pod:634 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:772 +msgid "AUTHOR" msgstr "" -# type: textblock -#: ../src/guestfs.pod:303 -msgid "" -"There are various different commands for copying between files and devices " -"and in and out of the guest filesystem. These are summarised in the table " -"below." +#. type: textblock +#: ../cat/virt-cat.pod:214 ../cat/virt-filesystems.pod:390 ../cat/virt-ls.pod:509 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395 ../rescue/virt-rescue.pod:294 ../resize/virt-resize.pod:636 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774 +msgid "Richard W.M. Jones L" msgstr "" -# type: =item -#: ../src/guestfs.pod:309 -msgid "B to B" +#. type: =head1 +#: ../cat/virt-cat.pod:216 ../cat/virt-filesystems.pod:392 ../cat/virt-ls.pod:511 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372 ../examples/guestfs-examples.pod:48 ../examples/guestfs-recipes.pod:400 ../fish/guestfish.pod:1264 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:323 ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:61 ../ocaml/examples/guestfs-ocaml.pod:94 ../perl/examples/guestfs-perl.pod:55 ../python/examples/guestfs-python.pod:57 ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:638 ../ruby/examples/guestfs-ruby.pod:51 ../src/guestfs.pod:3118 ../test-tool/libguestfs-test-tool.pod:97 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:776 +msgid "COPYRIGHT" msgstr "" -# type: textblock -#: ../src/guestfs.pod:311 +#. type: textblock +#: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405 ../resize/virt-resize.pod:640 +msgid "Copyright (C) 2010-2011 Red Hat Inc." +msgstr "" + +#. type: textblock +#: ../cat/virt-cat.pod:220 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1269 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:407 ../rescue/virt-rescue.pod:300 ../resize/virt-resize.pod:642 ../test-tool/libguestfs-test-tool.pod:102 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:780 msgid "" -"Use L to copy a single file, or L to copy " -"directories recursively." +"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." msgstr "" -# type: =item -#: ../src/guestfs.pod:314 -msgid "B to B" +#. type: textblock +#: ../cat/virt-cat.pod:225 ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1274 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:333 ../inspector/virt-inspector.pod:412 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:647 ../test-tool/libguestfs-test-tool.pod:107 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:785 +msgid "" +"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." msgstr "" -# type: textblock -#: ../src/guestfs.pod:316 +#. type: textblock +#: ../cat/virt-cat.pod:230 ../cat/virt-filesystems.pod:406 ../cat/virt-ls.pod:525 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1279 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:338 ../inspector/virt-inspector.pod:417 ../rescue/virt-rescue.pod:310 ../resize/virt-resize.pod:652 ../test-tool/libguestfs-test-tool.pod:112 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:790 msgid "" -"Use L which efficiently uses L to copy between files and " -"devices in the guest." +"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., 675 Mass " +"Ave, Cambridge, MA 02139, USA." msgstr "" -# type: textblock -#: ../src/guestfs.pod:319 -msgid "Example: duplicate the contents of an LV:" +#. type: textblock +#: ../cat/virt-filesystems.pod:5 +msgid "" +"virt-filesystems - List filesystems, partitions, block devices, LVM in a " +"virtual machine or disk image" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:321 +#. type: verbatim +#: ../cat/virt-filesystems.pod:9 #, no-wrap msgid "" -" guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n" +" virt-filesystems [--options] -d domname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:323 +#. type: verbatim +#: ../cat/virt-filesystems.pod:11 +#, no-wrap msgid "" -"The destination (C) must be at least as large as the source " -"(C). To copy less than the whole source device, use " -"L." +" virt-filesystems [--options] -a disk.img [-a disk.img ...]\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:327 -msgid "B to B" +#. type: textblock +#: ../cat/virt-filesystems.pod:15 +msgid "" +"This tool allows you to discover filesystems, partitions, logical volumes, " +"and their sizes in a disk image or virtual machine. It is a replacement for " +"L and L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:329 -msgid "Use L. See L above." +#. type: textblock +#: ../cat/virt-filesystems.pod:20 +msgid "" +"One use for this tool is from shell scripts to iterate over all filesystems " +"from a disk image:" msgstr "" -# type: =item -#: ../src/guestfs.pod:331 -msgid "B to B" +#. type: verbatim +#: ../cat/virt-filesystems.pod:23 +#, no-wrap +msgid "" +" for fs in $(virt-filesystems -a disk.img); do\n" +" # ...\n" +" done\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:333 -msgid "Use L. See L above." +#. type: textblock +#: ../cat/virt-filesystems.pod:27 +msgid "" +"Another use is to list partitions before using another tool to modify those " +"partitions (such as L). If you are curious about what an " +"unknown disk image contains, use this tool along with L." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:337 -msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS" +#. type: textblock +#: ../cat/virt-filesystems.pod:32 +msgid "" +"Various command line options control what this program displays. You need " +"to give either I<-a> or I<-d> options to specify the disk image or libvirt " +"guest respectively. If you just specify that then the program shows " +"filesystems found, one per line, like this:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:339 +#. type: verbatim +#: ../cat/virt-filesystems.pod:37 +#, no-wrap msgid "" -"Calls like L, L, L, " -"L etc appear to only take filenames as arguments, so it " -"appears you can only upload and download to files. However many Un*x-like " -"hosts let you use the special device files C, C, " -"C and C to read and write from stdin, stdout, " -"stderr, and arbitrary file descriptor N." +" $ virt-filesystems -a disk.img\n" +" /dev/sda1\n" +" /dev/vg_guest/lv_root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:347 -msgid "For example, L writes its output to stdout by doing:" +#. type: textblock +#: ../cat/virt-filesystems.pod:41 +msgid "If you add I<-l> or I<--long> then the output includes extra information:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:350 +#. type: verbatim +#: ../cat/virt-filesystems.pod:44 #, no-wrap msgid "" -" guestfs_download (filename, \"/dev/stdout\");\n" +" $ virt-filesystems -a disk.img -l\n" +" Name Type VFS Label Size\n" +" /dev/sda1 filesystem ext4 boot 524288000\n" +" /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:352 -msgid "and you can write tar output to a pipe C by doing:" +#. type: textblock +#: ../cat/virt-filesystems.pod:49 +msgid "" +"If you add I<--extra> then non-mountable (swap, unknown) filesystems are " +"shown as well:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:354 +#. type: verbatim +#: ../cat/virt-filesystems.pod:52 #, no-wrap msgid "" -" char devfd[64];\n" -" snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n" -" guestfs_tar_out (\"/\", devfd);\n" +" $ virt-filesystems -a disk.img --extra\n" +" /dev/sda1\n" +" /dev/vg_guest/lv_root\n" +" /dev/vg_guest/lv_swap\n" +" /dev/vg_guest/lv_data\n" "\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:358 -msgid "LISTING FILES" +#. type: textblock +#: ../cat/virt-filesystems.pod:58 +msgid "If you add I<--partitions> then partitions are shown instead of filesystems:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:360 +#. type: verbatim +#: ../cat/virt-filesystems.pod:60 +#, no-wrap msgid "" -"L is just designed for humans to read (mainly when using the " -"L-equivalent command C)." +" $ virt-filesystems -a disk.img --partitions\n" +" /dev/sda1\n" +" /dev/sda2\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:363 +#. type: textblock +#: ../cat/virt-filesystems.pod:64 msgid "" -"L is a quick way to get a list of files in a directory from " -"programs, as a flat list of strings." +"Similarly you can use I<--logical-volumes>, I<--volume-groups>, " +"I<--physical-volumes>, I<--block-devices> to list those items." msgstr "" -# type: textblock -#: ../src/guestfs.pod:366 +#. type: textblock +#: ../cat/virt-filesystems.pod:67 msgid "" -"L is a programmatic way to get a list of files in a " -"directory, plus additional information about each one. It is more " -"equivalent to using the L call on a local filesystem." +"You can use these options in combination as well (if you want a combination " +"including filesystems, you have to add I<--filesystems>). Notice that some " +"items fall into several categories (eg. C might be both a " +"partition and a filesystem). These items are listed several times. To get " +"a list which includes absolutely everything that virt-filesystems knows " +"about, use the I<--all> option." msgstr "" -# type: textblock -#: ../src/guestfs.pod:370 +#. type: textblock +#: ../cat/virt-filesystems.pod:74 msgid "" -"L and L can be used to recursively list " -"files." +"UUIDs (because they are quite long) are not shown by default. Add the " +"I<--uuid> option to display device and filesystem UUIDs in the long output." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:373 -msgid "RUNNING COMMANDS" +#. type: textblock +#: ../cat/virt-filesystems.pod:78 +msgid "" +"I<--all --long --uuid> is a useful combination to display all possible " +"information about everything." msgstr "" -# type: textblock -#: ../src/guestfs.pod:375 +#. type: verbatim +#: ../cat/virt-filesystems.pod:81 +#, no-wrap msgid "" -"Although libguestfs is primarily an API for manipulating files inside guest " -"images, we also provide some limited facilities for running commands inside " -"guests." +" $ virt-filesystems -a win.img --all --long --uuid -h\n" +" Name Type VFS Label Size Parent UUID\n" +" /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n" +" /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n" +" /dev/sda1 partition - - 100M /dev/sda -\n" +" /dev/sda2 partition - - 20G /dev/sda -\n" +" /dev/sda device - - 20G - -\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:379 -msgid "There are many limitations to this:" +#. type: textblock +#: ../cat/virt-filesystems.pod:89 +msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values." msgstr "" -# type: =item -#: ../src/guestfs.pod:383 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:397 ../src/guestfs.pod:402 ../src/guestfs.pod:406 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:1006 ../src/guestfs.pod:1010 ../src/guestfs.pod:1014 ../src/guestfs.pod:1019 ../src/guestfs.pod:1027 ../src/guestfs.pod:1046 ../src/guestfs.pod:1054 ../src/guestfs.pod:1076 ../src/guestfs.pod:1080 ../src/guestfs.pod:1084 ../src/guestfs.pod:1088 ../src/guestfs.pod:1092 ../src/guestfs.pod:1096 ../src/guestfs.pod:1578 ../src/guestfs.pod:1583 ../src/guestfs.pod:1587 ../src/guestfs.pod:1697 ../src/guestfs.pod:1702 ../src/guestfs.pod:1706 ../src/guestfs.pod:2058 ../src/guestfs.pod:2064 ../src/guestfs.pod:2069 ../src/guestfs.pod:2075 ../src/guestfs.pod:2187 ../src/guestfs.pod:2191 ../src/guestfs.pod:2195 ../src/guestfs.pod:2199 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:579 ../src/guestfs-actions.pod:586 ../src/guestfs-actions.pod:593 ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:1593 ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1613 ../src/guestfs-actions.pod:1617 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1635 ../src/guestfs-actions.pod:1773 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1787 ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:1857 ../fish/guestfish.pod:427 ../fish/guestfish.pod:431 ../fish/guestfish.pod:435 ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375 ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087 ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095 ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203 ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268 ../tools/virt-win-reg.pl:536 ../tools/virt-win-reg.pl:542 ../tools/virt-win-reg.pl:548 ../tools/virt-resize.pl:345 ../tools/virt-resize.pl:350 ../tools/virt-resize.pl:360 -msgid "*" +#. type: =item +#: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121 +msgid "B<--all>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:385 +#. type: textblock +#: ../cat/virt-filesystems.pod:112 msgid "" -"The kernel version that the command runs under will be different from what " -"it expects." +"Display everything. This is currently the same as specifying these options: " +"I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, " +"I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may " +"be added to this list in future)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:390 -msgid "" -"If the command needs to communicate with daemons, then most likely they " -"won't be running." +#. type: textblock +#: ../cat/virt-filesystems.pod:117 +msgid "See also I<--long>." msgstr "" -# type: textblock -#: ../src/guestfs.pod:395 -msgid "The command will be running in limited memory." +#. type: =item +#: ../cat/virt-filesystems.pod:119 +msgid "B<--blkdevs>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:399 -msgid "" -"The network may not be available unless you enable it (see " -"L)." +#. type: =item +#: ../cat/virt-filesystems.pod:121 +msgid "B<--block-devices>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:404 -msgid "Only supports Linux guests (not Windows, BSD, etc)." +#. type: textblock +#: ../cat/virt-filesystems.pod:123 +msgid "Display block devices." msgstr "" -# type: textblock -#: ../src/guestfs.pod:408 -msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)." +#. type: =item +#: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88 +msgid "B<--csv>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:413 +#. type: textblock +#: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90 msgid "" -"For SELinux guests, you may need to enable SELinux and load policy first. " -"See L in this manpage." +"Write out the results in CSV format (comma-separated values). This format " +"can be imported easily into databases and spreadsheets, but read L below." msgstr "" -# type: textblock -#: ../src/guestfs.pod:418 +#. type: textblock +#: ../cat/virt-filesystems.pod:150 msgid "" -"I It is not safe to run commands from untrusted, possibly " -"malicious guests. These commands may attempt to exploit your program by " -"sending unexpected output. They could also try to exploit the Linux kernel " -"or qemu provided by the libguestfs appliance. They could use the network " -"provided by the libguestfs appliance to bypass ordinary network partitions " -"and firewalls. They could use the elevated privileges or different SELinux " -"context of your program to their advantage." +"When prompting for keys and passphrases, virt-filesystems normally turns " +"echoing off so you cannot see what you are typing. If you are not worried " +"about Tempest attacks and there is no one else in the room you can specify " +"this flag to see what you are typing." msgstr "" -# type: textblock -#: ../src/guestfs.pod:427 -msgid "" -"A secure alternative is to use libguestfs to install a \"firstboot\" script " -"(a script which runs when the guest next boots normally), and to have this " -"script run the commands you want in the normal context of the running guest, " -"network security and so on. For information about other security issues, " -"see L." +#. type: =item +#: ../cat/virt-filesystems.pod:155 +msgid "B<--extra>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:435 +#. type: textblock +#: ../cat/virt-filesystems.pod:157 msgid "" -"The two main API calls to run commands are L and " -"L (there are also variations)." +"This causes filesystems that are not ordinary, mountable filesystems to be " +"displayed. This category includes swapspace, and filesystems that are empty " +"or contain unknown data." msgstr "" -# type: textblock -#: ../src/guestfs.pod:438 -msgid "" -"The difference is that L runs commands using the shell, so any " -"shell globs, redirections, etc will work." +#. type: textblock +#: ../cat/virt-filesystems.pod:161 +msgid "This option implies I<--filesystems>." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:441 -msgid "CONFIGURATION FILES" +#. type: =item +#: ../cat/virt-filesystems.pod:163 +msgid "B<--filesystems>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:443 +#. type: textblock +#: ../cat/virt-filesystems.pod:165 msgid "" -"To read and write configuration files in Linux guest filesystems, we " -"strongly recommend using Augeas. For example, Augeas understands how to " -"read and write, say, a Linux shadow password file or X.org configuration " -"file, and so avoids you having to write that code." +"Display mountable filesystems. If no display option was selected then this " +"option is implied." msgstr "" -# type: textblock -#: ../src/guestfs.pod:448 +#. type: textblock +#: ../cat/virt-filesystems.pod:168 +msgid "With I<--extra>, non-mountable filesystems are shown too." +msgstr "" + +#. type: verbatim +#: ../cat/virt-filesystems.pod:181 +#, no-wrap msgid "" -"The main Augeas calls are bound through the C APIs. We don't " -"document Augeas itself here because there is excellent documentation on the " -"L website." +" virt-filesystems --format=raw -a disk.img\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:452 +#. type: verbatim +#: ../cat/virt-filesystems.pod:185 +#, no-wrap msgid "" -"If you don't want to use Augeas (you fool!) then try calling " -"L to get the file as a list of lines which you can " -"iterate over." +" virt-filesystems --format=raw -a disk.img --format -a another.img\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:456 -msgid "SELINUX" +#. type: =item +#: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:125 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109 +msgid "B<-h>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:458 -msgid "" -"We support SELinux guests. To ensure that labeling happens correctly in " -"SELinux guests, you need to enable SELinux and load the guest's policy:" +#. type: =item +#: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111 +msgid "B<--human-readable>" msgstr "" -# type: =item -#: ../src/guestfs.pod:464 ../src/guestfs.pod:1199 ../src/guestfs.pod:1330 -msgid "1." +#. type: textblock +#: ../cat/virt-filesystems.pod:198 +msgid "In I<--long> mode, display sizes in human-readable format." msgstr "" -# type: textblock -#: ../src/guestfs.pod:466 -msgid "Before launching, do:" +#. type: =item +#: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119 +msgid "B<-l>" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:468 -#, no-wrap -msgid "" -" guestfs_set_selinux (g, 1);\n" -"\n" +#. type: =item +#: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121 +msgid "B<--long>" msgstr "" -# type: =item -#: ../src/guestfs.pod:470 ../src/guestfs.pod:1203 ../src/guestfs.pod:1334 -msgid "2." +#. type: textblock +#: ../cat/virt-filesystems.pod:209 +msgid "Display extra columns of data (\"long format\")." msgstr "" -# type: textblock -#: ../src/guestfs.pod:472 -msgid "" -"After mounting the guest's filesystem(s), load the policy. This is best " -"done by running the L command in the guest itself:" +#. type: textblock +#: ../cat/virt-filesystems.pod:211 +msgid "A title row is added unless you also specify I<--no-title>." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:476 -#, no-wrap +#. type: textblock +#: ../cat/virt-filesystems.pod:213 msgid "" -" guestfs_sh (g, \"/usr/sbin/load_policy\");\n" -"\n" +"The extra columns displayed depend on what output you select, and the " +"ordering of columns may change in future versions. Use the title row, " +"I<--csv> output and/or L to match columns to data in external " +"programs." msgstr "" -# type: textblock -#: ../src/guestfs.pod:478 +#. type: textblock +#: ../cat/virt-filesystems.pod:218 msgid "" -"(Older versions of C require you to specify the name of the " -"policy file)." +"Use I<-h> if you want sizes to be displayed in human-readable format. The " +"default is to show raw numbers of I." msgstr "" -# type: =item -#: ../src/guestfs.pod:481 ../src/guestfs.pod:1340 -msgid "3." +#. type: textblock +#: ../cat/virt-filesystems.pod:221 +msgid "Use I<--uuid> to display UUIDs too." msgstr "" -# type: textblock -#: ../src/guestfs.pod:483 -msgid "" -"Optionally, set the security context for the API. The correct security " -"context to use can only be known by inspecting the guest. As an example:" +#. type: =item +#: ../cat/virt-filesystems.pod:223 +msgid "B<--lvs>" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:487 -#, no-wrap -msgid "" -" guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n" -"\n" +#. type: =item +#: ../cat/virt-filesystems.pod:225 +msgid "B<--logvols>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:491 -msgid "This will work for running commands and editing existing files." +#. type: =item +#: ../cat/virt-filesystems.pod:227 +msgid "B<--logical-volumes>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:493 +#. type: textblock +#: ../cat/virt-filesystems.pod:229 msgid "" -"When new files are created, you may need to label them explicitly, for " -"example by running the external command C." +"Display LVM logical volumes. In this mode, these are displayed irrespective " +"of whether the LVs contain filesystems." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:497 -msgid "UMASK" +#. type: =item +#: ../cat/virt-filesystems.pod:232 +msgid "B<--no-title>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:499 -msgid "" -"Certain calls are affected by the current file mode creation mask (the " -"\"umask\"). In particular ones which create files or directories, such as " -"L, L or L. This affects " -"either the default mode that the file is created with or modifies the mode " -"that you supply." +#. type: textblock +#: ../cat/virt-filesystems.pod:234 +msgid "In I<--long> mode, don't add a title row." msgstr "" -# type: textblock -#: ../src/guestfs.pod:505 +#. type: textblock +#: ../cat/virt-filesystems.pod:236 msgid "" -"The default umask is C<022>, so files are created with modes such as C<0644> " -"and directories with C<0755>." +"Note that the order of the columns is not fixed, and may change in future " +"versions of virt-filesystems, so using this option may give you unexpected " +"surprises." msgstr "" -# type: textblock -#: ../src/guestfs.pod:508 +#. type: =item +#: ../cat/virt-filesystems.pod:240 +msgid "B<--parts>" +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:242 +msgid "B<--partitions>" +msgstr "" + +#. type: textblock +#: ../cat/virt-filesystems.pod:244 msgid "" -"There are two ways to avoid being affected by umask. Either set umask to 0 " -"(call C early after launching). Or call " -"L after creating each file or directory." +"Display partitions. In this mode, these are displayed irrespective of " +"whether the partitions contain filesystems." msgstr "" -# type: textblock -#: ../src/guestfs.pod:512 -msgid "For more information about umask, see L." +#. type: =item +#: ../cat/virt-filesystems.pod:247 +msgid "B<--pvs>" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:514 ../fish/guestfish.pod:720 -msgid "ENCRYPTED DISKS" +#. type: =item +#: ../cat/virt-filesystems.pod:249 +msgid "B<--physvols>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:516 -msgid "" -"Libguestfs allows you to access Linux guests which have been encrypted using " -"whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) " -"standard. This includes nearly all whole disk encryption systems used by " -"modern Linux guests." +#. type: =item +#: ../cat/virt-filesystems.pod:251 +msgid "B<--physical-volumes>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:522 -msgid "" -"Use L to identify LUKS-encrypted block devices (it " -"returns the string C)." +#. type: textblock +#: ../cat/virt-filesystems.pod:253 +msgid "Display LVM physical volumes." msgstr "" -# type: textblock -#: ../src/guestfs.pod:525 -msgid "" -"Then open these devices by calling L. Obviously you " -"will require the passphrase!" +#. type: =item +#: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163 +msgid "B<--uuid>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:528 -msgid "" -"Opening a LUKS device creates a new device mapper device called " -"C (where C is the string you supply to " -"L). Reads and writes to this mapper device are " -"decrypted from and encrypted to the underlying block device respectively." +#. type: =item +#: ../cat/virt-filesystems.pod:257 +msgid "B<--uuids>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:534 -msgid "" -"LVM volume groups on the device can be made visible by calling " -"L followed by L. The logical " -"volume(s) can now be mounted in the usual way." +#. type: textblock +#: ../cat/virt-filesystems.pod:259 +msgid "In I<--long> mode, display UUIDs as well." msgstr "" -# type: textblock -#: ../src/guestfs.pod:538 -msgid "" -"Use the reverse process to close a LUKS device. Unmount any logical volumes " -"on it, deactivate the volume groups by caling C. Then close the mapper device by calling " -"L on the C device (I the " -"underlying encrypted block device)." +#. type: =item +#: ../cat/virt-filesystems.pod:273 +msgid "B<--vgs>" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:545 -msgid "INSPECTION" +#. type: =item +#: ../cat/virt-filesystems.pod:275 +msgid "B<--volgroups>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:547 -msgid "" -"Libguestfs has APIs for inspecting an unknown disk image to find out if it " -"contains operating systems. (These APIs used to be in a separate Perl-only " -"library called L but since version 1.5.3 the most " -"frequently used part of this library has been rewritten in C and moved into " -"the core code)." +#. type: =item +#: ../cat/virt-filesystems.pod:277 +msgid "B<--volume-groups>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:553 -msgid "" -"Add all disks belonging to the unknown virtual machine and call " -"L in the usual way." +#. type: textblock +#: ../cat/virt-filesystems.pod:279 +msgid "Display LVM volume groups." msgstr "" -# type: textblock -#: ../src/guestfs.pod:556 -msgid "" -"Then call L. This function uses other libguestfs calls " -"and certain heuristics, and returns a list of operating systems that were " -"found. An empty list means none were found. A single element is the root " -"filesystem of the operating system. For dual- or multi-boot guests, " -"multiple roots can be returned, each one corresponding to a separate " -"operating system. (Multi-boot virtual machines are extremely rare in the " -"world of virtualization, but since this scenario can happen, we have built " -"libguestfs to deal with it.)" +#. type: =head1 +#: ../cat/virt-filesystems.pod:287 +msgid "COLUMNS" msgstr "" -# type: textblock -#: ../src/guestfs.pod:565 +#. type: textblock +#: ../cat/virt-filesystems.pod:289 msgid "" -"For each root, you can then call various C functions " -"to get additional details about that operating system. For example, call " -"L to return the string C or C for " -"Windows and Linux-based operating systems respectively." +"Note that columns in the output are subject to reordering and change in " +"future versions of this tool." msgstr "" -# type: textblock -#: ../src/guestfs.pod:571 -msgid "" -"Un*x-like and Linux-based operating systems usually consist of several " -"filesystems which are mounted at boot time (for example, a separate boot " -"partition mounted on C). The inspection rules are able to detect how " -"filesystems correspond to mount points. Call " -"C to get this mapping. It might return a " -"hash table like this example:" +#. type: =item +#: ../cat/virt-filesystems.pod:294 +msgid "B" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:578 -#, no-wrap -msgid "" -" /boot => /dev/sda1\n" -" / => /dev/vg_guest/lv_root\n" -" /usr => /dev/vg_guest/lv_usr\n" -"\n" +#. type: textblock +#: ../cat/virt-filesystems.pod:296 +msgid "The filesystem, partition, block device or LVM name." msgstr "" -# type: textblock -#: ../src/guestfs.pod:582 +#. type: textblock +#: ../cat/virt-filesystems.pod:298 msgid "" -"The caller can then make calls to L to mount the " -"filesystems as suggested." +"For device and partition names these are displayed as canonical libguestfs " +"names, so that for example C is the second partition on the first " +"device." msgstr "" -# type: textblock -#: ../src/guestfs.pod:585 +#. type: textblock +#: ../cat/virt-filesystems.pod:302 msgid "" -"Be careful to mount filesystems in the right order (eg. C before " -"C). Sorting the keys of the hash by length, shortest first, should " -"work." +"If the I<--long> option is B specified, then only the name column is " +"shown in the output." msgstr "" -# type: textblock -#: ../src/guestfs.pod:589 -msgid "" -"Inspection currently only works for some common operating systems. " -"Contributors are welcome to send patches for other operating systems that we " -"currently cannot detect." +#. type: =item +#: ../cat/virt-filesystems.pod:305 +msgid "B" msgstr "" -# type: textblock -#: ../src/guestfs.pod:593 -msgid "" -"Encrypted disks must be opened before inspection. See L " -"for more details. The L function just ignores any " -"encrypted devices." +#. type: textblock +#: ../cat/virt-filesystems.pod:307 +msgid "The object type, for example C, C, C etc." +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:309 +msgid "B" msgstr "" -# type: textblock -#: ../src/guestfs.pod:597 +#. type: textblock +#: ../cat/virt-filesystems.pod:311 msgid "" -"A note on the implementation: The call L performs " -"inspection and caches the results in the guest handle. Subsequent calls to " -"C return this cached information, but I " -"re-read the disks. If you change the content of the guest disks, you can " -"redo inspection by calling L again. " -"(L works a little differently from the " -"other calls and does read the disks. See documentation for that function " -"for details)." +"If there is a filesystem, then this column displays the filesystem type if " +"one could be detected, eg. C." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:606 -msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS" +#. type: =item +#: ../cat/virt-filesystems.pod:314 +msgid "B." +"The size of the object in bytes. If the I<--human> option is used then the " +"size is displayed in a human-readable form." msgstr "" -# type: textblock -#: ../src/guestfs.pod:619 -msgid "" -"Drive letter mappings are outside the scope of libguestfs. You have to use " -"libguestfs to read the appropriate Windows Registry and configuration files, " -"to determine yourself how drives are mapped (see also L and " -"L)." +#. type: =item +#: ../cat/virt-filesystems.pod:324 +msgid "B" msgstr "" -# type: textblock -#: ../src/guestfs.pod:624 +#. type: textblock +#: ../cat/virt-filesystems.pod:326 msgid "" -"Replacing backslash characters with forward slash characters is also outside " -"the scope of libguestfs, but something that you can easily do." +"The parent column records the parent relationship between objects. For " +"example, if the object is a partition, then this column contains the name of " +"the containing device. If the object is a logical volume, then this column " +"is the name of the volume group." +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:331 +msgid "B" msgstr "" -# type: textblock -#: ../src/guestfs.pod:627 +#. type: textblock +#: ../cat/virt-filesystems.pod:333 msgid "" -"Where we can help is in resolving the case insensitivity of paths. For " -"this, call L." +"If the object has a UUID (used for identifying and mounting filesystems and " +"block devices) then this column contains the UUID as a string." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:630 -msgid "ACCESSING THE WINDOWS REGISTRY" +#. type: textblock +#: ../cat/virt-filesystems.pod:337 +msgid "The UUID is only displayed if the I<--uuid> option is given." +msgstr "" + +#. type: =head1 +#: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459 ../df/virt-df.pod:191 +msgid "NOTE ABOUT CSV FORMAT" msgstr "" -# type: textblock -#: ../src/guestfs.pod:632 +#. type: textblock +#: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461 ../df/virt-df.pod:193 msgid "" -"Libguestfs also provides some help for decoding Windows Registry \"hive\" " -"files, through the library C which is part of the libguestfs project " -"although ships as a separate tarball. You have to locate and download the " -"hive file(s) yourself, and then pass them to C functions. See also " -"the programs L, L, L and " -"L for more help on this issue." +"Comma-separated values (CSV) is a deceptive format. It I like it " +"should be easy to parse, but it is definitely not easy to parse." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:640 -msgid "SYMLINKS ON NTFS-3G FILESYSTEMS" +#. type: textblock +#: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464 ../df/virt-df.pod:196 +msgid "" +"Myth: Just split fields at commas. Reality: This does I work " +"reliably. This example has two columns:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:642 +#. type: verbatim +#: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467 ../df/virt-df.pod:199 +#, no-wrap msgid "" -"Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to " -"provide something which looks like a Linux symlink. The way it tries to do " -"the rewriting is described here:" +" \"foo,bar\",baz\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:646 -msgid "L" +#. type: textblock +#: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469 ../df/virt-df.pod:201 +msgid "" +"Myth: Read the file one line at a time. Reality: This does I work " +"reliably. This example has one row:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:648 +#. type: verbatim +#: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472 ../df/virt-df.pod:204 +#, no-wrap msgid "" -"The essential problem is that ntfs-3g simply does not have enough " -"information to do a correct job. NTFS links can contain drive letters and " -"references to external device GUIDs that ntfs-3g has no way of resolving. " -"It is almost certainly the case that libguestfs callers should ignore what " -"ntfs-3g does (ie. don't use L on NTFS volumes)." +" \"foo\n" +" bar\",baz\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:655 +#. type: textblock +#: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475 ../df/virt-df.pod:207 msgid "" -"Instead if you encounter a symbolic link on an ntfs-3g filesystem, use " -"L to read the C extended " -"attribute, and read the raw reparse data from that (you can find the format " -"documented in various places around the web)." +"For shell scripts, use C (L also " +"packaged in major Linux distributions)." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:660 -msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS" +#. type: textblock +#: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478 ../df/virt-df.pod:210 +msgid "" +"For other languages, use a CSV processing library (eg. C for Perl " +"or Python's built-in csv library)." +msgstr "" + +#. type: textblock +#: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481 ../df/virt-df.pod:213 +msgid "Most spreadsheets and databases can import CSV directly." msgstr "" -# type: textblock -#: ../src/guestfs.pod:662 +#. type: textblock +#: ../cat/virt-filesystems.pod:379 msgid "" -"There are other useful extended attributes that can be read from ntfs-3g " -"filesystems (using L). See:" +"L, L, L, L, " +"L, L, L, " +"L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:665 -msgid "L" +#. type: textblock +#: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570 ../tools/virt-win-reg.pl:778 +msgid "Copyright (C) 2010 Red Hat Inc." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:667 -msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES" +#. type: textblock +#: ../cat/virt-ls.pod:5 +msgid "virt-ls - List files in a virtual machine" msgstr "" -# type: textblock -#: ../src/guestfs.pod:669 +#. type: verbatim +#: ../cat/virt-ls.pod:9 +#, no-wrap msgid "" -"Although we don't want to discourage you from using the C API, we will " -"mention here that the same API is also available in other languages." +" virt-ls [--options] -d domname directory [directory ...]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:672 +#. type: verbatim +#: ../cat/virt-ls.pod:11 +#, no-wrap msgid "" -"The API is broadly identical in all supported languages. This means that " -"the C call C is C<$g-Emount($path)> in Perl, " -"C in Python, and C in OCaml. In other " -"words, a straightforward, predictable isomorphism between each language." +" virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory " +"...]\n" +"\n" +msgstr "" + +#. type: textblock +#: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13 +msgid "Old style:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:678 +#. type: verbatim +#: ../cat/virt-ls.pod:15 +#, no-wrap msgid "" -"Error messages are automatically transformed into exceptions if the language " -"supports it." +" virt-ls [--options] domname directory\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:681 +#. type: verbatim +#: ../cat/virt-ls.pod:17 +#, no-wrap msgid "" -"We don't try to \"object orientify\" parts of the API in OO languages, " -"although contributors are welcome to write higher level APIs above what we " -"provide in their favourite languages if they wish." +" virt-ls [--options] disk.img [disk.img ...] directory\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:687 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:21 +msgid "" +"C lists filenames, file sizes, checksums, extended attributes and " +"more from a virtual machine or disk image." msgstr "" -# type: textblock -#: ../src/guestfs.pod:689 +#. type: textblock +#: ../cat/virt-ls.pod:24 msgid "" -"You can use the I header file from C++ programs. The C++ API is " -"identical to the C API. C++ classes and exceptions are not used." +"Multiple directory names can be given, in which case the output from each is " +"concatenated." msgstr "" -# type: =item -#: ../src/guestfs.pod:693 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:27 +msgid "" +"To list directories from a libvirt guest use the I<-d> option to specify the " +"name of the guest. For a disk image, use the I<-a> option." msgstr "" -# type: textblock -#: ../src/guestfs.pod:695 +#. type: textblock +#: ../cat/virt-ls.pod:31 msgid "" -"The C# bindings are highly experimental. Please read the warnings at the " -"top of C." +"C can do many simple file listings. For more complicated cases you " +"may need to use L, or write a program directly to the " +"L API." msgstr "" -# type: =item -#: ../src/guestfs.pod:698 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:37 +msgid "Get a list of all files and directories in a virtual machine:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:700 +#. type: verbatim +#: ../cat/virt-ls.pod:39 +#, no-wrap msgid "" -"This is the only language binding that is working but incomplete. Only " -"calls which return simple integers have been bound in Haskell, and we are " -"looking for help to complete this binding." +" virt-ls -R -d guest /\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:704 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:41 +msgid "List all setuid or setgid programs in a Linux virtual machine:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:706 +#. type: verbatim +#: ../cat/virt-ls.pod:43 +#, no-wrap msgid "" -"Full documentation is contained in the Javadoc which is distributed with " -"libguestfs." +" virt-ls -lR -d guest / | grep '^- [42]'\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:709 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:45 +msgid "List all public-writable directories in a Linux virtual machine:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:711 -msgid "For documentation see L." +#. type: verbatim +#: ../cat/virt-ls.pod:47 +#, no-wrap +msgid "" +" virt-ls -lR -d guest / | grep '^d ...7'\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:713 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:49 +msgid "List all Unix domain sockets in a Linux virtual machine:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:715 -msgid "For documentation see L." +#. type: verbatim +#: ../cat/virt-ls.pod:51 +#, no-wrap +msgid "" +" virt-ls -lR -d guest / | grep '^s'\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:717 -msgid "B" +#. type: textblock +#: ../cat/virt-ls.pod:53 +msgid "List all regular files with filenames ending in '.png':" msgstr "" -# type: textblock -#: ../src/guestfs.pod:719 +#. type: verbatim +#: ../cat/virt-ls.pod:55 +#, no-wrap msgid "" -"For documentation see C supplied with libguestfs sources or in " -"the php-libguestfs package for your distribution." +" virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:722 -msgid "The PHP binding only works correctly on 64 bit machines." +#. type: textblock +#: ../cat/virt-ls.pod:57 +msgid "To display files larger than 10MB in home directories:" msgstr "" -# type: =item -#: ../src/guestfs.pod:724 -msgid "B" +#. type: verbatim +#: ../cat/virt-ls.pod:59 +#, no-wrap +msgid "" +" virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:726 -msgid "For documentation see L." +#. type: textblock +#: ../cat/virt-ls.pod:61 +msgid "Find everything modified in the last 7 days:" msgstr "" -# type: =item -#: ../src/guestfs.pod:728 -msgid "B" +#. type: verbatim +#: ../cat/virt-ls.pod:63 +#, no-wrap +msgid "" +" virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:730 -msgid "For documentation see L." +#. type: textblock +#: ../cat/virt-ls.pod:65 +msgid "Find regular files modified in the last 24 hours:" msgstr "" -# type: =item -#: ../src/guestfs.pod:732 -msgid "B" +#. type: verbatim +#: ../cat/virt-ls.pod:67 +#, no-wrap +msgid "" +" virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:734 -msgid "For documentation see L." +#. type: =head2 +#: ../cat/virt-ls.pod:69 +msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:738 -msgid "LIBGUESTFS GOTCHAS" +#. type: textblock +#: ../cat/virt-ls.pod:71 +msgid "" +"Find the differences between files in a guest and an earlier snapshot of the " +"same guest." msgstr "" -# type: textblock -#: ../src/guestfs.pod:740 +#. type: verbatim +#: ../cat/virt-ls.pod:74 +#, no-wrap msgid "" -"L: \"A feature of a " -"system [...] that works in the way it is documented but is counterintuitive " -"and almost invites mistakes.\"" +" virt-ls -lR -a snapshot.img / --uids --time-t > old\n" +" virt-ls -lR -a current.img / --uids --time-t > new\n" +" diff -u old new | less\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:744 +#. type: textblock +#: ../cat/virt-ls.pod:78 msgid "" -"Since we developed libguestfs and the associated tools, there are several " -"things we would have designed differently, but are now stuck with for " -"backwards compatibility or other reasons. If there is ever a libguestfs 2.0 " -"release, you can expect these to change. Beware of them." +"The commands above won't find files where the content has changed but the " +"metadata (eg. file size and modification date) is the same. To do that, you " +"need to add the I<--checksum> parameter to both C commands. " +"I<--checksum> can be quite slow since it has to read and compute a checksum " +"of every regular file in the virtual machine." msgstr "" -# type: =item -#: ../src/guestfs.pod:752 -msgid "Autosync / forgetting to sync." +#. type: =head1 +#: ../cat/virt-ls.pod:84 +msgid "OUTPUT MODES" msgstr "" -# type: textblock -#: ../src/guestfs.pod:754 +#. type: textblock +#: ../cat/virt-ls.pod:86 msgid "" -"When modifying a filesystem from C or another language, you B unmount " -"all filesystems and call L explicitly before you close the " -"libguestfs handle. You can also call:" +"C has four output modes, controlled by different combinations of " +"the I<-l> and I<-R> options." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:758 +#. type: =head2 +#: ../cat/virt-ls.pod:89 +msgid "SIMPLE LISTING" +msgstr "" + +#. type: textblock +#: ../cat/virt-ls.pod:91 +msgid "A simple listing is like the ordinary L command:" +msgstr "" + +#. type: verbatim +#: ../cat/virt-ls.pod:93 #, no-wrap msgid "" -" guestfs_set_autosync (g, 1);\n" +" $ virt-ls -d guest /\n" +" bin\n" +" boot\n" +" [etc.]\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:760 -msgid "" -"to have the unmount/sync done automatically for you when the handle 'g' is " -"closed. (This feature is called \"autosync\", L " -"q.v.)" +#. type: =head2 +#: ../cat/virt-ls.pod:98 +msgid "LONG LISTING" msgstr "" -# type: textblock -#: ../src/guestfs.pod:764 +#. type: textblock +#: ../cat/virt-ls.pod:100 msgid "" -"If you forget to do this, then it is entirely possible that your changes " -"won't be written out, or will be partially written, or (very rarely) that " -"you'll get disk corruption." +"With the I<-l> (I<--long>) option, the output is like the C command " +"(more specifically, like the C function)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:768 +#. type: verbatim +#: ../cat/virt-ls.pod:103 +#, no-wrap msgid "" -"Note that in L autosync is the default. So quick and dirty " -"guestfish scripts that forget to sync will work just fine, which can make " -"this very puzzling if you are trying to debug a problem." +" $ virt-ls -l -d guest /\n" +" total 204\n" +" dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n" +" dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n" +" [etc.]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:772 +#. type: textblock +#: ../cat/virt-ls.pod:109 msgid "" -"Update: Autosync is enabled by default for all API users starting from " -"libguestfs 1.5.24." +"Note that while this is useful for displaying a directory, do not try " +"parsing this output in another program. Use L " +"instead." msgstr "" -# type: =item -#: ../src/guestfs.pod:775 -msgid "Mount option C<-o sync> should not be the default." +#. type: =head2 +#: ../cat/virt-ls.pod:113 +msgid "RECURSIVE LISTING" msgstr "" -# type: textblock -#: ../src/guestfs.pod:777 +#. type: textblock +#: ../cat/virt-ls.pod:115 msgid "" -"If you use L, then C<-o sync,noatime> are added implicitly. " -"However C<-o sync> does not add any reliability benefit, but does have a " -"very large performance impact." +"With the I<-R> (I<--recursive>) option, C lists the names of files " +"and directories recursively:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:781 +#. type: verbatim +#: ../cat/virt-ls.pod:118 +#, no-wrap msgid "" -"The work around is to use L and set the mount " -"options that you actually want to use." +" $ virt-ls -R -d guest /tmp\n" +" foo\n" +" foo/bar\n" +" [etc.]\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:784 -msgid "Read-only should be the default." +#. type: textblock +#: ../cat/virt-ls.pod:123 +msgid "" +"To generate this output, C runs the C function and " +"converts C<\\0> characters to C<\\n>." +msgstr "" + +#. type: =head2 +#: ../cat/virt-ls.pod:126 +msgid "RECURSIVE LONG LISTING" msgstr "" -# type: textblock -#: ../src/guestfs.pod:786 +#. type: textblock +#: ../cat/virt-ls.pod:128 msgid "" -"In L, I<--ro> should be the default, and you should have to " -"specify I<--rw> if you want to make changes to the image." +"Using I<-lR> options together changes the output to display directories " +"recursively, with file stats, and optionally other features such as " +"checksums and extended attributes." msgstr "" -# type: textblock -#: ../src/guestfs.pod:789 -msgid "This would reduce the potential to corrupt live VM images." +#. type: textblock +#: ../cat/virt-ls.pod:132 +msgid "" +"Most of the interesting features of C are only available when using " +"I<-lR> mode." msgstr "" -# type: textblock -#: ../src/guestfs.pod:791 +#. type: textblock +#: ../cat/virt-ls.pod:135 msgid "" -"Note that many filesystems change the disk when you just mount and unmount, " -"even if you didn't perform any writes. You need to use " -"L to guarantee that the disk is not changed." +"The fields are normally space-separated. Filenames are B quoted, so " +"you cannot use the output in another program (because filenames can contain " +"spaces and other unsafe characters). If the guest was untrusted and someone " +"knew you were using C to analyze the guest, they could play tricks " +"on you by creating filenames with embedded newline characters. To B " +"parse the output in another program, use the I<--csv> (Comma-Separated " +"Values) option." msgstr "" -# type: =item -#: ../src/guestfs.pod:795 -msgid "guestfish command line is hard to use." +#. type: textblock +#: ../cat/virt-ls.pod:143 +msgid "" +"Note that this output format is completely unrelated to the C " +"command." msgstr "" -# type: textblock -#: ../src/guestfs.pod:797 +#. type: verbatim +#: ../cat/virt-ls.pod:146 +#, no-wrap msgid "" -"C doesn't do what people expect (open C for " -"examination). It tries to run a guestfish command C which doesn't " -"exist, so it fails. In earlier versions of guestfish the error message was " -"also unintuitive, but we have corrected this since. Like the Bourne shell, " -"we should have used C to run commands." +" $ virt-ls -lR -d guest /bin\n" +" d 0555 4096 /bin\n" +" - 0755 123 /bin/alsaunmute\n" +" - 0755 28328 /bin/arch\n" +" l 0777 4 /bin/awk -> gawk\n" +" - 0755 27216 /bin/basename\n" +" - 0755 943360 /bin/bash\n" +" [etc.]\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:804 -msgid "guestfish megabyte modifiers don't work right on all commands" +#. type: textblock +#: ../cat/virt-ls.pod:155 +msgid "These basic fields are always shown:" +msgstr "" + +#. type: =item +#: ../cat/virt-ls.pod:159 +msgid "type" msgstr "" -# type: textblock -#: ../src/guestfs.pod:806 +#. type: textblock +#: ../cat/virt-ls.pod:161 msgid "" -"In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for " -"other modifiers). What guestfish actually does is to multiply the number " -"part by the modifier part and pass the result to the C API. However this " -"doesn't work for a few APIs which aren't expecting bytes, but are already " -"expecting some other unit (eg. megabytes)." +"The file type, one of: C<-> (regular file), C (directory), C " +"(character device), C (block device), C

(named pipe), C (symbolic " +"link), C (socket) or C (unknown)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:813 -msgid "The most common is L. The guestfish command:" +#. type: =item +#: ../cat/virt-ls.pod:171 +msgid "permissions" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:815 -#, no-wrap -msgid "" -" lvcreate LV VG 100M\n" -"\n" +#. type: textblock +#: ../cat/virt-ls.pod:173 +msgid "The Unix permissions, displayed as a 4 digit octal number." msgstr "" -# type: textblock -#: ../src/guestfs.pod:817 -msgid "" -"does not do what you might expect. Instead because L is " -"already expecting megabytes, this tries to create a 100 I (100 " -"megabytes * megabytes) logical volume. The error message you get from this " -"is also a little obscure." +#. type: =item +#: ../cat/virt-ls.pod:175 +msgid "size" msgstr "" -# type: textblock -#: ../src/guestfs.pod:822 +#. type: textblock +#: ../cat/virt-ls.pod:177 msgid "" -"This could be fixed in the generator by specially marking parameters and " -"return values which take bytes or other units." +"The size of the file. This is shown in bytes unless I<-h> or " +"I<--human-readable> option is given, in which case this is shown as a " +"human-readable number." msgstr "" -# type: =item -#: ../src/guestfs.pod:825 -msgid "Ambiguity between devices and paths" +#. type: =head2 +#: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4188 +msgid "path" msgstr "" -# type: textblock -#: ../src/guestfs.pod:827 -msgid "" -"There is a subtle ambiguity in the API between a device name " -"(eg. C) and a similar pathname. A file might just happen to be " -"called C in the directory C (consider some non-Unix VM image)." +#. type: textblock +#: ../cat/virt-ls.pod:183 +msgid "The full path of the file or directory." msgstr "" -# type: textblock -#: ../src/guestfs.pod:832 -msgid "" -"In the current API we usually resolve this ambiguity by having two separate " -"calls, for example L and L. " -"Some API calls are ambiguous and (incorrectly) resolve the problem by " -"detecting if the path supplied begins with C." +#. type: =item +#: ../cat/virt-ls.pod:185 +msgid "link" +msgstr "" + +#. type: textblock +#: ../cat/virt-ls.pod:187 +msgid "For symbolic links only, the link target." msgstr "" -# type: textblock -#: ../src/guestfs.pod:838 +#. type: textblock +#: ../cat/virt-ls.pod:191 msgid "" -"To avoid both the ambiguity and the need to duplicate some calls, we could " -"make paths/devices into structured names. One way to do this would be to " -"use a notation like grub (C), although nobody really likes this " -"aspect of grub. Another way would be to use a structured type, equivalent " -"to this OCaml type:" +"In I<-lR> mode, additional command line options enable the display of more " +"fields." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:844 -#, no-wrap +#. type: textblock +#: ../cat/virt-ls.pod:194 msgid "" -" type path = Path of string | Device of int | Partition of int * int\n" -"\n" +"With the I<--uids> flag, these additional fields are displayed before the " +"path:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:846 -msgid "which would allow you to pass arguments like:" +#. type: =item +#: ../cat/virt-ls.pod:199 +msgid "uid" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:848 -#, no-wrap -msgid "" -" Path \"/foo/bar\"\n" -" Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n" -" Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n" -" Path \"/dev/sdb2\" (* not a device *)\n" -"\n" +#. type: =item +#: ../cat/virt-ls.pod:201 +msgid "gid" msgstr "" -# type: textblock -#: ../src/guestfs.pod:853 +#. type: textblock +#: ../cat/virt-ls.pod:203 msgid "" -"As you can see there are still problems to resolve even with this " -"representation. Also consider how it might work in guestfish." +"The UID and GID of the owner of the file (displayed numerically). Note " +"these only make sense in the context of a Unix-like guest." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:858 -msgid "PROTOCOL LIMITS" +#. type: textblock +#: ../cat/virt-ls.pod:208 +msgid "With the I<--times> flag, these additional fields are displayed:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:860 -msgid "" -"Internally libguestfs uses a message-based protocol to pass API calls and " -"their responses to and from a small \"appliance\" (see L for " -"plenty more detail about this). The maximum message size used by the " -"protocol is slightly less than 4 MB. For some API calls you may need to be " -"aware of this limit. The API calls which may be affected are individually " -"documented, with a link back to this section of the documentation." +#. type: =item +#: ../cat/virt-ls.pod:212 +msgid "atime" msgstr "" -# type: textblock -#: ../src/guestfs.pod:868 -msgid "" -"A simple call such as L returns its result (the file data) in " -"a simple string. Because this string is at some point internally encoded as " -"a message, the maximum size that it can return is slightly under 4 MB. If " -"the requested file is larger than this then you will get an error." +#. type: textblock +#: ../cat/virt-ls.pod:214 +msgid "The time of last access." msgstr "" -# type: textblock -#: ../src/guestfs.pod:874 -msgid "" -"In order to transfer large files into and out of the guest filesystem, you " -"need to use particular calls that support this. The sections L " -"and L document how to do this." +#. type: =item +#: ../cat/virt-ls.pod:216 +msgid "mtime" msgstr "" -# type: textblock -#: ../src/guestfs.pod:878 -msgid "" -"You might also consider mounting the disk image using our FUSE filesystem " -"support (L)." +#. type: textblock +#: ../cat/virt-ls.pod:218 +msgid "The time of last modification." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:881 -msgid "KEYS AND PASSPHRASES" +#. type: =item +#: ../cat/virt-ls.pod:220 +msgid "ctime" msgstr "" -# type: textblock -#: ../src/guestfs.pod:883 -msgid "" -"Certain libguestfs calls take a parameter that contains sensitive key " -"material, passed in as a C string." +#. type: textblock +#: ../cat/virt-ls.pod:222 +msgid "The time of last status change." msgstr "" -# type: textblock -#: ../src/guestfs.pod:886 +#. type: textblock +#: ../cat/virt-ls.pod:226 msgid "" -"In the future we would hope to change the libguestfs implementation so that " -"keys are L-ed into physical RAM, and thus can never end up in " -"swap. However this is I done at the moment, because of the complexity " -"of such an implementation." +"The time fields are displayed as string dates and times, unless one of the " +"I<--time-t>, I<--time-relative> or I<--time-days> flags is given." msgstr "" -# type: textblock -#: ../src/guestfs.pod:891 -msgid "" -"Therefore you should be aware that any key parameter you pass to libguestfs " -"might end up being written out to the swap partition. If this is a concern, " -"scrub the swap partition or don't use libguestfs on encrypted devices." +#. type: textblock +#: ../cat/virt-ls.pod:229 +msgid "With the I<--extra-stats> flag, these additional fields are displayed:" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:896 -msgid "MULTIPLE HANDLES AND MULTIPLE THREADS" +#. type: =item +#: ../cat/virt-ls.pod:233 +msgid "device" msgstr "" -# type: textblock -#: ../src/guestfs.pod:898 +#. type: textblock +#: ../cat/virt-ls.pod:235 msgid "" -"All high-level libguestfs actions are synchronous. If you want to use " -"libguestfs asynchronously then you must create a thread." +"The device containing the file (displayed as major:minor). This may not " +"match devices as known to the guest." msgstr "" -# type: textblock -#: ../src/guestfs.pod:901 -msgid "" -"Only use the handle from a single thread. Either use the handle exclusively " -"from one thread, or provide your own mutex so that two threads cannot issue " -"calls on the same handle at the same time." +#. type: =item +#: ../cat/virt-ls.pod:238 +msgid "inode" msgstr "" -# type: textblock -#: ../src/guestfs.pod:905 -msgid "" -"See the graphical program guestfs-browser for one possible architecture for " -"multithreaded programs using libvirt and libguestfs." +#. type: textblock +#: ../cat/virt-ls.pod:240 +msgid "The inode number." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:908 -msgid "PATH" +#. type: =item +#: ../cat/virt-ls.pod:242 +msgid "nlink" msgstr "" -# type: textblock -#: ../src/guestfs.pod:910 -msgid "" -"Libguestfs needs a kernel and initrd.img, which it finds by looking along an " -"internal path." +#. type: textblock +#: ../cat/virt-ls.pod:244 +msgid "The number of hard links." msgstr "" -# type: textblock -#: ../src/guestfs.pod:913 -msgid "" -"By default it looks for these in the directory C<$libdir/guestfs> " -"(eg. C or C)." +#. type: =item +#: ../cat/virt-ls.pod:246 +msgid "rdev" msgstr "" -# type: textblock -#: ../src/guestfs.pod:916 -msgid "" -"Use L or set the environment variable L " -"to change the directories that libguestfs will search in. The value is a " -"colon-separated list of paths. The current directory is I searched " -"unless the path contains an empty element or C<.>. For example " -"C would search the current directory and " -"then C." +#. type: textblock +#: ../cat/virt-ls.pod:248 +msgid "For block and char special files, the device (displayed as major:minor)." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:923 -msgid "QEMU WRAPPERS" +#. type: =item +#: ../cat/virt-ls.pod:251 +msgid "blocks" msgstr "" -# type: textblock -#: ../src/guestfs.pod:925 -msgid "" -"If you want to compile your own qemu, run qemu from a non-standard location, " -"or pass extra arguments to qemu, then you can write a shell-script wrapper " -"around qemu." +#. type: textblock +#: ../cat/virt-ls.pod:253 +msgid "The number of 512 byte blocks allocated to the file." msgstr "" -# type: textblock -#: ../src/guestfs.pod:929 +#. type: textblock +#: ../cat/virt-ls.pod:257 msgid "" -"There is one important rule to remember: you I> as the " -"last command in the shell script (so that qemu replaces the shell and " -"becomes the direct child of the libguestfs-using program). If you don't do " -"this, then the qemu process won't be cleaned up correctly." +"With the I<--checksum> flag, the checksum of the file contents is shown " +"(only for regular files). Computing file checksums can take a considerable " +"amount of time." +msgstr "" + +#. type: =item +#: ../cat/virt-ls.pod:280 +msgid "B<--checksum>" +msgstr "" + +#. type: =item +#: ../cat/virt-ls.pod:282 +msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:934 +#. type: textblock +#: ../cat/virt-ls.pod:284 msgid "" -"Here is an example of a wrapper, where I have built my own copy of qemu from " -"source:" +"Display checksum over file contents for regular files. With no argument, " +"this defaults to using I. Using an argument, you can select the " +"checksum type to use." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:937 -#, no-wrap +#. type: textblock +#: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358 ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408 ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422 msgid "" -" #!/bin/sh -\n" -" qemudir=/home/rjones/d/qemu\n" -" exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios " -"\"$@\"\n" -"\n" +"This option only has effect in I<-lR> output mode. See L above." msgstr "" -# type: textblock -#: ../src/guestfs.pod:941 +#. type: textblock +#: ../cat/virt-ls.pod:316 msgid "" -"Save this script as C (or wherever), C, and " -"then use it by setting the LIBGUESTFS_QEMU environment variable. For " -"example:" +"When prompting for keys and passphrases, virt-ls normally turns echoing off " +"so you cannot see what you are typing. If you are not worried about Tempest " +"attacks and there is no one else in the room you can specify this flag to " +"see what you are typing." +msgstr "" + +#. type: =item +#: ../cat/virt-ls.pod:321 +msgid "B<--extra-stats>" +msgstr "" + +#. type: textblock +#: ../cat/virt-ls.pod:323 +msgid "Display extra stats." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:945 +#. type: verbatim +#: ../cat/virt-ls.pod:339 #, no-wrap msgid "" -" LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n" +" virt-ls --format=raw -a disk.img /dir\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:947 +#. type: verbatim +#: ../cat/virt-ls.pod:343 +#, no-wrap msgid "" -"Note that libguestfs also calls qemu with the -help and -version options in " -"order to determine features." +" virt-ls --format=raw -a disk.img --format -a another.img /dir\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:950 -msgid "ABI GUARANTEE" +#. type: textblock +#: ../cat/virt-ls.pod:356 +msgid "Display file sizes in human-readable format." msgstr "" -# type: textblock -#: ../src/guestfs.pod:952 -msgid "" -"We guarantee the libguestfs ABI (binary interface), for public, high-level " -"actions as outlined in this section. Although we will deprecate some " -"actions, for example if they get replaced by newer calls, we will keep the " -"old actions forever. This allows you the developer to program in confidence " -"against the libguestfs API." +#. type: =item +#: ../cat/virt-ls.pod:370 +msgid "B<-R>" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:958 -msgid "BLOCK DEVICE NAMING" +#. type: =item +#: ../cat/virt-ls.pod:372 +msgid "B<--recursive>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:960 +#. type: textblock +#: ../cat/virt-ls.pod:374 msgid "" -"In the kernel there is now quite a profusion of schemata for naming block " -"devices (in this context, by I I mean a physical or virtual " -"hard drive). The original Linux IDE driver used names starting with " -"C. SCSI devices have historically used a different naming scheme, " -"C. When the Linux kernel I driver became a popular " -"replacement for the old IDE driver (particularly for SATA devices) those " -"devices also used the C scheme. Additionally we now have virtual " -"machines with paravirtualized drivers. This has created several different " -"naming systems, such as C for virtio disks and C for " -"Xen PV disks." +"Select the mode. With neither of these options, C produces a " +"simple, flat list of the files in the named directory. See L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:972 +#. type: textblock +#: ../cat/virt-ls.pod:378 msgid "" -"As discussed above, libguestfs uses a qemu appliance running an embedded " -"Linux kernel to access block devices. We can run a variety of appliances " -"based on a variety of Linux kernels." +"C produces a \"long listing\", which shows more detail. See " +"L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:976 +#. type: textblock +#: ../cat/virt-ls.pod:381 msgid "" -"This causes a problem for libguestfs because many API calls use device or " -"partition names. Working scripts and the recipe (example) scripts that we " -"make available over the internet could fail if the naming scheme changes." +"C produces a recursive list of files starting at the named " +"directory. See L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:981 +#. type: textblock +#: ../cat/virt-ls.pod:384 msgid "" -"Therefore libguestfs defines C as the I. " -"Internally C names are translated, if necessary, to other names as " -"required. For example, under RHEL 5 which uses the C scheme, any " -"device parameter C is translated to C transparently." +"C produces a recursive long listing which can be more easily " +"parsed. See L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:987 -msgid "" -"Note that this I applies to parameters. The L, " -"L and similar calls return the true names of the " -"devices and partitions as known to the appliance." +#. type: =item +#: ../cat/virt-ls.pod:387 +msgid "B<--times>" msgstr "" -# type: =head3 -#: ../src/guestfs.pod:992 -msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION" +#. type: textblock +#: ../cat/virt-ls.pod:389 +msgid "Display time fields." msgstr "" -# type: textblock -#: ../src/guestfs.pod:994 -msgid "" -"Usually this translation is transparent. However in some (very rare) cases " -"you may need to know the exact algorithm. Such cases include where you use " -"L to add a mixture of virtio and IDE devices to the " -"qemu-based appliance, so have a mixture of C and C " -"devices." +#. type: =item +#: ../cat/virt-ls.pod:394 +msgid "B<--time-days>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1000 +#. type: textblock +#: ../cat/virt-ls.pod:396 +msgid "Display time fields as days before now (negative if in the future)." +msgstr "" + +#. type: textblock +#: ../cat/virt-ls.pod:398 msgid "" -"The algorithm is applied only to I which are known to be either " -"device or partition names. Return values from functions such as " -"L are never changed." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:1008 -msgid "Is the string a parameter which is a device or partition name?" +"Note that C<0> in output means \"up to 1 day before now\", or that the age " +"of the file is between 0 and 86399 seconds." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1012 -msgid "Does the string begin with C?" +#. type: =item +#: ../cat/virt-ls.pod:404 +msgid "B<--time-relative>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1016 -msgid "" -"Does the named device exist? If so, we use that device. However if I " -"then we continue with this algorithm." +#. type: textblock +#: ../cat/virt-ls.pod:406 +msgid "Display time fields as seconds before now (negative if in the future)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1021 -msgid "Replace initial C string with C." +#. type: =item +#: ../cat/virt-ls.pod:411 +msgid "B<--time-t>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1023 -msgid "For example, change C to C." +#. type: textblock +#: ../cat/virt-ls.pod:413 +msgid "Display time fields as seconds since the Unix epoch." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1025 -msgid "If that named device exists, use it. If not, continue." +#. type: =item +#: ../cat/virt-ls.pod:418 +msgid "B<--uids>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1029 -msgid "Replace initial C string with C." +#. type: textblock +#: ../cat/virt-ls.pod:420 +msgid "Display UID and GID fields." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1031 -msgid "If that named device exists, use it. If not, return an error." +#. type: textblock +#: ../cat/virt-ls.pod:445 +msgid "Previous versions of virt-ls allowed you to write either:" msgstr "" -# type: =head3 -#: ../src/guestfs.pod:1035 -msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING" +#. type: verbatim +#: ../cat/virt-ls.pod:447 +#, no-wrap +msgid "" +" virt-ls disk.img [disk.img ...] /dir\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1037 +#. type: verbatim +#: ../cat/virt-ls.pod:451 +#, no-wrap msgid "" -"Although the standard naming scheme and automatic translation is useful for " -"simple programs and guestfish scripts, for larger programs it is best not to " -"rely on this mechanism." +" virt-ls guestname /dir\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1041 +#. type: textblock +#: ../cat/virt-ls.pod:497 msgid "" -"Where possible for maximum future portability programs using libguestfs " -"should use these future-proof techniques:" +"L, L, L, L, " +"L, L, L, " +"L, L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1048 -msgid "" -"Use L or L to list actual " -"device names, and then use those names directly." +#. type: textblock +#: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:298 +msgid "Copyright (C) 2009-2011 Red Hat Inc." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1051 -msgid "Since those device names exist by definition, they will never be translated." +#. type: textblock +#: ../df/virt-df.pod:5 +msgid "virt-df - Display free space on virtual filesystems" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1056 +#. type: verbatim +#: ../df/virt-df.pod:9 +#, no-wrap msgid "" -"Use higher level ways to identify filesystems, such as LVM names, UUIDs and " -"filesystem labels." +" virt-df [--options]\n" +"\n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1061 -msgid "SECURITY" +#. type: verbatim +#: ../df/virt-df.pod:11 +#, no-wrap +msgid "" +" virt-df [--options] -d domname\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1063 +#. type: verbatim +#: ../df/virt-df.pod:13 +#, no-wrap msgid "" -"This section discusses security implications of using libguestfs, " -"particularly with untrusted or malicious guests or disk images." +" virt-df [--options] -a disk.img [-a disk.img ...]\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1066 -msgid "GENERAL SECURITY CONSIDERATIONS" +#. type: verbatim +#: ../df/virt-df.pod:17 +#, no-wrap +msgid "" +" virt-df [--options] domname\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1068 +#. type: verbatim +#: ../df/virt-df.pod:19 +#, no-wrap msgid "" -"Be careful with any files or data that you download from a guest (by " -"\"download\" we mean not just the L command but any " -"command that reads files, filenames, directories or anything else from a " -"disk image). An attacker could manipulate the data to fool your program " -"into doing the wrong thing. Consider cases such as:" +" virt-df [--options] disk.img [disk.img ...]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1078 -msgid "the data (file etc) not being present" +#. type: textblock +#: ../df/virt-df.pod:23 +msgid "" +"C is a command line tool to display free space on virtual machine " +"filesystems. Unlike other tools, it doesn't just display the size of disk " +"allocated to a virtual machine, but can look inside disk images to see how " +"much space is really being used." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1082 -msgid "being present but empty" +#. type: textblock +#: ../df/virt-df.pod:28 +msgid "" +"If used without any I<-a> or I<-d> arguments, C checks with libvirt " +"to get a list of all active and inactive guests, and performs a C-type " +"operation on each one in turn, printing out the results." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1086 -msgid "being much larger than normal" +#. type: textblock +#: ../df/virt-df.pod:32 +msgid "" +"If any I<-a> or I<-d> arguments are specified, C performs a " +"C-type operation on either the single named libvirt domain, or on the " +"disk image(s) listed on the command line (which must all belong to a single " +"VM). In this mode (with arguments), C will I. If you want to run on multiple guests, then you have to " +"invoke C multiple times." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1090 -msgid "containing arbitrary 8 bit data" +#. type: textblock +#: ../df/virt-df.pod:39 +msgid "" +"Use the I<--csv> option to get a format which can be easily parsed by other " +"programs. Other options are similar to the standard L command." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1094 -msgid "being in an unexpected character encoding" +#. type: textblock +#: ../df/virt-df.pod:45 +msgid "" +"Show disk usage for a single libvirt guest called C. Make the " +"output human-readable:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1098 -msgid "containing homoglyphs." +#. type: verbatim +#: ../df/virt-df.pod:48 +#, no-wrap +msgid "" +" # virt-df -d F14x64 -h\n" +" Filesystem Size Used Available Use%\n" +" F14x64:/dev/sda1 484M 66M 393M 14%\n" +" F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1102 -msgid "SECURITY OF MOUNTING FILESYSTEMS" +#. type: textblock +#: ../df/virt-df.pod:53 +msgid "Show disk usage for a disk image file called C:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1104 +#. type: verbatim +#: ../df/virt-df.pod:55 +#, no-wrap msgid "" -"When you mount a filesystem under Linux, mistakes in the kernel filesystem " -"(VFS) module can sometimes be escalated into exploits by deliberately " -"creating a malicious, malformed filesystem. These exploits are very severe " -"for two reasons. Firstly there are very many filesystem drivers in the " -"kernel, and many of them are infrequently used and not much developer " -"attention has been paid to the code. Linux userspace helps potential " -"crackers by detecting the filesystem type and automatically choosing the " -"right VFS driver, even if that filesystem type is obscure or unexpected for " -"the administrator. Secondly, a kernel-level exploit is like a local root " -"exploit (worse in some ways), giving immediate and total access to the " -"system right down to the hardware level." +" $ virt-df -a test1.img\n" +" Filesystem 1K-blocks Used Available Use%\n" +" test1.img:/dev/sda1 99099 1551 92432 2%\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1117 +#. type: verbatim +#: ../df/virt-df.pod:112 +#, no-wrap msgid "" -"That explains why you should never mount a filesystem from an untrusted " -"guest on your host kernel. How about libguestfs? We run a Linux kernel " -"inside a qemu virtual machine, usually running as a non-root user. The " -"attacker would need to write a filesystem which first exploited the kernel, " -"and then exploited either qemu virtualization (eg. a faulty qemu driver) or " -"the libguestfs protocol, and finally to be as serious as the host kernel " -"exploit it would need to escalate its privileges to root. This multi-step " -"escalation, performed by a static piece of data, is thought to be extremely " -"hard to do, although we never say 'never' about security issues." +" virt-df --format=raw -a disk.img\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1128 +#. type: verbatim +#: ../df/virt-df.pod:116 +#, no-wrap msgid "" -"In any case callers can reduce the attack surface by forcing the filesystem " -"type when mounting (use L)." +" virt-df --format=raw -a disk.img --format -a another.img\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1131 -msgid "PROTOCOL SECURITY" +#. type: textblock +#: ../df/virt-df.pod:129 +msgid "Print sizes in human-readable format." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1133 -msgid "" -"The protocol is designed to be secure, being based on RFC 4506 (XDR) with a " -"defined upper message size. However a program that uses libguestfs must " -"also take care - for example you can write a program that downloads a binary " -"from a disk image and executes it locally, and no amount of protocol " -"security will save you from the consequences." +#. type: textblock +#: ../df/virt-df.pod:131 +msgid "You are not allowed to use I<-h> and I<--csv> at the same time." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1139 -msgid "INSPECTION SECURITY" +#. type: =item +#: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:155 +msgid "B<-i>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1141 -msgid "" -"Parts of the inspection API (see L) return untrusted strings " -"directly from the guest, and these could contain any 8 bit data. Callers " -"should be careful to escape these before printing them to a structured file " -"(for example, use HTML escaping if creating a web page)." +#. type: =item +#: ../df/virt-df.pod:135 +msgid "B<--inodes>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1147 -msgid "" -"Guest configuration may be altered in unusual ways by the administrator of " -"the virtual machine, and may not reflect reality (particularly for untrusted " -"or actively malicious guests). For example we parse the hostname from " -"configuration files like C that we find in the " -"guest, but the guest administrator can easily manipulate these files to " -"provide the wrong hostname." +#. type: textblock +#: ../df/virt-df.pod:137 +msgid "Print inodes instead of blocks." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1155 -msgid "" -"The inspection API parses guest configuration using two external libraries: " -"Augeas (Linux configuration) and hivex (Windows Registry). Both are " -"designed to be robust in the face of malicious data, although denial of " -"service attacks are still possible, for example with oversized configuration " -"files." +#. type: =item +#: ../df/virt-df.pod:139 +msgid "B<--one-per-guest>" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1161 -msgid "RUNNING UNTRUSTED GUEST COMMANDS" +#. type: textblock +#: ../df/virt-df.pod:141 +msgid "" +"Run one libguestfs appliance per guest. Normally C will add the " +"disks from several guests to a single libguestfs appliance." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1163 -msgid "" -"Be very cautious about running commands from the guest. By running a " -"command in the guest, you are giving CPU time to a binary that you do not " -"control, under the same user account as the library, albeit wrapped in qemu " -"virtualization. More information and alternatives can be found in the " -"section L." +#. type: textblock +#: ../df/virt-df.pod:144 +msgid "You might use this option in the following circumstances:" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1169 -msgid "CVE-2010-3851" +#. type: =item +#: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:405 ../fish/guestfish-actions.pod:412 ../fish/guestfish-actions.pod:1104 ../fish/guestfish-actions.pod:1108 ../fish/guestfish-actions.pod:1112 ../fish/guestfish-actions.pod:1116 ../fish/guestfish-actions.pod:1124 ../fish/guestfish-actions.pod:1128 ../fish/guestfish-actions.pod:1132 ../fish/guestfish-actions.pod:1142 ../fish/guestfish-actions.pod:1146 ../fish/guestfish-actions.pod:1150 ../fish/guestfish-actions.pod:1240 ../fish/guestfish-actions.pod:1244 ../fish/guestfish-actions.pod:1249 ../fish/guestfish-actions.pod:1254 ../fish/guestfish-actions.pod:1296 ../fish/guestfish-actions.pod:1300 ../fish/guestfish-actions.pod:1305 ../fish/guestfish-actions.pod:1938 ../fish/guestfish-actions.pod:1944 ../fish/guestfish-actions.pod:1952 ../fish/guestfish-actions.pod:1959 ../fish/guestfish-actions.pod:1966 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393 ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:282 ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295 ../resize/virt-resize.pod:301 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:588 ../src/guestfs-actions.pod:596 ../src/guestfs-actions.pod:603 ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:1667 ../src/guestfs-actions.pod:1671 ../src/guestfs-actions.pod:1675 ../src/guestfs-actions.pod:1679 ../src/guestfs-actions.pod:1687 ../src/guestfs-actions.pod:1691 ../src/guestfs-actions.pod:1695 ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1709 ../src/guestfs-actions.pod:1713 ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1855 ../src/guestfs-actions.pod:1860 ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:1926 ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:1935 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:2870 ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:2885 ../src/guestfs-actions.pod:2892 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1064 ../src/guestfs.pod:1068 ../src/guestfs.pod:1072 ../src/guestfs.pod:1077 ../src/guestfs.pod:1085 ../src/guestfs.pod:1104 ../src/guestfs.pod:1112 ../src/guestfs.pod:1134 ../src/guestfs.pod:1138 ../src/guestfs.pod:1142 ../src/guestfs.pod:1146 ../src/guestfs.pod:1150 ../src/guestfs.pod:1154 ../src/guestfs.pod:1644 ../src/guestfs.pod:1649 ../src/guestfs.pod:1653 ../src/guestfs.pod:1755 ../src/guestfs.pod:1760 ../src/guestfs.pod:1764 ../src/guestfs.pod:1774 ../src/guestfs.pod:2063 ../src/guestfs.pod:2068 ../src/guestfs.pod:2074 ../src/guestfs.pod:2082 ../src/guestfs.pod:2436 ../src/guestfs.pod:2442 ../src/guestfs.pod:2447 ../src/guestfs.pod:2453 ../src/guestfs.pod:2834 ../src/guestfs.pod:2839 ../src/guestfs.pod:2843 ../src/guestfs.pod:2847 ../src/guestfs.pod:2851 ../src/guestfs.pod:2865 ../src/guestfs.pod:2870 ../src/guestfs.pod:3095 ../src/guestfs.pod:3099 ../src/guestfs.pod:3103 ../src/guestfs.pod:3107 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:710 ../tools/virt-win-reg.pl:716 ../tools/virt-win-reg.pl:722 +msgid "*" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1171 -msgid "https://bugzilla.redhat.com/642934" +#. type: textblock +#: ../df/virt-df.pod:150 +msgid "" +"If you think an untrusted guest might actively try to exploit the libguestfs " +"appliance kernel, then this prevents one guest from interfering with the " +"stats printed for another guest." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1173 +#. type: textblock +#: ../df/virt-df.pod:156 msgid "" -"This security bug concerns the automatic disk format detection that qemu " -"does on disk images." +"If the kernel has a bug which stops it from accessing a filesystem in one " +"guest (see for example RHBZ#635373) then this allows libguestfs to continue " +"and report stats for further guests." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1176 +#. type: textblock +#: ../df/virt-df.pod:165 msgid "" -"A raw disk image is just the raw bytes, there is no header. Other disk " -"images like qcow2 contain a special header. Qemu deals with this by looking " -"for one of the known headers, and if none is found then assuming the disk " -"image must be raw." +"Print UUIDs instead of names. This is useful for following a guest even " +"when the guest is migrated or renamed, or when two guests happen to have the " +"same name." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1181 +#. type: textblock +#: ../df/virt-df.pod:169 msgid "" -"This allows a guest which has been given a raw disk image to write some " -"other header. At next boot (or when the disk image is accessed by " -"libguestfs) qemu would do autodetection and think the disk image format was, " -"say, qcow2 based on the header written by the guest." +"Note that only domains that we fetch from libvirt come with UUIDs. For disk " +"images, we still print the disk image name even when this option is " +"specified." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1186 +#. type: textblock +#: ../df/virt-df.pod:229 msgid "" -"This in itself would not be a problem, but qcow2 offers many features, one " -"of which is to allow a disk image to refer to another image (called the " -"\"backing disk\"). It does this by placing the path to the backing disk " -"into the qcow2 header. This path is not validated and could point to any " -"host file (eg. \"/etc/passwd\"). The backing disk is then exposed through " -"\"holes\" in the qcow2 disk image, which of course is completely under the " -"control of the attacker." +"L, L, L, L, " +"L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1194 -msgid "In libguestfs this is rather hard to exploit except under two circumstances:" +#. type: textblock +#: ../edit/virt-edit.pod:5 +msgid "virt-edit - Edit a file in a virtual machine" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1201 -msgid "You have enabled the network or have opened the disk in write mode." +#. type: verbatim +#: ../edit/virt-edit.pod:9 +#, no-wrap +msgid "" +" virt-edit [--options] -d domname file [file ...]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1205 +#. type: verbatim +#: ../edit/virt-edit.pod:11 +#, no-wrap msgid "" -"You are also running untrusted code from the guest (see L)." +" virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1210 +#. type: verbatim +#: ../edit/virt-edit.pod:13 +#, no-wrap msgid "" -"The way to avoid this is to specify the expected disk format when adding " -"disks (the optional C option to L). You " -"should always do this if the disk is raw format, and it's a good idea for " -"other cases too." +" virt-edit [-d domname|-a disk.img] file -e 'expr'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1215 +#. type: verbatim +#: ../edit/virt-edit.pod:17 +#, no-wrap msgid "" -"For disks added from libvirt using calls like L, the " -"format is fetched from libvirt and passed through." +" virt-edit domname file\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1218 +#. type: verbatim +#: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183 +#, no-wrap msgid "" -"For libguestfs tools, use the I<--format> command line parameter as " -"appropriate." +" virt-edit disk.img [disk.img ...] file\n" +"\n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1221 -msgid "CONNECTION MANAGEMENT" +#. type: =head1 +#: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51 +msgid "WARNING" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1223 -msgid "guestfs_h *" +#. type: textblock +#: ../edit/virt-edit.pod:23 +msgid "" +"You must I use C on live virtual machines. If you do this, " +"you risk disk corruption in the VM. C tries to stop you from " +"doing this, but doesn't catch all cases." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1225 +#. type: textblock +#: ../edit/virt-edit.pod:29 msgid "" -"C is the opaque type representing a connection handle. Create a " -"handle by calling L. Call L to free the " -"handle and release all resources used." +"C is a command line tool to edit C where each C " +"exists in the named virtual machine (or disk image)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1229 +#. type: textblock +#: ../edit/virt-edit.pod:32 msgid "" -"For information on using multiple handles and threads, see the section " -"L below." +"Multiple filenames can be given, in which case they are each edited in " +"turn. Each filename must be a full path, starting at the root directory " +"(starting with '/')." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1232 -msgid "guestfs_create" +#. type: textblock +#: ../edit/virt-edit.pod:36 +msgid "If you want to just view a file, use L." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1234 -#, no-wrap +#. type: textblock +#: ../edit/virt-edit.pod:38 msgid "" -" guestfs_h *guestfs_create (void);\n" -"\n" +"For more complex cases you should look at the L tool (see " +"L below)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1236 -msgid "Create a connection handle." +#. type: textblock +#: ../edit/virt-edit.pod:41 +msgid "" +"C cannot be used to create a new file. L can do " +"that and much more." +msgstr "" + +#. type: textblock +#: ../edit/virt-edit.pod:46 +msgid "Edit the named files interactively:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1238 +#. type: verbatim +#: ../edit/virt-edit.pod:48 +#, no-wrap msgid "" -"You have to call L (or one of the equivalent calls) " -"on the handle at least once." +" virt-edit -d mydomain /boot/grub/grub.conf\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1241 +#. type: verbatim +#: ../edit/virt-edit.pod:50 +#, no-wrap msgid "" -"This function returns a non-NULL pointer to a handle on success or NULL on " -"error." +" virt-edit -d mydomain /etc/passwd\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1244 -msgid "After configuring the handle, you have to call L." +#. type: textblock +#: ../edit/virt-edit.pod:52 +msgid "For Windows guests, some Windows paths are understood:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1246 +#. type: verbatim +#: ../edit/virt-edit.pod:54 +#, no-wrap msgid "" -"You may also want to configure error handling for the handle. See L section below." +" virt-edit -d mywindomain 'c:\\autoexec.bat'\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1249 -msgid "guestfs_close" +#. type: textblock +#: ../edit/virt-edit.pod:56 +msgid "" +"If Perl is installed, you can also edit files non-interactively (see " +"L below). To change the init default level to 5:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1251 +#. type: verbatim +#: ../edit/virt-edit.pod:60 #, no-wrap msgid "" -" void guestfs_close (guestfs_h *g);\n" +" virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1253 -msgid "This closes the connection handle and frees up all resources used." +#. type: =item +#: ../edit/virt-edit.pod:81 +msgid "B<-b> extension" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1255 -msgid "ERROR HANDLING" +#. type: =item +#: ../edit/virt-edit.pod:83 +msgid "B<--backup> extension" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1257 +#. type: textblock +#: ../edit/virt-edit.pod:85 msgid "" -"API functions can return errors. For example, almost all functions that " -"return C will return C<-1> to indicate an error." +"Create a backup of the original file I. The backup " +"has the original filename with C added." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1260 +#. type: textblock +#: ../edit/virt-edit.pod:88 msgid "" -"Additional information is available for errors: an error message string and " -"optionally an error number (errno) if the thing that failed was a system " -"call." +"Usually the first character of C would be a dot C<.> so you would " +"write:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1264 +#. type: verbatim +#: ../edit/virt-edit.pod:91 +#, no-wrap msgid "" -"You can get at the additional information about the last error on the handle " -"by calling L, L, and/or by setting " -"up an error handler with L." +" virt-edit -b .orig [etc]\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1269 -msgid "" -"When the handle is created, a default error handler is installed which " -"prints the error message string to C. For small short-running " -"command line programs it is sufficient to do:" +#. type: textblock +#: ../edit/virt-edit.pod:93 +msgid "By default, no backup file is made." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1273 -#, no-wrap -msgid "" -" if (guestfs_launch (g) == -1)\n" -" exit (EXIT_FAILURE);\n" -"\n" +#. type: =item +#: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:96 ../inspector/virt-inspector.pod:74 ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78 ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128 +msgid "B<-c URI>" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1276 +#. type: =item +#: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:98 ../inspector/virt-inspector.pod:76 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130 +msgid "B<--connect URI>" +msgstr "" + +#. type: textblock +#: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84 ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134 ../tools/virt-win-reg.pl:135 msgid "" -"since the default error handler will ensure that an error message has been " -"printed to C before the program exits." +"If you specify guest block devices directly, then libvirt is not used at " +"all." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1279 +#. type: textblock +#: ../edit/virt-edit.pod:114 msgid "" -"For other programs the caller will almost certainly want to install an " -"alternate error handler or do error handling in-line like this:" +"When prompting for keys and passphrases, virt-edit normally turns echoing " +"off so you cannot see what you are typing. If you are not worried about " +"Tempest attacks and there is no one else in the room you can specify this " +"flag to see what you are typing." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1282 -#, no-wrap -msgid "" -" g = guestfs_create ();\n" -" \n" +#. type: =item +#: ../edit/virt-edit.pod:119 +msgid "B<-e> EXPR" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1284 -#, no-wrap -msgid "" -" /* This disables the default behaviour of printing errors\n" -" on stderr. */\n" -" guestfs_set_error_handler (g, NULL, NULL);\n" -" \n" +#. type: =item +#: ../edit/virt-edit.pod:121 +msgid "B<--expr> EXPR" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1288 -#, no-wrap +#. type: textblock +#: ../edit/virt-edit.pod:123 msgid "" -" if (guestfs_launch (g) == -1) {\n" -" /* Examine the error message and print it etc. */\n" -" char *msg = guestfs_last_error (g);\n" -" int errnum = guestfs_last_errno (g);\n" -" fprintf (stderr, \"%s\\n\", msg);\n" -" /* ... */\n" -" }\n" -"\n" +"Instead of launching the external editor, non-interactively apply the Perl " +"expression C to each line in the file. See L below." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1296 +#. type: textblock +#: ../edit/virt-edit.pod:127 msgid "" -"Out of memory errors are handled differently. The default action is to call " -"L. If this is undesirable, then you can set a handler using " -"L." +"Be careful to properly quote the expression to prevent it from being altered " +"by the shell." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1300 -msgid "" -"L returns C if the handle cannot be created, and " -"because there is no handle if this happens there is no way to get additional " -"error information. However L is supposed to be a " -"lightweight operation which can only fail because of insufficient memory (it " -"returns NULL in this case)." +#. type: textblock +#: ../edit/virt-edit.pod:130 +msgid "Note that this option is only available when Perl 5 is installed." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1306 -msgid "guestfs_last_error" +#. type: =item +#: ../edit/virt-edit.pod:132 +msgid "B<--format> raw|qcow2|..." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1308 +#. type: verbatim +#: ../edit/virt-edit.pod:143 #, no-wrap msgid "" -" const char *guestfs_last_error (guestfs_h *g);\n" +" virt-edit --format=raw -a disk.img file\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1310 -msgid "" -"This returns the last error message that happened on C. If there has not " -"been an error since the handle was created, then this returns C." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:1314 +#. type: verbatim +#: ../edit/virt-edit.pod:147 +#, no-wrap msgid "" -"The lifetime of the returned string is until the next error occurs, or " -"L is called." +" virt-edit --format=raw -a disk.img --format -a another.img file\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1317 -msgid "guestfs_last_errno" +#. type: textblock +#: ../edit/virt-edit.pod:181 +msgid "Previous versions of virt-edit allowed you to write either:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1319 +#. type: verbatim +#: ../edit/virt-edit.pod:187 #, no-wrap msgid "" -" int guestfs_last_errno (guestfs_h *g);\n" +" virt-edit guestname file\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1321 -msgid "This returns the last error number (errno) that happened on C." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:1323 -msgid "If successful, an errno integer not equal to zero is returned." +#. type: =head1 +#: ../edit/virt-edit.pod:195 +msgid "NON-INTERACTIVE EDITING" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1325 -msgid "If no error, this returns 0. This call can return 0 in three situations:" +#. type: textblock +#: ../edit/virt-edit.pod:197 +msgid "" +"C normally calls out to C<$EDITOR> (or vi) so the system " +"administrator can interactively edit the file." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1332 -msgid "There has not been any error on the handle." +#. type: textblock +#: ../edit/virt-edit.pod:200 +msgid "" +"There are two ways also to use C from scripts in order to make " +"automated edits to files. (Note that although you I use C " +"like this, it's less error-prone to write scripts directly using the " +"libguestfs API and Augeas for configuration file editing.)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1336 +#. type: textblock +#: ../edit/virt-edit.pod:206 msgid "" -"There has been an error but the errno was meaningless. This corresponds to " -"the case where the error did not come from a failed system call, but for " -"some other reason." +"The first method is to temporarily set C<$EDITOR> to any script or program " +"you want to run. The script is invoked as C<$EDITOR tmpfile> and it should " +"update C in place however it likes." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1342 +#. type: textblock +#: ../edit/virt-edit.pod:210 msgid "" -"There was an error from a failed system call, but for some reason the errno " -"was not captured and returned. This usually indicates a bug in libguestfs." +"The second method is to use the I<-e> parameter of C to run a " +"short Perl snippet in the style of L. For example to replace all " +"instances of C with C in a file:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1348 +#. type: verbatim +#: ../edit/virt-edit.pod:214 +#, no-wrap msgid "" -"Libguestfs tries to convert the errno from inside the applicance into a " -"corresponding errno for the caller (not entirely trivial: the appliance " -"might be running a completely different operating system from the library " -"and error numbers are not standardized across Un*xen). If this could not be " -"done, then the error is translated to C. In practice this should " -"only happen in very rare circumstances." +" virt-edit -d domname filename -e 's/foo/bar/'\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1356 -msgid "guestfs_set_error_handler" +#. type: textblock +#: ../edit/virt-edit.pod:216 +msgid "" +"The full power of Perl regular expressions can be used (see L). " +"For example to delete root's password you could do:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1358 +#. type: verbatim +#: ../edit/virt-edit.pod:219 #, no-wrap msgid "" -" typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n" -" void *opaque,\n" -" const char *msg);\n" -" void guestfs_set_error_handler (guestfs_h *g,\n" -" guestfs_error_handler_cb cb,\n" -" void *opaque);\n" +" virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1365 +#. type: textblock +#: ../edit/virt-edit.pod:221 msgid "" -"The callback C will be called if there is an error. The parameters " -"passed to the callback are an opaque data pointer and the error message " -"string." +"What really happens is that the snippet is evaluated as a Perl expression " +"for each line of the file. The line, including the final C<\\n>, is passed " +"in C<$_> and the expression should update C<$_> or leave it unchanged." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1369 +#. type: textblock +#: ../edit/virt-edit.pod:226 msgid "" -"C is not passed to the callback. To get that the callback must call " -"L." +"To delete a line, set C<$_> to the empty string. For example, to delete the " +"C user account from the password file you can do:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1372 +#. type: verbatim +#: ../edit/virt-edit.pod:229 +#, no-wrap msgid "" -"Note that the message string C is freed as soon as the callback " -"function returns, so if you want to stash it somewhere you must make your " -"own copy." +" virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1376 -msgid "The default handler prints messages on C." +#. type: textblock +#: ../edit/virt-edit.pod:231 +msgid "" +"To insert a line, prepend or append it to C<$_>. However appending lines to " +"the end of the file is rather difficult this way since there is no concept " +"of \"last line of the file\" - your expression just doesn't get called " +"again. You might want to use the first method (setting C<$EDITOR>) if you " +"want to do this." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1378 -msgid "If you set C to C then I handler is called." +#. type: textblock +#: ../edit/virt-edit.pod:237 +msgid "" +"The variable C<$lineno> contains the current line number. As is " +"traditional, the first line in the file is number C<1>." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1380 -msgid "guestfs_get_error_handler" +#. type: textblock +#: ../edit/virt-edit.pod:240 +msgid "" +"The return value from the expression is ignored, but the expression may call " +"C in order to abort the whole program, leaving the original file " +"untouched." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1382 -#, no-wrap +#. type: textblock +#: ../edit/virt-edit.pod:244 msgid "" -" guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n" -" void **opaque_rtn);\n" -"\n" +"Remember when matching the end of a line that C<$_> may contain the final " +"C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a " +"newline then neither of these. Thus to match or substitute some text at the " +"end of a line, use this regular expression:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1385 -msgid "Returns the current error handler callback." +#. type: verbatim +#: ../edit/virt-edit.pod:249 +#, no-wrap +msgid "" +" /some text(\\r?\\n)?$/\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1387 -msgid "guestfs_set_out_of_memory_handler" +#. type: textblock +#: ../edit/virt-edit.pod:251 +msgid "" +"Alternately, use the perl C function, being careful not to chomp " +"C<$_> itself (since that would remove all newlines from the file):" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1389 +#. type: verbatim +#: ../edit/virt-edit.pod:255 #, no-wrap msgid "" -" typedef void (*guestfs_abort_cb) (void);\n" -" int guestfs_set_out_of_memory_handler (guestfs_h *g,\n" -" guestfs_abort_cb);\n" +" my $m = $_; chomp $m; $m =~ /some text$/\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1393 -msgid "" -"The callback C will be called if there is an out of memory situation. " -"I." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:1396 -msgid "The default is to call L." +#. type: =head1 +#: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858 +msgid "WINDOWS PATHS" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1398 -msgid "You cannot set C to C. You can't ignore out of memory situations." +#. type: textblock +#: ../edit/virt-edit.pod:259 +msgid "" +"C has a limited ability to understand Windows drive letters and " +"paths (eg. C)." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1401 -msgid "guestfs_get_out_of_memory_handler" +#. type: textblock +#: ../edit/virt-edit.pod:262 +msgid "If and only if the guest is running Windows then:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1403 -#, no-wrap +#. type: textblock +#: ../edit/virt-edit.pod:268 msgid "" -" guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n" -"\n" +"Drive letter prefixes like C are resolved against the Windows Registry " +"to the correct filesystem." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1405 -msgid "This returns the current out of memory handler." +#. type: textblock +#: ../edit/virt-edit.pod:273 +msgid "" +"Any backslash (C<\\>) characters in the path are replaced with forward " +"slashes so that libguestfs can process it." msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1407 -msgid "API CALLS" +#. type: textblock +#: ../edit/virt-edit.pod:278 +msgid "" +"The path is resolved case insensitively to locate the file that should be " +"edited." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1409 ../fish/guestfish.pod:958 -msgid "@ACTIONS@" +#. type: textblock +#: ../edit/virt-edit.pod:283 +msgid "There are some known shortcomings:" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1411 -msgid "STRUCTURES" +#. type: textblock +#: ../edit/virt-edit.pod:289 +msgid "Some NTFS symbolic links may not be followed correctly." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1413 -msgid "@STRUCTS@" +#. type: textblock +#: ../edit/virt-edit.pod:293 +msgid "NTFS junction points that cross filesystems are not followed." msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1415 -msgid "AVAILABILITY" +#. type: textblock +#: ../edit/virt-edit.pod:299 +msgid "" +"L is a more powerful, lower level tool which you can use when " +"C doesn't work." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1417 -msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE" +#. type: textblock +#: ../edit/virt-edit.pod:302 +msgid "Using C is approximately equivalent to doing:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1419 +#. type: verbatim +#: ../edit/virt-edit.pod:304 +#, no-wrap msgid "" -"Using L you can test availability of the following " -"groups of functions. This test queries the appliance to see if the " -"appliance you are currently using supports the functionality." +" guestfish --rw -i -d domname edit /file\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1424 -msgid "@AVAILABILITY@" +#. type: textblock +#: ../edit/virt-edit.pod:306 +msgid "" +"where C is the name of the libvirt guest, and C is the full " +"path to the file." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1426 -msgid "GUESTFISH supported COMMAND" +#. type: textblock +#: ../edit/virt-edit.pod:309 +msgid "" +"The command above uses libguestfs's guest inspection feature and so does not " +"work on guests that libguestfs cannot inspect, or on things like arbitrary " +"disk images that don't contain guests. To edit a file on a disk image " +"directly, use:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1428 +#. type: verbatim +#: ../edit/virt-edit.pod:314 +#, no-wrap msgid "" -"In L there is a handy interactive command C which " -"prints out the available groups and whether they are supported by this build " -"of libguestfs. Note however that you have to do C first." +" guestfish --rw -a disk.img -m /dev/sda1 edit /file\n" +"\n" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1433 -msgid "SINGLE CALLS AT COMPILE TIME" +#. type: textblock +#: ../edit/virt-edit.pod:316 +msgid "" +"where C is the disk image, C is the filesystem within " +"the disk image to edit, and C is the full path to the file." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1435 +#. type: textblock +#: ../edit/virt-edit.pod:320 msgid "" -"Since version 1.5.8, Cguestfs.hE> defines symbols for each C API " -"function, such as:" +"C cannot create new files. Use the guestfish commands C, " +"C or C instead:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1438 +#. type: verbatim +#: ../edit/virt-edit.pod:323 #, no-wrap msgid "" -" #define LIBGUESTFS_HAVE_DD 1\n" +" guestfish --rw -i -d domname touch /newfile\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1440 -msgid "if L is available." -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:1442 +#. type: verbatim +#: ../edit/virt-edit.pod:325 +#, no-wrap msgid "" -"Before version 1.5.8, if you needed to test whether a single libguestfs " -"function is available at compile time, we recommended using build tools such " -"as autoconf or cmake. For example in autotools you could use:" +" guestfish --rw -i -d domname write /newfile \"new content\"\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1447 +#. type: verbatim +#: ../edit/virt-edit.pod:327 #, no-wrap msgid "" -" AC_CHECK_LIB([guestfs],[guestfs_create])\n" -" AC_CHECK_FUNCS([guestfs_dd])\n" +" guestfish --rw -i -d domname upload localfile /newfile\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1450 -msgid "" -"which would result in C being either defined or not defined " -"in your program." +#. type: =head1 +#: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1086 ../rescue/virt-rescue.pod:257 ../src/guestfs.pod:2981 ../test-tool/libguestfs-test-tool.pod:82 +msgid "ENVIRONMENT VARIABLES" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1453 -msgid "SINGLE CALLS AT RUN TIME" +#. type: =item +#: ../edit/virt-edit.pod:333 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1455 +#. type: textblock +#: ../edit/virt-edit.pod:335 msgid "" -"Testing at compile time doesn't guarantee that a function really exists in " -"the library. The reason is that you might be dynamically linked against a " -"previous I (dynamic library) which doesn't have the call. " -"This situation unfortunately results in a segmentation fault, which is a " -"shortcoming of the C dynamic linking system itself." +"If set, this string is used as the editor. It may contain arguments, " +"eg. C<\"emacs -nw\">" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1462 +#. type: textblock +#: ../edit/virt-edit.pod:338 +msgid "If not set, C is used." +msgstr "" + +#. type: textblock +#: ../edit/virt-edit.pod:356 msgid "" -"You can use L to test if a function is available at run time, as " -"in this example program (note that you still need the compile time check as " -"well):" +"L, L, L, L, " +"L, L, L, " +"L, L, L, L." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1466 +#. type: textblock +#: ../examples/guestfs-examples.pod:5 +msgid "guestfs-examples - Examples of using libguestfs from C" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9 #, no-wrap msgid "" -" #include \n" -" #include \n" -" #include \n" -" #include \n" " #include \n" " \n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1472 +#. type: verbatim +#: ../examples/guestfs-examples.pod:11 #, no-wrap msgid "" -" main ()\n" -" {\n" -" #ifdef LIBGUESTFS_HAVE_DD\n" -" void *dl;\n" -" int has_function;\n" -" \n" +" guestfs_h *g = guestfs_create ();\n" +" guestfs_add_drive_ro (g, \"disk.img\");\n" +" guestfs_launch (g);\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1478 +#. type: verbatim +#: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19 #, no-wrap msgid "" -" /* Test if the function guestfs_dd is really available. */\n" -" dl = dlopen (NULL, RTLD_LAZY);\n" -" if (!dl) {\n" -" fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n" -" exit (EXIT_FAILURE);\n" -" }\n" -" has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n" -" dlclose (dl);\n" -" \n" +" cc prog.c -o prog -lguestfs\n" +"or:\n" +" cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1487 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-examples.pod:21 msgid "" -" if (!has_function)\n" -" printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n" -" else {\n" -" printf (\"this libguestfs.so has guestfs_dd function\\n\");\n" -" /* Now it's safe to call\n" -" guestfs_dd (g, \"foo\", \"bar\");\n" -" */\n" -" }\n" -" #else\n" -" printf (\"guestfs_dd function was not found at compile time\\n\");\n" -" #endif\n" -" }\n" -"\n" +"This manual page contains examples of calling libguestfs from the C " +"programming language. If you are not familiar with using libguestfs, you " +"also need to read L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1500 -msgid "" -"You may think the above is an awful lot of hassle, and it is. There are " -"other ways outside of the C linking system to ensure that this kind of " -"incompatibility never arises, such as using package versioning:" +#. type: =head1 +#: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37 ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31 ../python/examples/guestfs-python.pod:34 ../ruby/examples/guestfs-ruby.pod:28 +msgid "EXAMPLE 1: CREATE A DISK IMAGE" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1505 -#, no-wrap -msgid "" -" Requires: libguestfs >= 1.0.80\n" -"\n" +#. type: textblock +#: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39 ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33 ../python/examples/guestfs-python.pod:36 ../ruby/examples/guestfs-ruby.pod:30 +msgid "@EXAMPLE1@" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1507 -msgid "CALLS WITH OPTIONAL ARGUMENTS" +#. type: =head1 +#: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41 ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35 ../python/examples/guestfs-python.pod:38 ../ruby/examples/guestfs-ruby.pod:32 +msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1509 -msgid "" -"A recent feature of the API is the introduction of calls which take optional " -"arguments. In C these are declared 3 ways. The main way is as a call which " -"takes variable arguments (ie. C<...>), as in this example:" +#. type: textblock +#: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43 ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37 ../python/examples/guestfs-python.pod:40 ../ruby/examples/guestfs-ruby.pod:34 +msgid "@EXAMPLE2@" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1514 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-examples.pod:35 msgid "" -" int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n" -"\n" +"L, L, L, L, " +"L, L, L, " +"L." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1516 -msgid "" -"Call this with a list of optional arguments, terminated by C<-1>. So to " -"call with no optional arguments specified:" +#. type: =head1 +#: ../examples/guestfs-examples.pod:44 ../examples/guestfs-recipes.pod:396 ../fish/guestfish.pod:1260 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:319 ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:57 ../ocaml/examples/guestfs-ocaml.pod:90 ../perl/examples/guestfs-perl.pod:51 ../python/examples/guestfs-python.pod:53 ../ruby/examples/guestfs-ruby.pod:47 ../src/guestfs.pod:3114 ../test-tool/libguestfs-test-tool.pod:93 +msgid "AUTHORS" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1519 -#, no-wrap -msgid "" -" guestfs_add_drive_opts (g, filename, -1);\n" -"\n" +#. type: textblock +#: ../examples/guestfs-examples.pod:46 ../examples/guestfs-recipes.pod:398 ../fish/guestfish.pod:1262 ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:321 ../java/examples/guestfs-java.pod:59 ../ocaml/examples/guestfs-ocaml.pod:92 ../perl/examples/guestfs-perl.pod:53 ../python/examples/guestfs-python.pod:55 ../ruby/examples/guestfs-ruby.pod:49 ../src/guestfs.pod:3116 ../test-tool/libguestfs-test-tool.pod:95 +msgid "Richard W.M. Jones (C)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1521 -msgid "With a single optional argument:" +#. type: textblock +#: ../examples/guestfs-examples.pod:50 ../ocaml/examples/guestfs-ocaml.pod:96 ../python/examples/guestfs-python.pod:59 ../ruby/examples/guestfs-ruby.pod:53 +msgid "Copyright (C) 2010 Red Hat Inc. L" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1523 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-examples.pod:52 ../examples/guestfs-recipes.pod:404 ../java/examples/guestfs-java.pod:65 ../ocaml/examples/guestfs-ocaml.pod:98 ../perl/examples/guestfs-perl.pod:59 ../python/examples/guestfs-python.pod:61 ../ruby/examples/guestfs-ruby.pod:55 msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n" -" -1);\n" -"\n" +"The examples in this manual page may be freely copied, modified and " +"distributed without any restrictions." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1527 -msgid "With two:" +#. type: textblock +#: ../examples/guestfs-examples.pod:55 ../examples/guestfs-recipes.pod:407 ../java/examples/guestfs-java.pod:68 ../ocaml/examples/guestfs-ocaml.pod:101 ../perl/examples/guestfs-perl.pod:62 ../python/examples/guestfs-python.pod:64 ../ruby/examples/guestfs-ruby.pod:58 ../src/guestfs.pod:3123 +msgid "" +"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." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1529 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-examples.pod:60 ../examples/guestfs-recipes.pod:412 ../java/examples/guestfs-java.pod:73 ../ocaml/examples/guestfs-ocaml.pod:106 ../perl/examples/guestfs-perl.pod:67 ../python/examples/guestfs-python.pod:69 ../ruby/examples/guestfs-ruby.pod:63 ../src/guestfs.pod:3128 msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n" -" GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n" -" -1);\n" -"\n" +"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." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1534 +#. type: textblock +#: ../examples/guestfs-examples.pod:65 ../examples/guestfs-recipes.pod:417 ../java/examples/guestfs-java.pod:78 ../ocaml/examples/guestfs-ocaml.pod:111 ../perl/examples/guestfs-perl.pod:72 ../python/examples/guestfs-python.pod:74 ../ruby/examples/guestfs-ruby.pod:68 ../src/guestfs.pod:3133 msgid "" -"and so forth. Don't forget the terminating C<-1> otherwise Bad Things will " -"happen!" +"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" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1537 -msgid "USING va_list FOR OPTIONAL ARGUMENTS" +#. type: =end +#: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12 +msgid "comment" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1539 +#. type: textblock +#: ../examples/guestfs-recipes.pod:5 msgid "" -"The second variant has the same name with the suffix C<_va>, which works the " -"same way but takes a C. See the C manual for details. For the " -"example function, this is declared:" +"pod2man and pod2html have differing bugs which makes it hard to write URLs " +"here. The only way which works for both sorts of output is to just write " +"the URL directly. Do NOT use L<...> for URLs." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1543 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-recipes.pod:9 msgid "" -" int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n" -" va_list args);\n" -"\n" +"We break with tradition here and don't use ALL CAPS for the section " +"headings, as this makes them much easier to read." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1546 -msgid "CONSTRUCTING OPTIONAL ARGUMENTS" +#. type: textblock +#: ../examples/guestfs-recipes.pod:16 +msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1548 +#. type: textblock +#: ../examples/guestfs-recipes.pod:20 msgid "" -"The third variant is useful where you need to construct these calls. You " -"pass in a structure where you fill in the optional fields. The structure " -"has a bitmask as the first element which you must set to indicate which " -"fields you have filled in. For our example function the structure and call " -"are declared:" +"This page contains recipes for and links to things you can do using " +"libguestfs, L and the virt tools." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1554 -#, no-wrap -msgid "" -" struct guestfs_add_drive_opts_argv {\n" -" uint64_t bitmask;\n" -" int readonly;\n" -" const char *format;\n" -" /* ... */\n" -" };\n" -" int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n" -" const struct guestfs_add_drive_opts_argv *optargs);\n" -"\n" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:23 +msgid "Audit a virtual machine for setuid files" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1563 -msgid "You could call it like this:" +#. type: textblock +#: ../examples/guestfs-recipes.pod:25 +msgid "" +"The link below contains a small program which can be used to audit a Linux " +"virtual machine to see what setuid and setgid files it contains." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1565 -#, no-wrap -msgid "" -" struct guestfs_add_drive_opts_argv optargs = {\n" -" .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n" -" .readonly = 1,\n" -" .format = \"qcow2\"\n" -" };\n" -" \n" +#. type: textblock +#: ../examples/guestfs-recipes.pod:28 +msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1572 -#, no-wrap -msgid "" -" guestfs_add_drive_opts_argv (g, filename, &optargs);\n" -"\n" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:30 +msgid "Change the background image in a Windows XP VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1574 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1844 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255 ../tools/virt-win-reg.pl:532 -msgid "Notes:" +#. type: textblock +#: ../examples/guestfs-recipes.pod:32 +msgid "" +"The links below explain how to use L to change the background " +"image for a user of a Windows XP VM. Unfortunately the technique appears to " +"be substantially different for each version of Windows." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1580 -msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask." +#. type: textblock +#: ../examples/guestfs-recipes.pod:37 +msgid "" +"https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html " +"https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1585 -msgid "You do not need to fill in all fields of the structure." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:40 +msgid "Cloning a virtual machine (Linux)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1589 +#. type: textblock +#: ../examples/guestfs-recipes.pod:42 msgid "" -"There must be a one-to-one correspondence between fields of the structure " -"that are filled in, and bits set in the bitmask." +"The guestfish technique described in the link below works well for most " +"Linux VMs. Depending on the Linux distro you may need to change the paths " +"slightly." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1594 -msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES" +#. type: textblock +#: ../examples/guestfs-recipes.pod:46 +msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1596 +#. type: textblock +#: ../examples/guestfs-recipes.pod:48 msgid "" -"In other languages, optional arguments are expressed in the way that is " -"natural for that language. We refer you to the language-specific " -"documentation for more details on that." +"Avoid L. Currently what to do about virt-clone is under " +"discussion." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1600 -msgid "For guestfish, see L." +#. type: textblock +#: ../examples/guestfs-recipes.pod:51 +msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1602 -msgid "SETTING CALLBACKS TO HANDLE EVENTS" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:53 +msgid "Cloning a virtual machine (Windows)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1604 +#. type: textblock +#: ../examples/guestfs-recipes.pod:55 msgid "" -"The child process generates events in some situations. Current events " -"include: receiving a log message, the child process exits." +"It is possible to do a \"sysprep\" using libguestfs alone, although not " +"straightforward. Currently there is code in the Aeolus Oz project which " +"does this (using libguestfs). As part of our review of the virt-clone tool, " +"we may add sysprepping ability." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1607 +#. type: textblock +#: ../examples/guestfs-recipes.pod:60 msgid "" -"Use the C functions to set a callback for different " -"types of events." +"https://github.com/clalancette/oz " +"https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1610 -msgid "" -"Only I can be registered for each handle. " -"Calling C again overwrites the previous callback of " -"that type. Cancel all callbacks of this type by calling this function with " -"C set to C." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:63 +msgid "Convert a CD-ROM / DVD / ISO to a tarball" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1615 -msgid "guestfs_set_log_message_callback" +#. type: textblock +#: ../examples/guestfs-recipes.pod:65 +msgid "This converts input C to output C:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1617 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:67 #, no-wrap msgid "" -" typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n" -" char *buf, int len);\n" -" void guestfs_set_log_message_callback (guestfs_h *g,\n" -" guestfs_log_message_cb cb,\n" -" void *opaque);\n" +" guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1623 +#. type: textblock +#: ../examples/guestfs-recipes.pod:69 +msgid "To export just a subdirectory, eg. C, do:" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-recipes.pod:71 +#, no-wrap msgid "" -"The callback function C will be called whenever qemu or the guest writes " -"anything to the console." +" guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1626 -msgid "Use this function to capture kernel messages and similar." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:73 +msgid "Create empty disk images" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1628 +#. type: textblock +#: ../examples/guestfs-recipes.pod:75 msgid "" -"Normally there is no log message handler, and log messages are just " -"discarded." +"You can use the L I<-N> option to create empty disk images. " +"The useful guide below explains the options available." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1631 -msgid "guestfs_set_subprocess_quit_callback" +#. type: textblock +#: ../examples/guestfs-recipes.pod:78 +msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1633 -#, no-wrap -msgid "" -" typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n" -" void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n" -" guestfs_subprocess_quit_cb cb,\n" -" void *opaque);\n" -"\n" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:80 +msgid "Dump raw filesystem content from inside a disk image or VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1638 +#. type: textblock +#: ../examples/guestfs-recipes.pod:82 msgid "" -"The callback function C will be called when the child process quits, " -"either asynchronously or if killed by L. (This " -"corresponds to a transition from any state to the CONFIG state)." +"You can use the L C command to extract the raw " +"filesystem content from any filesystem in a disk image or a VM (even one " +"which is encrypted or buried inside an LV):" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1643 -msgid "guestfs_set_launch_done_callback" +#. type: verbatim +#: ../examples/guestfs-recipes.pod:86 +#, no-wrap +msgid "" +" guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n" +"\n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1645 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:88 #, no-wrap msgid "" -" typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n" -" void guestfs_set_launch_done_callback (guestfs_h *g,\n" -" guestfs_launch_done_cb cb,\n" -" void *opaque);\n" +" guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1650 -msgid "" -"The callback function C will be called when the child process becomes " -"ready first time after it has been launched. (This corresponds to a " -"transition from LAUNCHING to the READY state)." +#. type: textblock +#: ../examples/guestfs-recipes.pod:90 +msgid "To list the filesystems in a disk image, use L." +msgstr "" + +#. type: =head1 +#: ../examples/guestfs-recipes.pod:92 +msgid "Edit grub configuration in a VM" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:94 +msgid "You can use this to:" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:100 +msgid "Fix a virtual machine that does not boot." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1654 -msgid "guestfs_set_close_callback" +#. type: textblock +#: ../examples/guestfs-recipes.pod:104 +msgid "Change which kernel is used to boot the VM." msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1656 +#. type: textblock +#: ../examples/guestfs-recipes.pod:108 +msgid "Change kernel command line options." +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:112 +msgid "Use L to edit the grub configuration:" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-recipes.pod:114 #, no-wrap msgid "" -" typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n" -" void guestfs_set_close_callback (guestfs_h *g,\n" -" guestfs_close_cb cb,\n" -" void *opaque);\n" +" virt-edit -d BrokenGuest /boot/grub/grub.conf\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1661 +#. type: textblock +#: ../examples/guestfs-recipes.pod:116 msgid "" -"The callback function C will be called while the handle is being closed " -"(synchronously from L)." +"or for general tinkering inside an unbootable VM use L like " +"this:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1664 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:119 +#, no-wrap msgid "" -"Note that libguestfs installs an L handler to try to clean up " -"handles that are open when the program exits. This means that this callback " -"might be called indirectly from L, which can cause unexpected " -"problems in higher-level languages (eg. if your HLL interpreter has already " -"been cleaned up by the time this is called, and if your callback then jumps " -"into some HLL function)." +" virt-rescue -d BrokenGuest\n" +"\n" +msgstr "" + +#. type: =head1 +#: ../examples/guestfs-recipes.pod:121 +msgid "Export any directory from a VM" msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1672 -msgid "guestfs_set_progress_callback" +#. type: textblock +#: ../examples/guestfs-recipes.pod:123 +msgid "To export C from a VM into a local directory use L:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1674 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:126 #, no-wrap msgid "" -" typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n" -" int proc_nr, int serial,\n" -" uint64_t position, uint64_t total);\n" -" void guestfs_set_progress_callback (guestfs_h *g,\n" -" guestfs_progress_cb cb,\n" -" void *opaque);\n" +" virt-copy-out -d Guest /home .\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1681 +#. type: textblock +#: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1292 ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:18 ../src/guestfs-actions.pod:1922 ../src/guestfs-actions.pod:2860 ../src/guestfs.pod:1640 ../tools/virt-win-reg.pl:706 +msgid "Notes:" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:134 msgid "" -"Some long-running operations can generate progress messages. If this " -"callback is registered, then it will be called each time a progress message " -"is generated (usually two seconds after the operation started, and three " -"times per second thereafter until it completes, although the frequency may " -"change in future versions)." +"The final dot of the command is not a printing error. It means we want to " +"copy out to the current directory." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1687 +#. type: textblock +#: ../examples/guestfs-recipes.pod:139 +msgid "This creates a directory called C under the current directory." +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:143 msgid "" -"The callback receives two numbers: C and C. The units of " -"C are not defined, although for some operations C may relate " -"in some way to the amount of data to be transferred (eg. in bytes or " -"megabytes), and C may be the portion which has been transferred." +"If the guest is a Windows guest then you can use drive letters and " +"backslashes, but you must prefix the path with C and quote it to " +"protect it from the shell, like this:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1693 -msgid "The only defined and stable parts of the API are:" +#. type: verbatim +#: ../examples/guestfs-recipes.pod:147 +#, no-wrap +msgid "" +" virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n" +"\n" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:149 +msgid "To get the output as a compressed tarball, do:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1699 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:151 +#, no-wrap msgid "" -"The callback can display to the user some type of progress bar or indicator " -"which shows the ratio of C:C." +" virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1704 -msgid "0 E= C E= C" +#. type: textblock +#: ../examples/guestfs-recipes.pod:153 +msgid "" +"Although it sounds tempting, this is usually not a reliable way to get a " +"backup from a running guest. See the entry in the FAQ: " +"http://libguestfs.org/FAQ.html#backup" +msgstr "" + +#. type: =head1 +#: ../examples/guestfs-recipes.pod:157 +msgid "Find out which user is using the most space" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1708 +#. type: textblock +#: ../examples/guestfs-recipes.pod:159 msgid "" -"If any progress notification is sent during a call, then a final progress " -"notification is always sent when C = C." +"This simple script examines a Linux guest to find out which user is using " +"the most space in their home directory:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1711 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:162 +#, no-wrap msgid "" -"This is to simplify caller code, so callers can easily set the progress " -"indicator to \"100%\" at the end of the operation, without requiring special " -"code to detect this case." +" #!/bin/sh -\n" +" \n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1717 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:164 +#, no-wrap msgid "" -"The callback also receives the procedure number and serial number of the " -"call. These are only useful for debugging protocol issues, and the callback " -"can normally ignore them. The callback may want to print these numbers in " -"error messages or debugging messages." +" set -e\n" +" \n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1722 -msgid "PRIVATE DATA AREA" +#. type: verbatim +#: ../examples/guestfs-recipes.pod:166 +#, no-wrap +msgid "" +" vm=\"$1\"\n" +" dir=/home\n" +" \n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1724 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:169 +#, no-wrap msgid "" -"You can attach named pieces of private data to the libguestfs handle, and " -"fetch them by name for the lifetime of the handle. This is called the " -"private data area and is only available from the C API." +" eval $(guestfish --ro -d \"$vm\" -i --listen)\n" +" \n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1728 -msgid "To attach a named piece of data, use the following call:" +#. type: verbatim +#: ../examples/guestfs-recipes.pod:171 +#, no-wrap +msgid "" +" for d in $(guestfish --remote ls \"$dir\"); do\n" +" echo -n \"$dir/$d\"\n" +" echo -ne '\\t'\n" +" guestfish --remote du \"$dir/$d\";\n" +" done | sort -nr -k 2\n" +" \n" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1730 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941 #, no-wrap msgid "" -" void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n" +" guestfish --remote exit\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1732 +#. type: =head1 +#: ../examples/guestfs-recipes.pod:179 +msgid "Get DHCP address from a VM" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:181 msgid "" -"C is the name to associate with this data, and C is an arbitrary " -"pointer (which can be C). Any previous item with the same name is " -"overwritten." +"The link below explains the many different possible techniques for getting " +"the last assigned DHCP address of a virtual machine." +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:184 +msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1736 +#. type: textblock +#: ../examples/guestfs-recipes.pod:186 msgid "" -"You can use any C you want, but names beginning with an underscore " -"character are reserved for internal libguestfs purposes (for implementing " -"language bindings). It is recommended to prefix the name with some unique " -"string to avoid collisions with other users." +"In the libguestfs source examples directory you will find the latest version " +"of the C program." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1741 -msgid "To retrieve the pointer, use:" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:189 +msgid "Get the operating system product name string" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1743 +#. type: textblock +#: ../examples/guestfs-recipes.pod:191 +msgid "Save the following script into a file called C:" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-recipes.pod:193 #, no-wrap msgid "" -" void *guestfs_get_private (guestfs_h *g, const char *key);\n" +" #!/bin/sh -\n" +" set -e\n" +" eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n" +" root=\"$(guestfish --remote inspect-get-roots)\"\n" +" guestfish --remote inspect-get-product-name \"$root\"\n" +" guestfish --remote exit\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1745 +#. type: textblock +#: ../examples/guestfs-recipes.pod:200 +msgid "Make the script executable and run it on a named guest:" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-recipes.pod:202 +#, no-wrap msgid "" -"This function returns C if either no data is found associated with " -"C, or if the user previously set the C's C pointer to " -"C." +" # product-name.sh RHEL60x64\n" +" Red Hat Enterprise Linux Server release 6.0 (Santiago)\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1749 +#. type: textblock +#: ../examples/guestfs-recipes.pod:205 msgid "" -"Libguestfs does not try to look at or interpret the C pointer in any " -"way. As far as libguestfs is concerned, it need not be a valid pointer at " -"all. In particular, libguestfs does I try to free the data when the " -"handle is closed. If the data must be freed, then the caller must either " -"free it before calling L or must set up a close callback to " -"do it (see L, and note that only one callback " -"can be registered for a handle)." +"You can also use an XPath query on the L XML using the " +"C command line tool or from your favourite programming language:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1757 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:209 +#, no-wrap msgid "" -"The private data area is implemented using a hash table, and should be " -"reasonably efficient for moderate numbers of keys." +" # virt-inspector RHEL60x64 > xml\n" +" # xpath '//product_name' < xml\n" +" Found 1 nodes:\n" +" -- NODE --\n" +" Red Hat Enterprise Linux Server release 6.0 " +"(Santiago)\n" +"\n" msgstr "" -# type: =end -#: ../src/guestfs.pod:1760 ../src/guestfs.pod:1765 -msgid "html" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:215 +msgid "Get the default boot kernel for a Linux VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1762 +#. type: textblock +#: ../examples/guestfs-recipes.pod:217 msgid "" -" " +"The link below contains a program to print the default boot kernel for a " +"Linux VM." msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1767 -msgid "ARCHITECTURE" +#. type: textblock +#: ../examples/guestfs-recipes.pod:220 +msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1769 +#. type: textblock +#: ../examples/guestfs-recipes.pod:222 msgid "" -"Internally, libguestfs is implemented by running an appliance (a special " -"type of small virtual machine) using L. Qemu runs as a child " -"process of the main program." +"It uses Augeas, and the technique is generally applicable for many different " +"tasks, such as:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1773 -#, no-wrap -msgid "" -" ___________________\n" -" / \\\n" -" | main program |\n" -" | |\n" -" | | child process / appliance\n" -" | | __________________________\n" -" | | / qemu \\\n" -" +-------------------+ RPC | +-----------------+ |\n" -" | libguestfs <--------------------> guestfsd | |\n" -" | | | +-----------------+ |\n" -" \\___________________/ | | Linux kernel | |\n" -" | +--^--------------+ |\n" -" \\_________|________________/\n" -" |\n" -" _______v______\n" -" / \\\n" -" | Device or |\n" -" | disk image |\n" -" \\______________/\n" -"\n" +#. type: textblock +#: ../examples/guestfs-recipes.pod:229 +msgid "listing the user accounts in the guest" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1793 -msgid "" -"The library, linked to the main program, creates the child process and hence " -"the appliance in the L function." +#. type: textblock +#: ../examples/guestfs-recipes.pod:233 +msgid "what repositories is it configured to use" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1796 -msgid "" -"Inside the appliance is a Linux kernel and a complete stack of userspace " -"tools (such as LVM and ext2 programs) and a small controlling daemon called " -"L. The library talks to L using remote procedure " -"calls (RPC). There is a mostly one-to-one correspondence between libguestfs " -"API calls and RPC calls to the daemon. Lastly the disk image(s) are " -"attached to the qemu process which translates device access by the " -"appliance's Linux kernel into accesses to the image." +#. type: textblock +#: ../examples/guestfs-recipes.pod:237 +msgid "what NTP servers does it connect to" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1805 -msgid "" -"A common misunderstanding is that the appliance \"is\" the virtual machine. " -"Although the disk image you are attached to might also be used by some " -"virtual machine, libguestfs doesn't know or care about this. (But you will " -"care if both libguestfs's qemu process and your virtual machine are trying " -"to update the disk image at the same time, since these usually results in " -"massive disk corruption)." +#. type: textblock +#: ../examples/guestfs-recipes.pod:241 +msgid "what were the boot messages last time it booted" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1812 -msgid "STATE MACHINE" +#. type: textblock +#: ../examples/guestfs-recipes.pod:245 +msgid "listing who was logged in recently" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1814 -msgid "libguestfs uses a state machine to model the child process:" +#. type: textblock +#: ../examples/guestfs-recipes.pod:249 +msgid "http://augeas.net/" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1816 -#, no-wrap -msgid "" -" |\n" -" guestfs_create\n" -" |\n" -" |\n" -" ____V_____\n" -" / \\\n" -" | CONFIG |\n" -" \\__________/\n" -" ^ ^ ^ \\\n" -" / | \\ \\ guestfs_launch\n" -" / | _\\__V______\n" -" / | / \\\n" -" / | | LAUNCHING |\n" -" / | \\___________/\n" -" / | /\n" -" / | guestfs_launch\n" -" / | /\n" -" ______ / __|____V\n" -" / \\ ------> / \\\n" -" | BUSY | | READY |\n" -" \\______/ <------ \\________/\n" -"\n" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:251 +msgid "Install RPMs in a guest" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1838 +#. type: textblock +#: ../examples/guestfs-recipes.pod:253 msgid "" -"The normal transitions are (1) CONFIG (when the handle is created, but there " -"is no child process), (2) LAUNCHING (when the child process is booting up), " -"(3) alternating between READY and BUSY as commands are issued to, and " -"carried out by, the child process." +"The link below contains a method to install RPMs in a guest. In fact the " +"RPMs are just uploaded to the guest along with a \"firstboot\" script that " +"installs them next time the guest is booted. You could use this technique " +"to install vital security updates in an offline guest." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1843 -msgid "" -"The guest may be killed by L, or may die " -"asynchronously at any time (eg. due to some internal error), and that causes " -"the state to transition back to CONFIG." +#. type: textblock +#: ../examples/guestfs-recipes.pod:259 +msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1847 -msgid "" -"Configuration commands for qemu such as L can only be " -"issued when in the CONFIG state." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:261 +msgid "List applications installed in a VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1850 +#. type: textblock +#: ../examples/guestfs-recipes.pod:263 +msgid "Save the following to a file C:" +msgstr "" + +#. type: verbatim +#: ../examples/guestfs-recipes.pod:265 +#, no-wrap msgid "" -"The API offers one call that goes from CONFIG through LAUNCHING to READY. " -"L blocks until the child process is READY to accept " -"commands (or until some failure or timeout). L internally " -"moves the state from CONFIG to LAUNCHING while it is running." +" #!/bin/sh -\n" +" set -e\n" +" eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n" +" root=\"$(guestfish --remote inspect-get-roots)\"\n" +" guestfish --remote inspect-list-applications \"$root\"\n" +" guestfish --remote exit\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1856 +#. type: textblock +#: ../examples/guestfs-recipes.pod:272 msgid "" -"API actions such as L can only be issued when in the READY " -"state. These API calls block waiting for the command to be carried out " -"(ie. the state to transition to BUSY and then back to READY). There are no " -"non-blocking versions, and no way to issue more than one command per handle " -"at the same time." +"Make the file executable and then you can run it on any named virtual " +"machine:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1862 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:275 +#, no-wrap msgid "" -"Finally, the child process sends asynchronous messages back to the main " -"program, such as kernel log messages. You can register a callback to " -"receive these messages." +" # list-apps.sh WinGuest\n" +" [0] = {\n" +" app_name: Mozilla Firefox (3.6.12)\n" +" app_display_name: Mozilla Firefox (3.6.12)\n" +" app_epoch: 0\n" +" app_version: 3.6.12 (en-GB)\n" +" app_release:\n" +" app_install_path: C:\\Program Files\\Mozilla Firefox\n" +" app_trans_path:\n" +" app_publisher: Mozilla\n" +" app_url: http://www.mozilla.com/en-GB/\n" +" app_source_package:\n" +" app_summary:\n" +" app_description: Mozilla Firefox\n" +" }\n" +" [1] = {\n" +" app_name: VLC media player\n" +" app_display_name: VLC media player 1.1.5\n" +" app_epoch: 0\n" +" app_version: 1.1.5\n" +" app_release:\n" +" app_install_path: C:\\Program Files\\VideoLAN\\VLC\n" +" app_trans_path:\n" +" app_publisher: VideoLAN\n" +" app_url: http://www.videolan.org/\n" +" app_source_package:\n" +" app_summary:\n" +" app_description:\n" +" }\n" +"\n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:1866 -msgid "INTERNALS" +#. type: textblock +#: ../examples/guestfs-recipes.pod:305 +msgid "" +"If you want to run the script on disk images (instead of libvirt virtual " +"machines), change C<-d \"$1\"> to C<-a \"$1\">. See also " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs.pod:1868 -msgid "COMMUNICATION PROTOCOL" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:309 +msgid "List files and directories in a VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1870 -msgid "" -"Don't rely on using this protocol directly. This section documents how it " -"currently works, but it may change at any time." +#. type: textblock +#: ../examples/guestfs-recipes.pod:311 +msgid "This involves using the L C command like this:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1873 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:313 +#, no-wrap msgid "" -"The protocol used to talk between the library and the daemon running inside " -"the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC " -"1014, RFC 1832, RFC 4506)." +" guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1877 -msgid "" -"The detailed format of structures is in C (note: " -"this file is automatically generated)." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:315 +msgid "List services in a Windows VM" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1880 +#. type: textblock +#: ../examples/guestfs-recipes.pod:317 msgid "" -"There are two broad cases, ordinary functions that don't have any C " -"and C parameters, which are handled with very simple request/reply " -"messages. Then there are functions that have any C or C " -"parameters, which use the same request and reply messages, but they may also " -"be followed by files sent using a chunked encoding." +"The link below contains a script that can be used to list out the services " +"from a Windows VM, and whether those services run at boot time or are loaded " +"on demand." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:1887 -msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)" +#. type: textblock +#: ../examples/guestfs-recipes.pod:321 +msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1889 -msgid "For ordinary functions, the request message is:" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:323 +msgid "Make a disk image sparse" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1891 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-recipes.pod:325 msgid "" -" total length (header + arguments,\n" -" but not including the length word itself)\n" -" struct guestfs_message_header (encoded as XDR)\n" -" struct guestfs__args (encoded as XDR)\n" -"\n" +"The link below contains some guides for making a disk image sparse (or " +"reintroducing sparseness)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1896 -msgid "" -"The total length field allows the daemon to allocate a fixed size buffer " -"into which it slurps the rest of the message. As a result, the total length " -"is limited to C bytes (currently 4MB), which means the " -"effective size of any request is limited to somewhere under this size." +#. type: textblock +#: ../examples/guestfs-recipes.pod:328 +msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1902 -msgid "" -"Note also that many functions don't take any arguments, in which case the " -"C_args> is completely omitted." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:330 +msgid "Monitor disk usage over time" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1905 +#. type: textblock +#: ../examples/guestfs-recipes.pod:332 msgid "" -"The header contains the procedure number (C) which is how the " -"receiver knows what type of args structure to expect, or none at all." +"You can use L to monitor disk usage of your guests over time. " +"The link below contains a guide." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1909 -msgid "" -"For functions that take optional arguments, the optional arguments are " -"encoded in the C_args> structure in the same way as ordinary " -"arguments. A bitmask in the header indicates which optional arguments are " -"meaningful. The bitmask is also checked to see if it contains bits set " -"which the daemon does not know about (eg. if more optional arguments were " -"added in a later version of the library), and this causes the call to be " -"rejected." +#. type: textblock +#: ../examples/guestfs-recipes.pod:335 +msgid "http://virt-tools.org/learning/advanced-virt-df/" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1917 -msgid "The reply message for ordinary functions is:" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:337 +msgid "Reading the Windows Event Log from Windows Vista (or later)" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1919 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-recipes.pod:339 msgid "" -" total length (header + ret,\n" -" but not including the length word itself)\n" -" struct guestfs_message_header (encoded as XDR)\n" -" struct guestfs__ret (encoded as XDR)\n" -"\n" +"L plus the tools described in the link below can be used to " +"read out the Windows Event Log from any virtual machine running Windows " +"Vista or a later version." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1924 -msgid "" -"As above the C_ret> structure may be completely omitted for " -"functions that return no formal return values." +#. type: textblock +#: ../examples/guestfs-recipes.pod:343 +msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1927 -msgid "As above the total length of the reply is limited to C." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:345 +msgid "Remove root password (Linux)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1930 +#. type: textblock +#: ../examples/guestfs-recipes.pod:347 msgid "" -"In the case of an error, a flag is set in the header, and the reply message " -"is slightly changed:" +"Using the L I<-e> option you can do simple replacements on " +"files. One use is to remove the root password from a Linux guest:" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1933 +#. type: verbatim +#: ../examples/guestfs-recipes.pod:350 #, no-wrap msgid "" -" total length (header + error,\n" -" but not including the length word itself)\n" -" struct guestfs_message_header (encoded as XDR)\n" -" struct guestfs_message_error (encoded as XDR)\n" +" virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1938 +#. type: =head1 +#: ../examples/guestfs-recipes.pod:352 +msgid "Remove Administrator password (Windows)" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:354 msgid "" -"The C structure contains the error message as a " -"string." +"The link below contains one technique for removing the Administrator " +"password from a Windows VM, or to be more precise, it gives you a command " +"prompt the next time you log in which you can use to bypass any security:" msgstr "" -# type: =head3 -#: ../src/guestfs.pod:1941 -msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS" +#. type: textblock +#: ../examples/guestfs-recipes.pod:359 +msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1943 -msgid "" -"A C parameter indicates that we transfer a file I the guest. " -"The normal request message is sent (see above). However this is followed by " -"a sequence of file chunks." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:361 +msgid "Unpack a live CD" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1947 -#, no-wrap +#. type: textblock +#: ../examples/guestfs-recipes.pod:363 msgid "" -" total length (header + arguments,\n" -" but not including the length word itself,\n" -" and not including the chunks)\n" -" struct guestfs_message_header (encoded as XDR)\n" -" struct guestfs__args (encoded as XDR)\n" -" sequence of chunks for FileIn param #0\n" -" sequence of chunks for FileIn param #1 etc.\n" -"\n" +"Linux live CDs often contain multiple layers of disk images wrapped like a " +"Russian doll. You can use L to look inside these multiple " +"layers, as outlined in the guide below." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1955 -msgid "The \"sequence of chunks\" is:" +#. type: textblock +#: ../examples/guestfs-recipes.pod:367 +msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:1957 -#, no-wrap -msgid "" -" length of chunk (not including length word itself)\n" -" struct guestfs_chunk (encoded as XDR)\n" -" length of chunk\n" -" struct guestfs_chunk (encoded as XDR)\n" -" ...\n" -" length of chunk\n" -" struct guestfs_chunk (with data.data_len == 0)\n" -"\n" +#. type: =head1 +#: ../examples/guestfs-recipes.pod:369 +msgid "Uploading and downloading files" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1965 +#. type: textblock +#: ../examples/guestfs-recipes.pod:371 msgid "" -"The final chunk has the C field set to zero. Additionally a flag " -"is set in the final chunk to indicate either successful completion or early " -"cancellation." +"The link below contains general tips on uploading (copying in) and " +"downloading (copying out) files from VMs." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1969 -msgid "" -"At time of writing there are no functions that have more than one FileIn " -"parameter. However this is (theoretically) supported, by sending the " -"sequence of chunks for each FileIn parameter one after another (from left to " -"right)." +#. type: textblock +#: ../examples/guestfs-recipes.pod:374 +msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1974 -msgid "" -"Both the library (sender) I the daemon (receiver) may cancel the " -"transfer. The library does this by sending a chunk with a special flag set " -"to indicate cancellation. When the daemon sees this, it cancels the whole " -"RPC, does I send any reply, and goes back to reading the next request." +#. type: =head1 +#: ../examples/guestfs-recipes.pod:376 +msgid "Use libguestfs tools on VMware ESX guests" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1980 +#. type: textblock +#: ../examples/guestfs-recipes.pod:378 msgid "" -"The daemon may also cancel. It does this by writing a special word " -"C to the socket. The library listens for this during " -"the transfer, and if it gets it, it will cancel the transfer (it sends a " -"cancel chunk). The special word is chosen so that even if cancellation " -"happens right at the end of the transfer (after the library has finished " -"writing and has started listening for the reply), the \"spurious\" cancel " -"flag will not be confused with the reply message." +"The link below explains how to use libguestfs, L and the virt " +"tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs." msgstr "" -# type: textblock -#: ../src/guestfs.pod:1989 +#. type: textblock +#: ../examples/guestfs-recipes.pod:382 +msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content" +msgstr "" + +#. type: textblock +#: ../examples/guestfs-recipes.pod:386 msgid "" -"This protocol allows the transfer of arbitrary sized files (no 32 bit " -"limit), and also files where the size is not known in advance (eg. from " -"pipes or sockets). However the chunks are rather small " -"(C), so that neither the library nor the daemon need " -"to keep much in memory." +"L, L, L, L, " +"L, L, L, " +"L, L." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:1995 -msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS" +#. type: textblock +#: ../examples/guestfs-recipes.pod:402 +msgid "Copyright (C) 2009-2011 Red Hat Inc. L" msgstr "" -# type: textblock -#: ../src/guestfs.pod:1997 -msgid "" -"The protocol for FileOut parameters is exactly the same as for FileIn " -"parameters, but with the roles of daemon and library reversed." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1 +msgid "add-cdrom" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:2000 +#. type: verbatim +#: ../fish/guestfish-actions.pod:3 #, no-wrap msgid "" -" total length (header + ret,\n" -" but not including the length word itself,\n" -" and not including the chunks)\n" -" struct guestfs_message_header (encoded as XDR)\n" -" struct guestfs__ret (encoded as XDR)\n" -" sequence of chunks for FileOut param #0\n" -" sequence of chunks for FileOut param #1 etc.\n" +" add-cdrom filename\n" "\n" msgstr "" -# type: =head3 -#: ../src/guestfs.pod:2008 -msgid "INITIAL MESSAGE" +#. type: textblock +#: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14 +msgid "This function adds a virtual CD-ROM disk image to the guest." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2010 -msgid "" -"When the daemon launches it sends an initial word (C) " -"which indicates that the guest and daemon is alive. This is what " -"L waits for." +#. type: textblock +#: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16 +msgid "This is equivalent to the qemu parameter I<-cdrom filename>." msgstr "" -# type: =head3 -#: ../src/guestfs.pod:2014 -msgid "PROGRESS NOTIFICATION MESSAGES" +#. type: textblock +#: ../fish/guestfish-actions.pod:15 +msgid "" +"This call checks for the existence of C. This stops you from " +"specifying other types of drive which are supported by qemu such as C " +"and C URLs. To specify those, use the general L call " +"instead." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2016 +#. type: textblock +#: ../fish/guestfish-actions.pod:22 msgid "" -"The daemon may send progress notification messages at any time. These are " -"distinguished by the normal length word being replaced by " -"C, followed by a fixed size progress message." +"If you just want to add an ISO file (often you use this as an efficient way " +"to transfer large files into the guest), then you should probably use " +"L instead." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2020 +#. type: textblock +#: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177 msgid "" -"The library turns them into progress callbacks (see " -"C) if there is a callback registered, or " -"discards them if not." +"I In new code, use the L call " +"instead." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2024 +#. type: textblock +#: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180 ../fish/guestfish-actions.pod:991 ../fish/guestfish-actions.pod:1351 ../fish/guestfish-actions.pod:1365 ../fish/guestfish-actions.pod:3090 ../fish/guestfish-actions.pod:3297 ../fish/guestfish-actions.pod:3411 ../fish/guestfish-actions.pod:3459 ../fish/guestfish-actions.pod:4360 ../fish/guestfish-actions.pod:4383 ../fish/guestfish-actions.pod:4405 ../fish/guestfish-actions.pod:4443 ../fish/guestfish-actions.pod:5092 ../fish/guestfish-actions.pod:5198 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273 ../src/guestfs-actions.pod:1508 ../src/guestfs-actions.pod:2007 ../src/guestfs-actions.pod:2028 ../src/guestfs-actions.pod:4623 ../src/guestfs-actions.pod:4926 ../src/guestfs-actions.pod:5155 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:6521 ../src/guestfs-actions.pod:6565 ../src/guestfs-actions.pod:6599 ../src/guestfs-actions.pod:6662 ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:7703 ../src/guestfs-actions.pod:7886 msgid "" -"The daemon self-limits the frequency of progress messages it sends (see " -"C). Not all calls generate progress " -"messages." +"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 " +"these functions." msgstr "" -# type: =head1 -#: ../src/guestfs.pod:2028 -msgid "LIBGUESTFS VERSION NUMBERS" +#. type: =head2 +#: ../fish/guestfish-actions.pod:35 +msgid "add-domain" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2030 -msgid "" -"Since April 2010, libguestfs has started to make separate development and " -"stable releases, along with corresponding branches in our git repository. " -"These separate releases can be identified by version number:" +#. type: =head2 +#: ../fish/guestfish-actions.pod:37 +msgid "domain" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:2035 +#. type: verbatim +#: ../fish/guestfish-actions.pod:39 #, no-wrap msgid "" -" even numbers for stable: 1.2.x, 1.4.x, ...\n" -" .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n" -" |\n" -" v\n" -" 1 . 3 . 5\n" -" ^ ^\n" -" | |\n" -" | `-------- sub-version\n" -" |\n" -" `------ always '1' because we don't change the ABI\n" +" add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] " +"[allowuuid:..]\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2046 -msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"." +#. type: textblock +#: ../fish/guestfish-actions.pod:41 +msgid "" +"This function adds the disk(s) attached to the named libvirt domain C. " +"It works by connecting to libvirt, requesting the domain and domain XML from " +"libvirt, parsing it for disks, and calling L on each one." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2048 +#. type: textblock +#: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64 msgid "" -"As time passes we cherry pick fixes from the development branch and backport " -"those into the stable branch, the effect being that the stable branch should " -"get more stable and less buggy over time. So the stable releases are ideal " -"for people who don't need new features but would just like the software to " -"work." +"The number of disks added is returned. This operation is atomic: if an " +"error is returned, then no disks are added." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2054 -msgid "Our criteria for backporting changes are:" +#. type: textblock +#: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67 +msgid "" +"This function does some minimal checks to make sure the libvirt domain is " +"not running (unless C is true). In a future version we will try " +"to acquire the libvirt lock on each disk." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2060 +#. type: textblock +#: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71 msgid "" -"Documentation changes which don't affect any code are backported unless the " -"documentation refers to a future feature which is not in stable." +"Disks must be accessible locally. This often means that adding disks from a " +"remote libvirt connection (see L) will fail " +"unless those disks are accessible via the same device path locally too." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2066 +#. type: textblock +#: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76 msgid "" -"Bug fixes which are not controversial, fix obvious problems, and have been " -"well tested are backported." +"The optional C parameter sets the libvirt URI (see " +"L). If this is not set then we connect to the " +"default libvirt URI (or one set through an environment variable, see the " +"libvirt documentation for full details)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2071 +#. type: textblock +#: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82 msgid "" -"Simple rearrangements of code which shouldn't affect how it works get " -"backported. This is so that the code in the two branches doesn't get too " -"far out of step, allowing us to backport future fixes more easily." +"The optional C flag controls whether this call will try to connect to " +"a running virtual machine C process if it sees a suitable " +"EchannelE element in the libvirt XML definition. The default (if " +"the flag is omitted) is never to try. See L for more information." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2077 +#. type: textblock +#: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89 msgid "" -"We I backport new features, new APIs, new tools etc, except in one " -"exceptional case: the new feature is required in order to implement an " -"important bug fix." +"If the C flag is true (default is false) then a UUID I be " +"passed instead of the domain name. The C string is treated as a UUID " +"first and looked up, and if that lookup fails then we treat C as a name " +"as usual." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2083 +#. type: textblock +#: ../fish/guestfish-actions.pod:76 msgid "" -"A new stable branch starts when we think the new features in development are " -"substantial and compelling enough over the current stable branch to warrant " -"it. When that happens we create new stable and development versions 1.N.0 " -"and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so " -"stable at this point, but by backporting fixes from development, that branch " -"will stabilize over time." +"The other optional parameters are passed directly through to " +"L." msgstr "" -# type: =head1 -#: ../src/guestfs.pod:2091 ../fish/guestfish.pod:965 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330 -msgid "ENVIRONMENT VARIABLES" +#. type: textblock +#: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143 ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:1973 ../fish/guestfish-actions.pod:3139 ../fish/guestfish-actions.pod:3312 ../fish/guestfish-actions.pod:3447 +msgid "" +"This command has one or more optional arguments. See L." msgstr "" -# type: =item -#: ../src/guestfs.pod:2095 ../fish/guestfish.pod:991 -msgid "LIBGUESTFS_APPEND" +#. type: =head2 +#: ../fish/guestfish-actions.pod:81 +msgid "add-drive" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2097 ../fish/guestfish.pod:993 -msgid "Pass additional options to the guest kernel." +#. type: verbatim +#: ../fish/guestfish-actions.pod:83 +#, no-wrap +msgid "" +" add-drive filename\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:2099 ../fish/guestfish.pod:995 -msgid "LIBGUESTFS_DEBUG" +#. type: textblock +#: ../fish/guestfish-actions.pod:85 +msgid "" +"This function is the equivalent of calling L with no " +"optional parameters, so the disk is added writable, with the format being " +"detected automatically." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2101 +#. type: textblock +#: ../fish/guestfish-actions.pod:89 msgid "" -"Set C to enable verbose messages. This has the same " -"effect as calling C." +"Automatic detection of the format opens you up to a potential security hole " +"when dealing with untrusted raw-format images. See CVE-2010-3851 and " +"RHBZ#642934. Specifying the format closes this security hole. Therefore " +"you should think about replacing calls to this function with calls to " +"L, and specifying the format." msgstr "" -# type: =item -#: ../src/guestfs.pod:2104 ../fish/guestfish.pod:1000 -msgid "LIBGUESTFS_MEMSIZE" +#. type: =head2 +#: ../fish/guestfish-actions.pod:96 +msgid "add-drive-opts" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2106 ../fish/guestfish.pod:1002 -msgid "Set the memory allocated to the qemu process, in megabytes. For example:" +#. type: =head2 +#: ../fish/guestfish-actions.pod:98 +msgid "add" msgstr "" -# type: verbatim -#: ../src/guestfs.pod:2109 ../fish/guestfish.pod:1005 +#. type: verbatim +#: ../fish/guestfish-actions.pod:100 #, no-wrap msgid "" -" LIBGUESTFS_MEMSIZE=700\n" +" add-drive-opts filename [readonly:..] [format:..] [iface:..]\n" "\n" msgstr "" -# type: =item -#: ../src/guestfs.pod:2111 ../fish/guestfish.pod:1007 -msgid "LIBGUESTFS_PATH" -msgstr "" - -# type: textblock -#: ../src/guestfs.pod:2113 +#. type: textblock +#: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160 msgid "" -"Set the path that libguestfs uses to search for kernel and initrd.img. See " -"the discussion of paths in section PATH above." -msgstr "" - -# type: =item -#: ../src/guestfs.pod:2116 ../fish/guestfish.pod:1012 -msgid "LIBGUESTFS_QEMU" +"This function adds a virtual machine disk image C to libguestfs. " +"The first time you call this function, the disk appears as C, the " +"second time as C, and so on." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2118 ../fish/guestfish.pod:1014 +#. type: textblock +#: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165 msgid "" -"Set the default qemu binary that libguestfs uses. If not set, then the qemu " -"which was found at compile time by the configure script is used." +"You don't necessarily need to be root when using libguestfs. However you " +"obviously do need sufficient permissions to access the filename for whatever " +"operations you want to perform (ie. read access if you just want to read the " +"image or write access if you want to modify the image)." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2122 -msgid "See also L above." +#. type: textblock +#: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171 +msgid "This call checks that C exists." msgstr "" -# type: =item -#: ../src/guestfs.pod:2124 ../fish/guestfish.pod:1018 -msgid "LIBGUESTFS_TRACE" +#. type: textblock +#: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3101 ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4660 +msgid "The optional arguments are:" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2126 -msgid "" -"Set C to enable command traces. This has the same " -"effect as calling C." +#. type: =item +#: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177 +msgid "C" msgstr "" -# type: =item -#: ../src/guestfs.pod:2129 ../fish/guestfish.pod:1027 -msgid "TMPDIR" +#. type: textblock +#: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179 +msgid "" +"If true then the image is treated as read-only. Writes are still allowed, " +"but they are stored in a temporary snapshot overlay which is discarded at " +"the end. The disk that you add is not modified." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2131 ../fish/guestfish.pod:1029 -msgid "Location of temporary directory, defaults to C." +#. type: =item +#: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2133 ../fish/guestfish.pod:1031 +#. type: textblock +#: ../fish/guestfish-actions.pod:127 msgid "" -"If libguestfs was compiled to use the supermin appliance then the real " -"appliance is cached in this directory, shared between all handles belonging " -"to the same EUID. You can use C<$TMPDIR> to configure another directory to " -"use in case C is not large enough." -msgstr "" - -# type: =head1 -#: ../src/guestfs.pod:2141 ../fish/guestfish.pod:1089 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:572 ../tools/virt-resize.pl:1483 ../tools/virt-list-filesystems.pl:189 ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:257 -msgid "SEE ALSO" +"This forces the image format. If you omit this (or use L or " +"L) then the format is automatically detected. Possible " +"formats include C and C." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2143 +#. type: textblock +#: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189 msgid "" -"L, L, L, " -"L, L, L, L, " -"L, L, L, " -"L, L, " -"L, L, L, " -"L, L, L, L, " -"L, L, L." +"Automatic detection of the format opens you up to a potential security hole " +"when dealing with untrusted raw-format images. See CVE-2010-3851 and " +"RHBZ#642934. Specifying the format closes this security hole." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2166 -msgid "" -"Tools with a similar purpose: L, L, L, " -"L, L." +#. type: =item +#: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194 +msgid "C" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:2173 ../tools/virt-win-reg.pl:587 ../tools/virt-make-fs.pl:548 -msgid "BUGS" +#. type: textblock +#: ../fish/guestfish-actions.pod:138 +msgid "" +"This rarely-used option lets you emulate the behaviour of the deprecated " +"L call (q.v.)" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2175 -msgid "To get a list of bugs against libguestfs use this link:" +#. type: =head2 +#: ../fish/guestfish-actions.pod:145 +msgid "add-drive-ro" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2177 -msgid "L" +#. type: =head2 +#: ../fish/guestfish-actions.pod:147 +msgid "add-ro" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2179 -msgid "To report a new bug against libguestfs use this link:" +#. type: verbatim +#: ../fish/guestfish-actions.pod:149 +#, no-wrap +msgid "" +" add-drive-ro filename\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2181 -msgid "L" +#. type: textblock +#: ../fish/guestfish-actions.pod:151 +msgid "" +"This function is the equivalent of calling L with the " +"optional parameter C set to 1, so the disk " +"is added read-only, with the format being detected automatically." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2183 -msgid "When reporting a bug, please check:" +#. type: =head2 +#: ../fish/guestfish-actions.pod:156 +msgid "add-drive-ro-with-if" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2189 -msgid "That the bug hasn't been reported already." +#. type: verbatim +#: ../fish/guestfish-actions.pod:158 +#, no-wrap +msgid "" +" add-drive-ro-with-if filename iface\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2193 -msgid "That you are testing a recent version." +#. type: textblock +#: ../fish/guestfish-actions.pod:160 +msgid "" +"This is the same as L but it allows you to specify the QEMU " +"interface emulation to use at run time." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2197 -msgid "Describe the bug accurately, and give a way to reproduce it." +#. type: =head2 +#: ../fish/guestfish-actions.pod:170 +msgid "add-drive-with-if" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2201 +#. type: verbatim +#: ../fish/guestfish-actions.pod:172 +#, no-wrap msgid "" -"Run libguestfs-test-tool and paste the B output into the " -"bug report." +" add-drive-with-if filename iface\n" +"\n" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:2206 ../fish/guestfish.pod:1108 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244 -msgid "AUTHORS" +#. type: textblock +#: ../fish/guestfish-actions.pod:174 +msgid "" +"This is the same as L but it allows you to specify the QEMU " +"interface emulation to use at run time." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2208 ../fish/guestfish.pod:1110 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246 -msgid "Richard W.M. Jones (C)" +#. type: =head2 +#: ../fish/guestfish-actions.pod:184 +msgid "aug-clear" msgstr "" -# type: =head1 -#: ../src/guestfs.pod:2210 ../fish/guestfish.pod:1112 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248 ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:602 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:206 ../tools/virt-tar.pl:296 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:273 -msgid "COPYRIGHT" +#. type: verbatim +#: ../fish/guestfish-actions.pod:186 +#, no-wrap +msgid "" +" aug-clear augpath\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2212 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:250 -msgid "Copyright (C) 2009-2010 Red Hat Inc. L" +#. type: textblock +#: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290 +msgid "" +"Set the value associated with C to C. This is the same as the " +"L C command." msgstr "" -# type: textblock -#: ../src/guestfs.pod:2215 -msgid "" -"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." +#. type: =head2 +#: ../fish/guestfish-actions.pod:191 +msgid "aug-close" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2220 +#. type: verbatim +#: ../fish/guestfish-actions.pod:193 +#, no-wrap msgid "" -"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." +" aug-close\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs.pod:2225 +#. type: textblock +#: ../fish/guestfish-actions.pod:195 msgid "" -"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" +"Close the current Augeas handle and free up any resources used by it. After " +"calling this, you have to call L again before you can use any " +"other Augeas functions." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1 -msgid "guestfs_add_cdrom" +#. type: =head2 +#: ../fish/guestfish-actions.pod:200 +msgid "aug-defnode" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3 +#. type: verbatim +#: ../fish/guestfish-actions.pod:202 #, no-wrap msgid "" -" int\n" -" guestfs_add_cdrom (guestfs_h *g,\n" -" const char *filename);\n" +" aug-defnode name expr val\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5 -msgid "This function adds a virtual CD-ROM disk image to the guest." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7 -msgid "This is equivalent to the qemu parameter C<-cdrom filename>." +#. type: textblock +#: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319 +msgid "Defines a variable C whose value is the result of evaluating C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:17 +#. type: textblock +#: ../fish/guestfish-actions.pod:207 msgid "" -"This call checks for the existence of C. This stops you from " -"specifying other types of drive which are supported by qemu such as C " -"and C URLs. To specify those, use the general C call " -"instead." +"If C evaluates to an empty nodeset, a node is created, equivalent to " +"calling L C, C. C will be the nodeset " +"containing that single node." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:24 +#. type: textblock +#: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326 msgid "" -"If you just want to add an ISO file (often you use this as an efficient way " -"to transfer large files into the guest), then you should probably use " -"C instead." +"On success this returns a pair containing the number of nodes in the " +"nodeset, and a boolean flag if a node was created." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:128 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:226 ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535 ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1163 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1326 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448 ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3222 ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3257 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:3437 ../src/guestfs-actions.pod:3451 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3502 ../src/guestfs-actions.pod:3574 ../src/guestfs-actions.pod:3594 ../src/guestfs-actions.pod:3611 ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3689 ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:3810 ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3839 ../src/guestfs-actions.pod:3854 ../src/guestfs-actions.pod:3871 ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:3997 ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4066 ../src/guestfs-actions.pod:4084 ../src/guestfs-actions.pod:4100 ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4145 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4224 ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4326 ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4376 ../src/guestfs-actions.pod:4393 ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4421 ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:4471 ../src/guestfs-actions.pod:4486 ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4586 ../src/guestfs-actions.pod:4623 ../src/guestfs-actions.pod:4637 ../src/guestfs-actions.pod:4665 ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4891 ../src/guestfs-actions.pod:4913 ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5059 ../src/guestfs-actions.pod:5073 ../src/guestfs-actions.pod:5362 ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:5407 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5433 ../src/guestfs-actions.pod:5447 ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5522 ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5581 ../src/guestfs-actions.pod:5600 ../src/guestfs-actions.pod:5621 ../src/guestfs-actions.pod:5640 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5685 ../src/guestfs-actions.pod:5709 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5801 ../src/guestfs-actions.pod:5838 ../src/guestfs-actions.pod:5861 ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:5995 ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6141 ../src/guestfs-actions.pod:6154 ../src/guestfs-actions.pod:6176 ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6215 ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6289 ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6322 ../src/guestfs-actions.pod:6338 ../src/guestfs-actions.pod:6355 ../src/guestfs-actions.pod:6368 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6438 ../src/guestfs-actions.pod:6479 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6510 ../src/guestfs-actions.pod:6544 ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6717 ../src/guestfs-actions.pod:6731 ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:6799 ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6877 ../src/guestfs-actions.pod:6931 ../src/guestfs-actions.pod:6957 ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7042 ../src/guestfs-actions.pod:7071 -msgid "This function returns 0 on success or -1 on error." +#. type: =head2 +#: ../fish/guestfish-actions.pod:215 +msgid "aug-defvar" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:242 ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:153 ../fish/guestfish-actions.pod:167 +#. type: verbatim +#: ../fish/guestfish-actions.pod:217 +#, no-wrap msgid "" -"This function is deprecated. In new code, use the C call " -"instead." +" aug-defvar name expr\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:245 ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:1437 ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:4185 ../src/guestfs-actions.pod:6965 ../src/guestfs-actions.pod:7134 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:156 ../fish/guestfish-actions.pod:170 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:2818 ../fish/guestfish-actions.pod:4620 ../fish/guestfish-actions.pod:4717 +#. type: textblock +#: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343 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 " -"these functions." +"Defines an Augeas variable C whose value is the result of evaluating " +"C. If C is NULL, then C is undefined." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:130 ../src/guestfs-actions.pod:1094 ../src/guestfs-actions.pod:1895 ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239 ../src/guestfs-actions.pod:4473 ../src/guestfs-actions.pod:5542 ../src/guestfs-actions.pod:5659 ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:6232 ../src/guestfs-actions.pod:6357 ../src/guestfs-actions.pod:6879 -msgid "(Added in 0.3)" +#. type: textblock +#: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347 +msgid "" +"On success this returns the number of nodes in C, or C<0> if C " +"evaluates to something which is not a nodeset." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:41 -msgid "guestfs_add_domain" +#. type: =head2 +#: ../fish/guestfish-actions.pod:226 +msgid "aug-get" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:43 +#. type: verbatim +#: ../fish/guestfish-actions.pod:228 #, no-wrap msgid "" -" int\n" -" guestfs_add_domain (guestfs_h *g,\n" -" const char *dom,\n" -" ...);\n" +" aug-get augpath\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:139 ../src/guestfs-actions.pod:4199 +#. type: textblock +#: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360 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 " -"its own. See L." +"Look up the value associated with C. If C matches exactly one " +"node, the C is returned." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:53 -#, no-wrap -msgid "" -" GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n" -" GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n" -" GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n" -"\n" +#. type: =head2 +#: ../fish/guestfish-actions.pod:233 +msgid "aug-init" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:57 +#. type: verbatim +#: ../fish/guestfish-actions.pod:235 +#, no-wrap msgid "" -"This function adds the disk(s) attached to the named libvirt domain C. " -"It works by connecting to libvirt, requesting the domain and domain XML from " -"libvirt, parsing it for disks, and calling C on each " -"one." +" aug-init root flags\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46 +#. type: textblock +#: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375 msgid "" -"The number of disks added is returned. This operation is atomic: if an " -"error is returned, then no disks are added." +"Create a new Augeas handle for editing configuration files. If there was " +"any previous Augeas handle associated with this guestfs session, then it is " +"closed." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49 -msgid "" -"This function does some minimal checks to make sure the libvirt domain is " -"not running (unless C is true). In a future version we will try " -"to acquire the libvirt lock on each disk." +#. type: textblock +#: ../fish/guestfish-actions.pod:241 +msgid "You must call this before using any other L commands." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53 -msgid "" -"Disks must be accessible locally. This often means that adding disks from a " -"remote libvirt connection (see L) will fail " -"unless those disks are accessible via the same device path locally too." +#. type: textblock +#: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382 +msgid "C is the filesystem root. C must not be NULL, use C instead." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:74 +#. type: textblock +#: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385 msgid "" -"The optional C parameter sets the libvirt URI (see " -"L). If this is not set then we connect to the " -"default libvirt URI (or one set through an environment variable, see the " -"libvirt documentation for full details). If you are using the C API " -"directly then it is more flexible to create the libvirt connection object " -"yourself, get the domain object, and call C." +"The flags are the same as the flags defined in Eaugeas.hE, the " +"logical I of the following integers:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:82 -msgid "" -"The other optional parameters are passed directly through to " -"C." +#. type: =item +#: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391 +msgid "C = 1" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:85 ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2005 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:4609 ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:5143 ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:6465 ../src/guestfs-actions.pod:6890 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6916 -msgid "On error this function returns -1." +#. type: textblock +#: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393 +msgid "Keep the original file with a C<.augsave> extension." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:87 -msgid "(Added in 1.7.4)" +#. type: =item +#: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395 +msgid "C = 2" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:89 -msgid "guestfs_add_domain_va" +#. type: textblock +#: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397 +msgid "" +"Save changes into a file with extension C<.augnew>, and do not overwrite " +"original. Overrides C." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:91 -#, no-wrap -msgid "" -" int\n" -" guestfs_add_domain_va (guestfs_h *g,\n" -" const char *dom,\n" -" va_list args);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400 +msgid "C = 4" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:96 -msgid "This is the \"va_list variant\" of L." +#. type: textblock +#: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402 +msgid "Typecheck lenses." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:98 ../src/guestfs-actions.pod:109 ../src/guestfs-actions.pod:202 ../src/guestfs-actions.pod:213 ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4248 -msgid "See L." +#. type: textblock +#: ../fish/guestfish-actions.pod:266 +msgid "" +"This option is only useful when debugging Augeas lenses. Use of this option " +"may require additional memory for the libguestfs appliance. You may need to " +"set the C environment variable or call L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:100 -msgid "guestfs_add_domain_argv" +#. type: =item +#: ../fish/guestfish-actions.pod:271 ../src/guestfs-actions.pod:409 +msgid "C = 8" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:102 -#, no-wrap -msgid "" -" int\n" -" guestfs_add_domain_argv (guestfs_h *g,\n" -" const char *dom,\n" -" const struct guestfs_add_domain_argv *optargs);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:273 ../src/guestfs-actions.pod:411 +msgid "Do not use standard load path for modules." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:107 -msgid "This is the \"argv variant\" of L." +#. type: =item +#: ../fish/guestfish-actions.pod:275 ../src/guestfs-actions.pod:413 +msgid "C = 16" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:111 -msgid "guestfs_add_drive" +#. type: textblock +#: ../fish/guestfish-actions.pod:277 ../src/guestfs-actions.pod:415 +msgid "Make save a no-op, just record what would have been changed." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:113 -#, no-wrap -msgid "" -" int\n" -" guestfs_add_drive (guestfs_h *g,\n" -" const char *filename);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:279 ../src/guestfs-actions.pod:417 +msgid "C = 32" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:117 -msgid "" -"This function is the equivalent of calling C with no " -"optional parameters, so the disk is added writable, with the format being " -"detected automatically." +#. type: textblock +#: ../fish/guestfish-actions.pod:281 +msgid "Do not load the tree in L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:121 -msgid "" -"Automatic detection of the format opens you up to a potential security hole " -"when dealing with untrusted raw-format images. See CVE-2010-3851 and " -"RHBZ#642934. Specifying the format closes this security hole. Therefore " -"you should think about replacing calls to this function with calls to " -"C, and specifying the format." +#. type: textblock +#: ../fish/guestfish-actions.pod:285 +msgid "To close the handle, you can call L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:132 -msgid "guestfs_add_drive_opts" +#. type: textblock +#: ../fish/guestfish-actions.pod:287 ../src/guestfs-actions.pod:425 +msgid "To find out more about Augeas, see L." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:134 -#, no-wrap -msgid "" -" int\n" -" guestfs_add_drive_opts (guestfs_h *g,\n" -" const char *filename,\n" -" ...);\n" -"\n" +#. type: =head2 +#: ../fish/guestfish-actions.pod:289 +msgid "aug-insert" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:144 +#. type: verbatim +#: ../fish/guestfish-actions.pod:291 #, no-wrap msgid "" -" GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n" -" GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n" +" aug-insert augpath label true|false\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:148 ../fish/guestfish-actions.pod:92 +#. type: textblock +#: ../fish/guestfish-actions.pod:293 ../src/guestfs-actions.pod:439 msgid "" -"This function adds a virtual machine disk image C to libguestfs. " -"The first time you call this function, the disk appears as C, the " -"second time as C, and so on." +"Create a new sibling C." +#. type: textblock +#: ../fish/guestfish-actions.pod:329 ../src/guestfs-actions.pod:503 +msgid "" +"Move the node C to C. C must match exactly one node. " +"C is overwritten if it exists." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:204 -msgid "guestfs_add_drive_opts_argv" +#. type: =head2 +#: ../fish/guestfish-actions.pod:332 +msgid "aug-rm" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:206 +#. type: verbatim +#: ../fish/guestfish-actions.pod:334 #, no-wrap msgid "" -" int\n" -" guestfs_add_drive_opts_argv (guestfs_h *g,\n" -" const char *filename,\n" -" const struct guestfs_add_drive_opts_argv " -"*optargs);\n" +" aug-rm augpath\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:211 -msgid "This is the \"argv variant\" of L." +#. type: textblock +#: ../fish/guestfish-actions.pod:336 ../src/guestfs-actions.pod:516 +msgid "Remove C and all of its children." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:215 -msgid "guestfs_add_drive_ro" +#. type: textblock +#: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:518 +msgid "On success this returns the number of entries which were removed." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:340 +msgid "aug-save" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:217 +#. type: verbatim +#: ../fish/guestfish-actions.pod:342 #, no-wrap msgid "" -" int\n" -" guestfs_add_drive_ro (guestfs_h *g,\n" -" const char *filename);\n" +" aug-save\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:221 -msgid "" -"This function is the equivalent of calling C with " -"the optional parameter C set to 1, so the " -"disk is added read-only, with the format being detected automatically." +#. type: textblock +#: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:529 +msgid "This writes all pending changes to disk." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:228 -msgid "(Added in 1.0.38)" +#. type: textblock +#: ../fish/guestfish-actions.pod:346 +msgid "" +"The flags which were passed to L affect exactly how files are " +"saved." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:230 -msgid "guestfs_add_drive_ro_with_if" +#. type: =head2 +#: ../fish/guestfish-actions.pod:349 +msgid "aug-set" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:232 +#. type: verbatim +#: ../fish/guestfish-actions.pod:351 #, no-wrap msgid "" -" int\n" -" guestfs_add_drive_ro_with_if (guestfs_h *g,\n" -" const char *filename,\n" -" const char *iface);\n" +" aug-set augpath val\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:237 -msgid "" -"This is the same as C but it allows you to specify the " -"QEMU interface emulation to use at run time." +#. type: textblock +#: ../fish/guestfish-actions.pod:353 ../src/guestfs-actions.pod:545 +msgid "Set the value associated with C to C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:249 ../src/guestfs-actions.pod:270 ../src/guestfs-actions.pod:2333 -msgid "(Added in 1.0.84)" +#. type: textblock +#: ../fish/guestfish-actions.pod:355 +msgid "" +"In the Augeas API, it is possible to clear a node by setting the value to " +"NULL. Due to an oversight in the libguestfs API you cannot do that with " +"this call. Instead you must use the L call." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:251 -msgid "guestfs_add_drive_with_if" +#. type: =head2 +#: ../fish/guestfish-actions.pod:360 +msgid "available" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:253 +#. type: verbatim +#: ../fish/guestfish-actions.pod:362 #, no-wrap msgid "" -" int\n" -" guestfs_add_drive_with_if (guestfs_h *g,\n" -" const char *filename,\n" -" const char *iface);\n" +" available 'groups ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:258 +#. type: textblock +#: ../fish/guestfish-actions.pod:364 ../src/guestfs-actions.pod:562 msgid "" -"This is the same as C but it allows you to specify the " -"QEMU interface emulation to use at run time." +"This command is used to check the availability of some groups of " +"functionality in the appliance, which not all builds of the libguestfs " +"appliance will be able to provide." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:272 -msgid "guestfs_aug_clear" -msgstr "" - -# type: verbatim -#: ../src/guestfs-actions.pod:274 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:368 msgid "" -" int\n" -" guestfs_aug_clear (guestfs_h *g,\n" -" const char *augpath);\n" -"\n" +"The libguestfs groups, and the functions that those groups correspond to, " +"are listed in L. You can also fetch this list at " +"runtime by calling L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:178 +#. type: textblock +#: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571 msgid "" -"Set the value associated with C to C. This is the same as the " -"L C command." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:283 ../src/guestfs-actions.pod:2085 -msgid "(Added in 1.3.4)" +"The argument C is a list of group names, eg: C<[\"inotify\", " +"\"augeas\"]> would check for the availability of the Linux inotify functions " +"and Augeas (configuration file editing) functions." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:285 -msgid "guestfs_aug_close" +#. type: textblock +#: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576 +msgid "The command returns no error if I requested groups are available." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:287 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:578 msgid "" -" int\n" -" guestfs_aug_close (guestfs_h *g);\n" -"\n" +"It fails with an error if one or more of the requested groups is unavailable " +"in the appliance." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:290 +#. type: textblock +#: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:581 msgid "" -"Close the current Augeas handle and free up any resources used by it. After " -"calling this, you have to call C again before you can use " -"any other Augeas functions." +"If an unknown group name is included in the list of groups then an error is " +"always returned." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:297 ../src/guestfs-actions.pod:322 ../src/guestfs-actions.pod:340 ../src/guestfs-actions.pod:354 ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:432 ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:491 ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:519 ../src/guestfs-actions.pod:537 ../src/guestfs-actions.pod:5220 -msgid "(Added in 0.7)" +#. type: textblock +#: ../fish/guestfish-actions.pod:386 ../src/guestfs-actions.pod:584 +msgid "I" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:299 -msgid "guestfs_aug_defnode" +#. type: textblock +#: ../fish/guestfish-actions.pod:392 +msgid "You must call L before calling this function." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:301 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:394 ../src/guestfs-actions.pod:592 msgid "" -" struct guestfs_int_bool *\n" -" guestfs_aug_defnode (guestfs_h *g,\n" -" const char *name,\n" -" const char *expr,\n" -" const char *val);\n" -"\n" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:307 ../fish/guestfish-actions.pod:194 -msgid "Defines a variable C whose value is the result of evaluating C." +"The reason is because we don't know what groups are supported by the " +"appliance/daemon until it is running and can be queried." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:310 +#. type: textblock +#: ../fish/guestfish-actions.pod:400 ../src/guestfs-actions.pod:598 msgid "" -"If C evaluates to an empty nodeset, a node is created, equivalent to " -"calling C C, C. C will be the nodeset " -"containing that single node." +"If a group of functions is available, this does not necessarily mean that " +"they will work. You still have to check for errors when calling individual " +"API functions even if they are available." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:314 ../fish/guestfish-actions.pod:201 +#. type: textblock +#: ../fish/guestfish-actions.pod:407 ../src/guestfs-actions.pod:605 msgid "" -"On success this returns a pair containing the number of nodes in the " -"nodeset, and a boolean flag if a node was created." +"It is usually the job of distro packagers to build complete functionality " +"into the libguestfs appliance. Upstream libguestfs, if built from source " +"with all requirements satisfied, will support everything." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:318 +#. type: textblock +#: ../fish/guestfish-actions.pod:414 msgid "" -"This function returns a C, or NULL if there was " -"an error. I after use>." +"This call was added in version C<1.0.80>. In previous versions of " +"libguestfs all you could do would be to speculatively execute a command to " +"find out if the daemon implemented it. See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:324 -msgid "guestfs_aug_defvar" +#. type: =head2 +#: ../fish/guestfish-actions.pod:421 +msgid "available-all-groups" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:326 +#. type: verbatim +#: ../fish/guestfish-actions.pod:423 #, no-wrap msgid "" -" int\n" -" guestfs_aug_defvar (guestfs_h *g,\n" -" const char *name,\n" -" const char *expr);\n" +" available-all-groups\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:331 ../fish/guestfish-actions.pod:209 +#. type: textblock +#: ../fish/guestfish-actions.pod:425 msgid "" -"Defines an Augeas variable C whose value is the result of evaluating " -"C. If C is NULL, then C is undefined." +"This command returns a list of all optional groups that this daemon knows " +"about. Note this returns both supported and unsupported groups. To find " +"out which ones the daemon can actually support you have to call " +"L on each member of the returned list." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:335 ../fish/guestfish-actions.pod:213 -msgid "" -"On success this returns the number of nodes in C, or C<0> if C " -"evaluates to something which is not a nodeset." +#. type: textblock +#: ../fish/guestfish-actions.pod:431 +msgid "See also L and L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:342 -msgid "guestfs_aug_get" +#. type: =head2 +#: ../fish/guestfish-actions.pod:433 +msgid "base64-in" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:344 +#. type: verbatim +#: ../fish/guestfish-actions.pod:435 #, no-wrap msgid "" -" char *\n" -" guestfs_aug_get (guestfs_h *g,\n" -" const char *augpath);\n" +" base64-in (base64file|-) filename\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:348 ../fish/guestfish-actions.pod:220 -msgid "" -"Look up the value associated with C. If C matches exactly one " -"node, the C is returned." +#. type: textblock +#: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:649 +msgid "This command uploads base64-encoded data from C to C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:351 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:869 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1048 ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1195 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1343 ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1646 ../src/guestfs-actions.pod:1809 ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1938 ../src/guestfs-actions.pod:2108 ../src/guestfs-actions.pod:2298 ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2744 ../src/guestfs-actions.pod:2775 ../src/guestfs-actions.pod:2799 ../src/guestfs-actions.pod:2861 ../src/guestfs-actions.pod:2884 ../src/guestfs-actions.pod:3396 ../src/guestfs-actions.pod:3746 ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4948 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5345 ../src/guestfs-actions.pod:5908 ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5941 ../src/guestfs-actions.pod:5965 ../src/guestfs-actions.pod:6639 ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6676 ../src/guestfs-actions.pod:6856 ../src/guestfs-actions.pod:7128 -msgid "" -"This function returns a string, or NULL on error. I." +#. type: textblock +#: ../fish/guestfish-actions.pod:440 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:698 ../fish/guestfish-actions.pod:867 ../fish/guestfish-actions.pod:886 ../fish/guestfish-actions.pod:1260 ../fish/guestfish-actions.pod:4663 ../fish/guestfish-actions.pod:4675 ../fish/guestfish-actions.pod:4686 ../fish/guestfish-actions.pod:4697 ../fish/guestfish-actions.pod:4749 ../fish/guestfish-actions.pod:4758 ../fish/guestfish-actions.pod:4812 ../fish/guestfish-actions.pod:4835 +msgid "Use C<-> instead of a filename to read/write from stdin/stdout." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:356 -msgid "guestfs_aug_init" +#. type: =head2 +#: ../fish/guestfish-actions.pod:442 +msgid "base64-out" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:358 +#. type: verbatim +#: ../fish/guestfish-actions.pod:444 #, no-wrap msgid "" -" int\n" -" guestfs_aug_init (guestfs_h *g,\n" -" const char *root,\n" -" int flags);\n" +" base64-out filename (base64file|-)\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:363 ../fish/guestfish-actions.pod:227 +#. type: textblock +#: ../fish/guestfish-actions.pod:446 ../src/guestfs-actions.pod:663 msgid "" -"Create a new Augeas handle for editing configuration files. If there was " -"any previous Augeas handle associated with this guestfs session, then it is " -"closed." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:367 -msgid "You must call this before using any other C commands." +"This command downloads the contents of C, writing it out to local " +"file C encoded as base64." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:370 ../fish/guestfish-actions.pod:234 -msgid "C is the filesystem root. C must not be NULL, use C instead." +#. type: =head2 +#: ../fish/guestfish-actions.pod:451 +msgid "blockdev-flushbufs" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:373 ../fish/guestfish-actions.pod:237 +#. type: verbatim +#: ../fish/guestfish-actions.pod:453 +#, no-wrap msgid "" -"The flags are the same as the flags defined in Eaugeas.hE, the " -"logical I of the following integers:" +" blockdev-flushbufs device\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243 -msgid "C = 1" +#. type: textblock +#: ../fish/guestfish-actions.pod:455 ../src/guestfs-actions.pod:676 +msgid "This tells the kernel to flush internal buffers associated with C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245 -msgid "Keep the original file with a C<.augsave> extension." +#. type: textblock +#: ../fish/guestfish-actions.pod:458 ../fish/guestfish-actions.pod:469 ../fish/guestfish-actions.pod:478 ../fish/guestfish-actions.pod:488 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:513 ../fish/guestfish-actions.pod:521 ../fish/guestfish-actions.pod:532 ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:548 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:727 ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:778 ../src/guestfs-actions.pod:796 ../src/guestfs-actions.pod:810 ../src/guestfs-actions.pod:824 +msgid "This uses the L command." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247 -msgid "C = 2" +#. type: =head2 +#: ../fish/guestfish-actions.pod:460 +msgid "blockdev-getbsz" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:249 +#. type: verbatim +#: ../fish/guestfish-actions.pod:462 +#, no-wrap msgid "" -"Save changes into a file with extension C<.augnew>, and do not overwrite " -"original. Overrides C." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252 -msgid "C = 4" +" blockdev-getbsz device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254 -msgid "Typecheck lenses (can be expensive)." +#. type: textblock +#: ../fish/guestfish-actions.pod:464 ../src/guestfs-actions.pod:691 +msgid "This returns the block size of a device." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256 -msgid "C = 8" +#. type: textblock +#: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:529 ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:793 +msgid "" +"(Note this is different from both I and I)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258 -msgid "Do not use standard load path for modules." +#. type: =head2 +#: ../fish/guestfish-actions.pod:471 +msgid "blockdev-getro" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260 -msgid "C = 16" +#. type: verbatim +#: ../fish/guestfish-actions.pod:473 +#, no-wrap +msgid "" +" blockdev-getro device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262 -msgid "Make save a no-op, just record what would have been changed." +#. type: textblock +#: ../fish/guestfish-actions.pod:475 ../src/guestfs-actions.pod:708 +msgid "" +"Returns a boolean indicating if the block device is read-only (true if " +"read-only, false if not)." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:264 -msgid "C = 32" +#. type: =head2 +#: ../fish/guestfish-actions.pod:480 +msgid "blockdev-getsize64" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:402 -msgid "Do not load the tree in C." +#. type: verbatim +#: ../fish/guestfish-actions.pod:482 +#, no-wrap +msgid "" +" blockdev-getsize64 device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:406 -msgid "To close the handle, you can call C." +#. type: textblock +#: ../fish/guestfish-actions.pod:484 ../src/guestfs-actions.pod:723 +msgid "This returns the size of the device in bytes." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:272 -msgid "To find out more about Augeas, see L." +#. type: textblock +#: ../fish/guestfish-actions.pod:486 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:414 -msgid "guestfs_aug_insert" +#. type: =head2 +#: ../fish/guestfish-actions.pod:490 +msgid "blockdev-getss" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:416 +#. type: verbatim +#: ../fish/guestfish-actions.pod:492 #, no-wrap msgid "" -" int\n" -" guestfs_aug_insert (guestfs_h *g,\n" -" const char *augpath,\n" -" const char *label,\n" -" int before);\n" +" blockdev-getss device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:422 ../fish/guestfish-actions.pod:278 +#. type: textblock +#: ../fish/guestfish-actions.pod:494 ../src/guestfs-actions.pod:739 msgid "" -"Create a new sibling C functions which have " +"a more complex interface." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:575 ../fish/guestfish-actions.pod:379 +#. type: textblock +#: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:757 ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:945 ../fish/guestfish-actions.pod:955 ../fish/guestfish-actions.pod:1022 ../fish/guestfish-actions.pod:1032 ../fish/guestfish-actions.pod:1224 ../fish/guestfish-actions.pod:1531 ../fish/guestfish-actions.pod:1541 ../fish/guestfish-actions.pod:1569 ../fish/guestfish-actions.pod:1584 ../fish/guestfish-actions.pod:1594 ../fish/guestfish-actions.pod:1613 ../fish/guestfish-actions.pod:3712 ../fish/guestfish-actions.pod:3727 ../fish/guestfish-actions.pod:3803 ../fish/guestfish-actions.pod:3820 ../fish/guestfish-actions.pod:3835 ../fish/guestfish-actions.pod:4504 ../fish/guestfish-actions.pod:4550 ../fish/guestfish-actions.pod:4635 ../fish/guestfish-actions.pod:4650 ../fish/guestfish-actions.pod:5056 ../fish/guestfish-actions.pod:5068 ../fish/guestfish-actions.pod:5086 ../fish/guestfish-actions.pod:5103 ../fish/guestfish-actions.pod:5113 ../fish/guestfish-actions.pod:5170 ../fish/guestfish-actions.pod:5180 ../fish/guestfish-actions.pod:5209 ../fish/guestfish-actions.pod:5219 ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1443 ../src/guestfs-actions.pod:1462 ../src/guestfs-actions.pod:1565 ../src/guestfs-actions.pod:1584 ../src/guestfs-actions.pod:1830 ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2363 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2404 ../src/guestfs-actions.pod:2433 ../src/guestfs-actions.pod:5619 ../src/guestfs-actions.pod:5645 ../src/guestfs-actions.pod:5776 ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:5826 ../src/guestfs-actions.pod:6777 ../src/guestfs-actions.pod:6832 ../src/guestfs-actions.pod:6978 ../src/guestfs-actions.pod:7002 ../src/guestfs-actions.pod:7667 ../src/guestfs-actions.pod:7687 ../src/guestfs-actions.pod:7720 ../src/guestfs-actions.pod:7739 ../src/guestfs-actions.pod:7758 ../src/guestfs-actions.pod:7852 ../src/guestfs-actions.pod:7871 ../src/guestfs-actions.pod:7917 ../src/guestfs-actions.pod:7936 msgid "" -"The reason is because we don't know what groups are supported by the " -"appliance/daemon until it is running and can be queried." +"Because of the message protocol, there is a transfer limit of somewhere " +"between 2MB and 4MB. See L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:581 ../fish/guestfish-actions.pod:385 -msgid "" -"If a group of functions is available, this does not necessarily mean that " -"they will work. You still have to check for errors when calling individual " -"API functions even if they are available." +#. type: =head2 +#: ../fish/guestfish-actions.pod:625 +msgid "checksum" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:392 +#. type: verbatim +#: ../fish/guestfish-actions.pod:627 +#, no-wrap msgid "" -"It is usually the job of distro packagers to build complete functionality " -"into the libguestfs appliance. Upstream libguestfs, if built from source " -"with all requirements satisfied, will support everything." +" checksum csumtype path\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:595 -msgid "" -"This call was added in version C<1.0.80>. In previous versions of " -"libguestfs all you could do would be to speculatively execute a command to " -"find out if the daemon implemented it. See also C." +#. type: textblock +#: ../fish/guestfish-actions.pod:629 ../src/guestfs-actions.pod:960 +msgid "This call computes the MD5, SHAx or CRC checksum of the file named C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:604 ../src/guestfs-actions.pod:1165 -msgid "(Added in 1.0.80)" +#. type: textblock +#: ../fish/guestfish-actions.pod:632 ../src/guestfs-actions.pod:963 +msgid "" +"The type of checksum to compute is given by the C parameter which " +"must have one of the following values:" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:606 -msgid "guestfs_available_all_groups" +#. type: =item +#: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:968 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:608 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:639 ../src/guestfs-actions.pod:970 msgid "" -" char **\n" -" guestfs_available_all_groups (guestfs_h *g);\n" -"\n" +"Compute the cyclic redundancy check (CRC) specified by POSIX for the " +"C command." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:611 -msgid "" -"This command returns a list of all optional groups that this daemon knows " -"about. Note this returns both supported and unsupported groups. To find " -"out which ones the daemon can actually support you have to call " -"C on each member of the returned list." +#. type: =item +#: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:973 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:617 -msgid "See also C and L." +#. type: textblock +#: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:975 +msgid "Compute the MD5 hash (using the C program)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:623 -msgid "(Added in 1.3.15)" +#. type: =item +#: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:977 +msgid "C" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:625 -msgid "guestfs_base64_in" +#. type: textblock +#: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:979 +msgid "Compute the SHA1 hash (using the C program)." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:627 -#, no-wrap -msgid "" -" int\n" -" guestfs_base64_in (guestfs_h *g,\n" -" const char *base64file,\n" -" const char *filename);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:650 ../src/guestfs-actions.pod:981 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:632 ../fish/guestfish-actions.pod:422 -msgid "This command uploads base64-encoded data from C to C." +#. type: textblock +#: ../fish/guestfish-actions.pod:652 ../src/guestfs-actions.pod:983 +msgid "Compute the SHA224 hash (using the C program)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:637 ../src/guestfs-actions.pod:651 -msgid "(Added in 1.3.5)" +#. type: =item +#: ../fish/guestfish-actions.pod:654 ../src/guestfs-actions.pod:985 +msgid "C" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:639 -msgid "guestfs_base64_out" +#. type: textblock +#: ../fish/guestfish-actions.pod:656 ../src/guestfs-actions.pod:987 +msgid "Compute the SHA256 hash (using the C program)." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:641 -#, no-wrap -msgid "" -" int\n" -" guestfs_base64_out (guestfs_h *g,\n" -" const char *filename,\n" -" const char *base64file);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:658 ../src/guestfs-actions.pod:989 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:646 ../fish/guestfish-actions.pod:431 -msgid "" -"This command downloads the contents of C, writing it out to local " -"file C encoded as base64." +#. type: textblock +#: ../fish/guestfish-actions.pod:660 ../src/guestfs-actions.pod:991 +msgid "Compute the SHA384 hash (using the C program)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:653 -msgid "guestfs_blockdev_flushbufs" +#. type: =item +#: ../fish/guestfish-actions.pod:662 ../src/guestfs-actions.pod:993 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:655 -#, no-wrap -msgid "" -" int\n" -" guestfs_blockdev_flushbufs (guestfs_h *g,\n" -" const char *device);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:664 ../src/guestfs-actions.pod:995 +msgid "Compute the SHA512 hash (using the C program)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:659 ../fish/guestfish-actions.pod:440 -msgid "This tells the kernel to flush internal buffers associated with C." +#. type: textblock +#: ../fish/guestfish-actions.pod:668 ../src/guestfs-actions.pod:999 +msgid "The checksum is returned as a printable string." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779 ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807 ../fish/guestfish-actions.pod:443 ../fish/guestfish-actions.pod:454 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:485 ../fish/guestfish-actions.pod:498 ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:525 ../fish/guestfish-actions.pod:533 -msgid "This uses the L command." +#. type: textblock +#: ../fish/guestfish-actions.pod:670 +msgid "To get the checksum for a device, use L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:698 ../src/guestfs-actions.pod:714 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:765 ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:797 ../src/guestfs-actions.pod:811 -msgid "(Added in 0.9.3)" +#. type: textblock +#: ../fish/guestfish-actions.pod:672 +msgid "To get the checksums for many files, use L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:668 -msgid "guestfs_blockdev_getbsz" +#. type: =head2 +#: ../fish/guestfish-actions.pod:674 +msgid "checksum-device" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:670 +#. type: verbatim +#: ../fish/guestfish-actions.pod:676 #, no-wrap msgid "" -" int\n" -" guestfs_blockdev_getbsz (guestfs_h *g,\n" -" const char *device);\n" +" checksum-device csumtype device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:674 ../fish/guestfish-actions.pod:449 -msgid "This returns the block size of a device." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:676 ../src/guestfs-actions.pod:776 ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514 +#. type: textblock +#: ../fish/guestfish-actions.pod:678 msgid "" -"(Note this is different from both I and I)." +"This call computes the MD5, SHAx or CRC checksum of the contents of the " +"device named C. For the types of checksums supported see the " +"L command." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:685 -msgid "guestfs_blockdev_getro" +#. type: =head2 +#: ../fish/guestfish-actions.pod:682 +msgid "checksums-out" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:687 +#. type: verbatim +#: ../fish/guestfish-actions.pod:684 #, no-wrap msgid "" -" int\n" -" guestfs_blockdev_getro (guestfs_h *g,\n" -" const char *device);\n" +" checksums-out csumtype directory (sumsfile|-)\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:691 ../fish/guestfish-actions.pod:460 +#. type: textblock +#: ../fish/guestfish-actions.pod:686 ../src/guestfs-actions.pod:1034 msgid "" -"Returns a boolean indicating if the block device is read-only (true if " -"read-only, false if not)." +"This command computes the checksums of all regular files in C and " +"then emits a list of those checksums to the local output file C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3064 ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3109 ../src/guestfs-actions.pod:3124 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3181 ../src/guestfs-actions.pod:3196 ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:4719 -msgid "This function returns a C truth value on success or -1 on error." +#. type: textblock +#: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1038 +msgid "" +"This can be used for verifying the integrity of a virtual machine. However " +"to be properly secure you should pay attention to the output of the checksum " +"command (it uses the ones from GNU coreutils). In particular when the " +"filename is not printable, coreutils uses a special backslash syntax. For " +"more information, see the GNU coreutils info file." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:700 -msgid "guestfs_blockdev_getsize64" +#. type: =head2 +#: ../fish/guestfish-actions.pod:700 +msgid "chmod" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:702 +#. type: verbatim +#: ../fish/guestfish-actions.pod:702 #, no-wrap msgid "" -" int64_t\n" -" guestfs_blockdev_getsize64 (guestfs_h *g,\n" -" const char *device);\n" +" chmod mode path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:469 -msgid "This returns the size of the device in bytes." +#. type: textblock +#: ../fish/guestfish-actions.pod:704 ../src/guestfs-actions.pod:1057 +msgid "" +"Change the mode (permissions) of C to C. Only numeric modes are " +"supported." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:708 -msgid "See also C." +#. type: textblock +#: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1060 +msgid "" +"I: When using this command from guestfish, C by default would be " +"decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not " +"C<700>." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:716 -msgid "guestfs_blockdev_getss" +#. type: textblock +#: ../fish/guestfish-actions.pod:711 ../fish/guestfish-actions.pod:3065 ../fish/guestfish-actions.pod:3204 ../fish/guestfish-actions.pod:3214 ../fish/guestfish-actions.pod:3224 ../src/guestfs-actions.pod:1064 ../src/guestfs-actions.pod:4591 ../src/guestfs-actions.pod:4800 ../src/guestfs-actions.pod:4819 ../src/guestfs-actions.pod:4838 +msgid "The mode actually set is affected by the umask." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:718 +#. type: =head2 +#: ../fish/guestfish-actions.pod:713 +msgid "chown" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:715 #, no-wrap msgid "" -" int\n" -" guestfs_blockdev_getss (guestfs_h *g,\n" -" const char *device);\n" +" chown owner group path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:479 -msgid "" -"This returns the size of sectors on a block device. Usually 512, but can be " -"larger for modern devices." +#. type: textblock +#: ../fish/guestfish-actions.pod:717 ../src/guestfs-actions.pod:1078 +msgid "Change the file owner to C and group to C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:725 +#. type: textblock +#: ../fish/guestfish-actions.pod:719 ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:1080 ../src/guestfs-actions.pod:3662 msgid "" -"(Note, this is not the size in sectors, use C for " -"that)." +"Only numeric uid and gid are supported. If you want to use names, you will " +"need to locate and parse the password file yourself (Augeas support makes " +"this relatively easy)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:734 -msgid "guestfs_blockdev_getsz" +#. type: =head2 +#: ../fish/guestfish-actions.pod:723 +msgid "command" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:736 +#. type: verbatim +#: ../fish/guestfish-actions.pod:725 #, no-wrap msgid "" -" int64_t\n" -" guestfs_blockdev_getsz (guestfs_h *g,\n" -" const char *device);\n" +" command 'arguments ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:740 ../fish/guestfish-actions.pod:491 +#. type: textblock +#: ../fish/guestfish-actions.pod:727 ../src/guestfs-actions.pod:1094 msgid "" -"This returns the size of the device in units of 512-byte sectors (even if " -"the sectorsize isn't 512 bytes ... weird)." +"This call runs a command from the guest filesystem. The filesystem must be " +"mounted, and must contain a compatible operating system (ie. something " +"Linux, with the same or compatible processor architecture)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:743 +#. type: textblock +#: ../fish/guestfish-actions.pod:732 msgid "" -"See also C for the real sector size of the device, " -"and C for the more useful I." +"The single parameter is an argv-style list of arguments. The first element " +"is the name of the program to run. Subsequent elements are parameters. The " +"list must be non-empty (ie. must contain a program name). Note that the " +"command runs directly, and is I invoked via the shell (see L)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:753 -msgid "guestfs_blockdev_rereadpt" +#. type: textblock +#: ../fish/guestfish-actions.pod:739 ../src/guestfs-actions.pod:1106 +msgid "The return value is anything printed to I by the command." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:755 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1109 msgid "" -" int\n" -" guestfs_blockdev_rereadpt (guestfs_h *g,\n" -" const char *device);\n" -"\n" +"If the command returns a non-zero exit status, then this function returns an " +"error message. The error message string is the content of I from " +"the command." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:504 -msgid "Reread the partition table on C." +#. type: textblock +#: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1113 +msgid "" +"The C<$PATH> environment variable will contain at least C and " +"C. If you require a program from another location, you should provide " +"the full path in the first parameter." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:767 -msgid "guestfs_blockdev_setbsz" +#. type: textblock +#: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1118 +msgid "" +"Shared libraries and data files required by the program must be available on " +"filesystems which are mounted in the correct places. It is the caller's " +"responsibility to ensure all filesystems that are needed are mounted at the " +"right locations." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:760 +msgid "command-lines" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:769 +#. type: verbatim +#: ../fish/guestfish-actions.pod:762 #, no-wrap msgid "" -" int\n" -" guestfs_blockdev_setbsz (guestfs_h *g,\n" -" const char *device,\n" -" int blocksize);\n" +" command-lines 'arguments ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:512 -msgid "This sets the block size of a device." +#. type: textblock +#: ../fish/guestfish-actions.pod:764 +msgid "This is the same as L, but splits the result into a list of lines." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:785 -msgid "guestfs_blockdev_setro" +#. type: textblock +#: ../fish/guestfish-actions.pod:767 +msgid "See also: L" +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:772 +msgid "config" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:787 +#. type: verbatim +#: ../fish/guestfish-actions.pod:774 #, no-wrap msgid "" -" int\n" -" guestfs_blockdev_setro (guestfs_h *g,\n" -" const char *device);\n" +" config qemuparam qemuvalue\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:523 -msgid "Sets the block device named C to read-only." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:799 -msgid "guestfs_blockdev_setrw" +#. type: textblock +#: ../fish/guestfish-actions.pod:776 ../src/guestfs-actions.pod:1159 +msgid "" +"This can be used to add arbitrary qemu command line parameters of the form " +"I<-param value>. Actually it's not quite arbitrary - we prevent you from " +"setting some parameters which would interfere with parameters that we use." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:801 -#, no-wrap -msgid "" -" int\n" -" guestfs_blockdev_setrw (guestfs_h *g,\n" -" const char *device);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:781 ../src/guestfs-actions.pod:1164 +msgid "The first character of C string must be a C<-> (dash)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:531 -msgid "Sets the block device named C to read-write." +#. type: textblock +#: ../fish/guestfish-actions.pod:783 ../src/guestfs-actions.pod:1166 +msgid "C can be NULL." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:813 -msgid "guestfs_case_sensitive_path" +#. type: =head2 +#: ../fish/guestfish-actions.pod:785 +msgid "copy-size" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:815 +#. type: verbatim +#: ../fish/guestfish-actions.pod:787 #, no-wrap msgid "" -" char *\n" -" guestfs_case_sensitive_path (guestfs_h *g,\n" -" const char *path);\n" +" copy-size src dest size\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:819 ../fish/guestfish-actions.pod:539 +#. type: textblock +#: ../fish/guestfish-actions.pod:789 ../src/guestfs-actions.pod:1180 msgid "" -"This can be used to resolve case insensitive paths on a filesystem which is " -"case sensitive. The use case is to resolve paths which you have read from " -"Windows configuration files or the Windows Registry, to the true path." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:824 ../fish/guestfish-actions.pod:544 -msgid "" -"The command handles a peculiarity of the Linux ntfs-3g filesystem driver " -"(and probably others), which is that although the underlying filesystem is " -"case-insensitive, the driver exports the filesystem to Linux as " -"case-sensitive." +"This command copies exactly C bytes from one source device or file " +"C to another destination device or file C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:829 ../fish/guestfish-actions.pod:549 +#. type: textblock +#: ../fish/guestfish-actions.pod:792 ../src/guestfs-actions.pod:1183 msgid "" -"One consequence of this is that special directories such as C " -"may appear as C or C (or other things) depending on the " -"precise details of how they were created. In Windows itself this would not " -"be a problem." +"Note this will fail if the source is too short or if the destination is not " +"large enough." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:835 ../fish/guestfish-actions.pod:555 -msgid "" -"Bug or feature? You decide: " -"L" +#. type: =head2 +#: ../fish/guestfish-actions.pod:795 +msgid "cp" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:838 ../fish/guestfish-actions.pod:558 +#. type: verbatim +#: ../fish/guestfish-actions.pod:797 +#, no-wrap msgid "" -"This function resolves the true case of each element in the path and returns " -"the case-sensitive path." +" cp src dest\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:841 +#. type: textblock +#: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1202 msgid "" -"Thus C (\"/Windows/System32\") might return " -"C<\"/WINDOWS/system32\"> (the exact return value would depend on details of " -"how the directories were originally created under Windows)." +"This copies a file from C to C where C is either a " +"destination filename or destination directory." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:566 -msgid "I: This function does not handle drive names, backslashes etc." +#. type: =head2 +#: ../fish/guestfish-actions.pod:802 +msgid "cp-a" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:849 -msgid "See also C." +#. type: verbatim +#: ../fish/guestfish-actions.pod:804 +#, no-wrap +msgid "" +" cp-a src dest\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:6661 -msgid "(Added in 1.0.75)" +#. type: textblock +#: ../fish/guestfish-actions.pod:806 ../src/guestfs-actions.pod:1216 +msgid "" +"This copies a file or directory from C to C recursively using the " +"C command." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:856 -msgid "guestfs_cat" +#. type: =head2 +#: ../fish/guestfish-actions.pod:809 +msgid "dd" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:858 +#. type: verbatim +#: ../fish/guestfish-actions.pod:811 #, no-wrap msgid "" -" char *\n" -" guestfs_cat (guestfs_h *g,\n" -" const char *path);\n" +" dd src dest\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:862 ../src/guestfs-actions.pod:5206 ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3464 -msgid "Return the contents of the file named C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:864 +#. type: textblock +#: ../fish/guestfish-actions.pod:813 ../src/guestfs-actions.pod:1230 msgid "" -"Note that this function cannot correctly handle binary files (specifically, " -"files containing C<\\0> character which is treated as end of string). For " -"those you need to use the C or C " -"functions which have a more complex interface." +"This command copies from one source device or file C to another " +"destination device or file C. Normally you would use this to copy to " +"or from a device or partition, for example to duplicate a filesystem." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1051 ../src/guestfs-actions.pod:1071 ../src/guestfs-actions.pod:1362 ../src/guestfs-actions.pod:1381 ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5014 ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5171 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:6046 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6247 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:6959 ../src/guestfs-actions.pod:6985 ../src/guestfs-actions.pod:7004 ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7108 ../src/guestfs-actions.pod:7154 ../src/guestfs-actions.pod:7173 ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:717 ../fish/guestfish-actions.pod:729 ../fish/guestfish-actions.pod:905 ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:982 ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1482 ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:1520 ../fish/guestfish-actions.pod:1535 ../fish/guestfish-actions.pod:1545 ../fish/guestfish-actions.pod:1564 ../fish/guestfish-actions.pod:3334 ../fish/guestfish-actions.pod:3349 ../fish/guestfish-actions.pod:3425 ../fish/guestfish-actions.pod:3442 ../fish/guestfish-actions.pod:3457 ../fish/guestfish-actions.pod:4040 ../fish/guestfish-actions.pod:4086 ../fish/guestfish-actions.pod:4171 ../fish/guestfish-actions.pod:4186 ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4614 ../fish/guestfish-actions.pod:4631 ../fish/guestfish-actions.pod:4641 ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4699 ../fish/guestfish-actions.pod:4728 ../fish/guestfish-actions.pod:4738 +#. type: textblock +#: ../fish/guestfish-actions.pod:818 msgid "" -"Because of the message protocol, there is a transfer limit of somewhere " -"between 2MB and 4MB. See L." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3892 ../src/guestfs-actions.pod:3906 ../src/guestfs-actions.pod:5094 ../src/guestfs-actions.pod:5108 ../src/guestfs-actions.pod:6820 ../src/guestfs-actions.pod:6834 -msgid "(Added in 0.4)" +"If the destination is a device, it must be as large or larger than the " +"source file or device, otherwise the copy will fail. This command cannot do " +"partial copies (see L)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:877 -msgid "guestfs_checksum" +#. type: =head2 +#: ../fish/guestfish-actions.pod:822 +msgid "df" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:879 +#. type: verbatim +#: ../fish/guestfish-actions.pod:824 #, no-wrap msgid "" -" char *\n" -" guestfs_checksum (guestfs_h *g,\n" -" const char *csumtype,\n" -" const char *path);\n" +" df\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:884 ../fish/guestfish-actions.pod:589 -msgid "This call computes the MD5, SHAx or CRC checksum of the file named C." +#. type: textblock +#: ../fish/guestfish-actions.pod:826 ../src/guestfs-actions.pod:1248 +msgid "This command runs the C command to report disk space used." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:887 ../fish/guestfish-actions.pod:592 +#. type: textblock +#: ../fish/guestfish-actions.pod:828 ../fish/guestfish-actions.pod:839 msgid "" -"The type of checksum to compute is given by the C parameter which " -"must have one of the following values:" +"This command is mostly useful for interactive sessions. It is I " +"intended that you try to parse the output string. Use L from " +"programs." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597 -msgid "C" +#. type: =head2 +#: ../fish/guestfish-actions.pod:832 +msgid "df-h" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:894 ../fish/guestfish-actions.pod:599 +#. type: verbatim +#: ../fish/guestfish-actions.pod:834 +#, no-wrap msgid "" -"Compute the cyclic redundancy check (CRC) specified by POSIX for the " -"C command." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602 -msgid "C" +" df-h\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604 -msgid "Compute the MD5 hash (using the C program)." +#. type: textblock +#: ../fish/guestfish-actions.pod:836 ../src/guestfs-actions.pod:1264 +msgid "" +"This command runs the C command to report disk space used in " +"human-readable format." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606 -msgid "C" +#. type: =head2 +#: ../fish/guestfish-actions.pod:843 +msgid "dmesg" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608 -msgid "Compute the SHA1 hash (using the C program)." +#. type: verbatim +#: ../fish/guestfish-actions.pod:845 +#, no-wrap +msgid "" +" dmesg\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610 -msgid "C" +#. type: textblock +#: ../fish/guestfish-actions.pod:847 ../src/guestfs-actions.pod:1281 +msgid "" +"This returns the kernel messages (C output) from the guest kernel. " +"This is sometimes useful for extended debugging of problems." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612 -msgid "Compute the SHA224 hash (using the C program)." +#. type: textblock +#: ../fish/guestfish-actions.pod:851 +msgid "" +"Another way to get the same information is to enable verbose messages with " +"L or by setting the environment variable C " +"before running the program." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614 -msgid "C" +#. type: =head2 +#: ../fish/guestfish-actions.pod:856 +msgid "download" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616 -msgid "Compute the SHA256 hash (using the C program)." +#. type: verbatim +#: ../fish/guestfish-actions.pod:858 +#, no-wrap +msgid "" +" download remotefilename (filename|-)\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618 -msgid "C" +#. type: textblock +#: ../fish/guestfish-actions.pod:860 ../fish/guestfish-actions.pod:873 ../src/guestfs-actions.pod:1302 ../src/guestfs-actions.pod:1327 +msgid "" +"Download file C and save it as C on the local " +"machine." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620 -msgid "Compute the SHA384 hash (using the C program)." +#. type: textblock +#: ../fish/guestfish-actions.pod:863 ../fish/guestfish-actions.pod:4808 ../src/guestfs-actions.pod:1305 ../src/guestfs-actions.pod:7237 +msgid "C can also be a named pipe." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622 -msgid "C" +#. type: textblock +#: ../fish/guestfish-actions.pod:865 +msgid "See also L, L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:624 -msgid "Compute the SHA512 hash (using the C program)." +#. type: =head2 +#: ../fish/guestfish-actions.pod:869 +msgid "download-offset" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:628 -msgid "The checksum is returned as a printable string." +#. type: verbatim +#: ../fish/guestfish-actions.pod:871 +#, no-wrap +msgid "" +" download-offset remotefilename (filename|-) offset size\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:925 -msgid "To get the checksum for a device, use C." +#. type: textblock +#: ../fish/guestfish-actions.pod:876 ../src/guestfs-actions.pod:1330 +msgid "" +"C is read for C bytes starting at C (this " +"region must be within the file or device)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:927 -msgid "To get the checksums for many files, use C." +#. type: textblock +#: ../fish/guestfish-actions.pod:879 +msgid "" +"Note that there is no limit on the amount of data that can be downloaded " +"with this call, unlike with L, and this call always reads the full " +"amount unless an error occurs." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:2062 ../src/guestfs-actions.pod:3066 ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3156 ../src/guestfs-actions.pod:3183 ../src/guestfs-actions.pod:6517 -msgid "(Added in 1.0.2)" +#. type: textblock +#: ../fish/guestfish-actions.pod:884 +msgid "See also L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:934 -msgid "guestfs_checksum_device" +#. type: =head2 +#: ../fish/guestfish-actions.pod:888 +msgid "drop-caches" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:936 +#. type: verbatim +#: ../fish/guestfish-actions.pod:890 #, no-wrap msgid "" -" char *\n" -" guestfs_checksum_device (guestfs_h *g,\n" -" const char *csumtype,\n" -" const char *device);\n" +" drop-caches whattodrop\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:941 +#. type: textblock +#: ../fish/guestfish-actions.pod:892 ../src/guestfs-actions.pod:1355 msgid "" -"This call computes the MD5, SHAx or CRC checksum of the contents of the " -"device named C. For the types of checksums supported see the " -"C command." +"This instructs the guest kernel to drop its page cache, and/or dentries and " +"inode caches. The parameter C tells the kernel what precisely " +"to drop, see L" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4684 ../src/guestfs-actions.pod:4721 ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4915 ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:6440 ../src/guestfs-actions.pod:6846 -msgid "(Added in 1.3.2)" +#. type: textblock +#: ../fish/guestfish-actions.pod:897 ../src/guestfs-actions.pod:1360 +msgid "Setting C to 3 should drop everything." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:950 -msgid "guestfs_checksums_out" +#. type: textblock +#: ../fish/guestfish-actions.pod:899 ../src/guestfs-actions.pod:1362 +msgid "" +"This automatically calls L before the operation, so that the " +"maximum guest memory is freed." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:952 +#. type: =head2 +#: ../fish/guestfish-actions.pod:902 +msgid "du" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:904 #, no-wrap msgid "" -" int\n" -" guestfs_checksums_out (guestfs_h *g,\n" -" const char *csumtype,\n" -" const char *directory,\n" -" const char *sumsfile);\n" +" du path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:958 ../fish/guestfish-actions.pod:646 +#. type: textblock +#: ../fish/guestfish-actions.pod:906 ../src/guestfs-actions.pod:1375 msgid "" -"This command computes the checksums of all regular files in C and " -"then emits a list of those checksums to the local output file C." +"This command runs the C command to estimate file space usage for " +"C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:962 ../fish/guestfish-actions.pod:650 +#. type: textblock +#: ../fish/guestfish-actions.pod:909 ../src/guestfs-actions.pod:1378 msgid "" -"This can be used for verifying the integrity of a virtual machine. However " -"to be properly secure you should pay attention to the output of the checksum " -"command (it uses the ones from GNU coreutils). In particular when the " -"filename is not printable, coreutils uses a special backslash syntax. For " -"more information, see the GNU coreutils info file." +"C can be a file or a directory. If C is a directory then the " +"estimate includes the contents of the directory and all subdirectories " +"(recursively)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:972 -msgid "(Added in 1.3.7)" +#. type: textblock +#: ../fish/guestfish-actions.pod:913 ../src/guestfs-actions.pod:1382 +msgid "The result is the estimated size in I (ie. units of 1024 bytes)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:974 -msgid "guestfs_chmod" +#. type: =head2 +#: ../fish/guestfish-actions.pod:916 +msgid "e2fsck-f" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:976 +#. type: verbatim +#: ../fish/guestfish-actions.pod:918 #, no-wrap msgid "" -" int\n" -" guestfs_chmod (guestfs_h *g,\n" -" int mode,\n" -" const char *path);\n" +" e2fsck-f device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:981 ../fish/guestfish-actions.pod:664 +#. type: textblock +#: ../fish/guestfish-actions.pod:920 ../src/guestfs-actions.pod:1400 msgid "" -"Change the mode (permissions) of C to C. Only numeric modes are " -"supported." +"This runs C, ie. runs the ext2/ext3 filesystem checker " +"on C, noninteractively (I<-p>), even if the filesystem appears to be " +"clean (I<-f>)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:667 +#. type: textblock +#: ../fish/guestfish-actions.pod:924 msgid "" -"I: When using this command from guestfish, C by default would be " -"decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not " -"C<700>." +"This command is only needed because of L (q.v.). Normally you " +"should use L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:4143 ../src/guestfs-actions.pod:4324 ../src/guestfs-actions.pod:4343 ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:671 ../fish/guestfish-actions.pod:2793 ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:2929 -msgid "The mode actually set is affected by the umask." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:994 -msgid "guestfs_chown" +#. type: =head2 +#: ../fish/guestfish-actions.pod:927 +msgid "echo-daemon" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:996 +#. type: verbatim +#: ../fish/guestfish-actions.pod:929 #, no-wrap msgid "" -" int\n" -" guestfs_chown (guestfs_h *g,\n" -" int owner,\n" -" int group,\n" -" const char *path);\n" +" echo-daemon 'words ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1002 ../fish/guestfish-actions.pod:677 -msgid "Change the file owner to C and group to C." +#. type: textblock +#: ../fish/guestfish-actions.pod:931 ../src/guestfs-actions.pod:1417 +msgid "" +"This command concatenates the list of C passed with single spaces " +"between them and returns the resulting string." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:3253 ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2251 -msgid "" -"Only numeric uid and gid are supported. If you want to use names, you will " -"need to locate and parse the password file yourself (Augeas support makes " -"this relatively easy)." +#. type: textblock +#: ../fish/guestfish-actions.pod:934 ../src/guestfs-actions.pod:1420 +msgid "You can use this command to test the connection through to the daemon." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1012 -msgid "guestfs_command" +#. type: textblock +#: ../fish/guestfish-actions.pod:936 +msgid "See also L." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:938 +msgid "egrep" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1014 +#. type: verbatim +#: ../fish/guestfish-actions.pod:940 #, no-wrap msgid "" -" char *\n" -" guestfs_command (guestfs_h *g,\n" -" char *const *arguments);\n" +" egrep regex path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1018 ../fish/guestfish-actions.pod:687 -msgid "" -"This call runs a command from the guest filesystem. The filesystem must be " -"mounted, and must contain a compatible operating system (ie. something " -"Linux, with the same or compatible processor architecture)." +#. type: textblock +#: ../fish/guestfish-actions.pod:942 ../src/guestfs-actions.pod:1436 +msgid "This calls the external C program and returns the matching lines." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:948 +msgid "egrepi" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1023 +#. type: verbatim +#: ../fish/guestfish-actions.pod:950 +#, no-wrap msgid "" -"The single parameter is an argv-style list of arguments. The first element " -"is the name of the program to run. Subsequent elements are parameters. The " -"list must be non-empty (ie. must contain a program name). Note that the " -"command runs directly, and is I invoked via the shell (see " -"C)." +" egrepi regex path\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:699 -msgid "The return value is anything printed to I by the command." +#. type: textblock +#: ../fish/guestfish-actions.pod:952 ../src/guestfs-actions.pod:1455 +msgid "This calls the external C program and returns the matching lines." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:702 -msgid "" -"If the command returns a non-zero exit status, then this function returns an " -"error message. The error message string is the content of I from " -"the command." +#. type: =head2 +#: ../fish/guestfish-actions.pod:958 +msgid "equal" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:706 +#. type: verbatim +#: ../fish/guestfish-actions.pod:960 +#, no-wrap msgid "" -"The C<$PATH> environment variable will contain at least C and " -"C. If you require a program from another location, you should provide " -"the full path in the first parameter." +" equal file1 file2\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:711 +#. type: textblock +#: ../fish/guestfish-actions.pod:962 ../src/guestfs-actions.pod:1474 msgid "" -"Shared libraries and data files required by the program must be available on " -"filesystems which are mounted in the correct places. It is the caller's " -"responsibility to ensure all filesystems that are needed are mounted at the " -"right locations." +"This compares the two files C and C and returns true if their " +"content is exactly equal, or false otherwise." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1054 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1537 -msgid "(Added in 0.9.1)" +#. type: textblock +#: ../fish/guestfish-actions.pod:965 ../src/guestfs-actions.pod:1477 +msgid "The external L program is used for the comparison." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1056 -msgid "guestfs_command_lines" +#. type: =head2 +#: ../fish/guestfish-actions.pod:967 +msgid "exists" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1058 +#. type: verbatim +#: ../fish/guestfish-actions.pod:969 #, no-wrap msgid "" -" char **\n" -" guestfs_command_lines (guestfs_h *g,\n" -" char *const *arguments);\n" +" exists path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1062 +#. type: textblock +#: ../fish/guestfish-actions.pod:971 ../src/guestfs-actions.pod:1489 msgid "" -"This is the same as C, but splits the result into a list of " -"lines." +"This returns C if and only if there is a file, directory (or anything) " +"with the given C name." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1065 -msgid "See also: C" +#. type: textblock +#: ../fish/guestfish-actions.pod:974 +msgid "See also L, L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1076 -msgid "guestfs_config" +#. type: =head2 +#: ../fish/guestfish-actions.pod:976 +msgid "fallocate" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1078 +#. type: verbatim +#: ../fish/guestfish-actions.pod:978 #, no-wrap msgid "" -" int\n" -" guestfs_config (guestfs_h *g,\n" -" const char *qemuparam,\n" -" const char *qemuvalue);\n" +" fallocate path len\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1083 ../fish/guestfish-actions.pod:736 +#. type: textblock +#: ../fish/guestfish-actions.pod:980 ../fish/guestfish-actions.pod:999 ../src/guestfs-actions.pod:1512 ../src/guestfs-actions.pod:1531 msgid "" -"This can be used to add arbitrary qemu command line parameters of the form " -"C<-param value>. Actually it's not quite arbitrary - we prevent you from " -"setting some parameters which would interfere with parameters that we use." +"This command preallocates a file (containing zero bytes) named C of " +"size C bytes. If the file exists already, it is overwritten." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741 -msgid "The first character of C string must be a C<-> (dash)." +#. type: textblock +#: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1516 +msgid "" +"Do not confuse this with the guestfish-specific C command which " +"allocates a file in the host and attaches it as a device." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1090 ../fish/guestfish-actions.pod:743 -msgid "C can be NULL." +#. type: textblock +#: ../fish/guestfish-actions.pod:988 +msgid "" +"I In new code, use the L call " +"instead." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1096 -msgid "guestfs_copy_size" +#. type: =head2 +#: ../fish/guestfish-actions.pod:995 +msgid "fallocate64" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1098 +#. type: verbatim +#: ../fish/guestfish-actions.pod:997 #, no-wrap msgid "" -" int\n" -" guestfs_copy_size (guestfs_h *g,\n" -" const char *src,\n" -" const char *dest,\n" -" int64_t size);\n" +" fallocate64 path len\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:749 +#. type: textblock +#: ../fish/guestfish-actions.pod:1003 msgid "" -"This command copies exactly C bytes from one source device or file " -"C to another destination device or file C." +"Note that this call allocates disk blocks for the file. To create a sparse " +"file use L instead." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1107 ../fish/guestfish-actions.pod:752 +#. type: textblock +#: ../fish/guestfish-actions.pod:1006 msgid "" -"Note this will fail if the source is too short or if the destination is not " -"large enough." +"The deprecated call L does the same, but owing to an oversight " +"it only allowed 30 bit lengths to be specified, effectively limiting the " +"maximum size of files created through that call to 1GB." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1112 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:7025 ../src/guestfs-actions.pod:7044 +#. type: textblock +#: ../fish/guestfish-actions.pod:1011 ../src/guestfs-actions.pod:1543 msgid "" -"This long-running command can generate progress notification messages so " -"that the caller can display a progress bar or indicator. To receive these " -"messages, the caller must register a progress callback. See " -"L." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:3919 ../src/guestfs-actions.pod:5121 ../src/guestfs-actions.pod:6753 ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6859 -msgid "(Added in 1.0.87)" +"Do not confuse this with the guestfish-specific C and C " +"commands which create a file in the host and attach it as a device." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1119 -msgid "guestfs_cp" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1015 +msgid "fgrep" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1121 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1017 #, no-wrap msgid "" -" int\n" -" guestfs_cp (guestfs_h *g,\n" -" const char *src,\n" -" const char *dest);\n" +" fgrep pattern path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1126 ../fish/guestfish-actions.pod:759 -msgid "" -"This copies a file from C to C where C is either a " -"destination filename or destination directory." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1131 ../src/guestfs-actions.pod:1145 ../src/guestfs-actions.pod:1217 ../src/guestfs-actions.pod:1291 ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:4588 ../src/guestfs-actions.pod:4965 -msgid "(Added in 1.0.18)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1019 ../src/guestfs-actions.pod:1558 +msgid "This calls the external C program and returns the matching lines." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1133 -msgid "guestfs_cp_a" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1025 +msgid "fgrepi" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1135 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1027 #, no-wrap msgid "" -" int\n" -" guestfs_cp_a (guestfs_h *g,\n" -" const char *src,\n" -" const char *dest);\n" +" fgrepi pattern path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1140 ../fish/guestfish-actions.pod:766 -msgid "" -"This copies a file or directory from C to C recursively using the " -"C command." +#. type: textblock +#: ../fish/guestfish-actions.pod:1029 ../src/guestfs-actions.pod:1577 +msgid "This calls the external C program and returns the matching lines." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1147 -msgid "guestfs_dd" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1035 +msgid "file" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1149 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1037 #, no-wrap msgid "" -" int\n" -" guestfs_dd (guestfs_h *g,\n" -" const char *src,\n" -" const char *dest);\n" +" file path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:773 +#. type: textblock +#: ../fish/guestfish-actions.pod:1039 ../src/guestfs-actions.pod:1595 msgid "" -"This command copies from one source device or file C to another " -"destination device or file C. Normally you would use this to copy to " -"or from a device or partition, for example to duplicate a filesystem." +"This call uses the standard L command to determine the type or " +"contents of the file." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1159 +#. type: textblock +#: ../fish/guestfish-actions.pod:1042 ../src/guestfs-actions.pod:1598 msgid "" -"If the destination is a device, it must be as large or larger than the " -"source file or device, otherwise the copy will fail. This command cannot do " -"partial copies (see C)." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:1167 -msgid "guestfs_df" +"This call will also transparently look inside various types of compressed " +"file." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1169 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1045 ../src/guestfs-actions.pod:1601 msgid "" -" char *\n" -" guestfs_df (guestfs_h *g);\n" -"\n" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1172 ../fish/guestfish-actions.pod:786 -msgid "This command runs the C command to report disk space used." +"The exact command which runs is C. Note in particular that " +"the filename is not prepended to the output (the I<-b> option)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1191 +#. type: textblock +#: ../fish/guestfish-actions.pod:1049 ../src/guestfs-actions.pod:1605 msgid "" -"This command is mostly useful for interactive sessions. It is I " -"intended that you try to parse the output string. Use C " -"from programs." +"The output depends on the output of the underlying L command and it " +"can change in future in ways beyond our control. In other words, the output " +"is not guaranteed by the ABI." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1198 ../src/guestfs-actions.pod:1311 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6892 ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6918 -msgid "(Added in 1.0.54)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1053 +msgid "" +"See also: L, L, L, L, L " +"(etc), L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1183 -msgid "guestfs_df_h" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1056 +msgid "file-architecture" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1185 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1058 #, no-wrap msgid "" -" char *\n" -" guestfs_df_h (guestfs_h *g);\n" +" file-architecture filename\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:796 +#. type: textblock +#: ../fish/guestfish-actions.pod:1060 ../src/guestfs-actions.pod:1623 msgid "" -"This command runs the C command to report disk space used in " -"human-readable format." +"This detects the architecture of the binary C, and returns it if " +"known." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1200 -msgid "guestfs_dmesg" +#. type: textblock +#: ../fish/guestfish-actions.pod:1063 ../src/guestfs-actions.pod:1626 +msgid "Currently defined architectures are:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1202 -#, no-wrap -msgid "" -" char *\n" -" guestfs_dmesg (guestfs_h *g);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1630 +msgid "\"i386\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:807 +#. type: textblock +#: ../fish/guestfish-actions.pod:1069 ../src/guestfs-actions.pod:1632 msgid "" -"This returns the kernel messages (C output) from the guest kernel. " -"This is sometimes useful for extended debugging of problems." +"This string is returned for all 32 bit i386, i486, i586, i686 binaries " +"irrespective of the precise processor requirements of the binary." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1209 -msgid "" -"Another way to get the same information is to enable verbose messages with " -"C or by setting the environment variable " -"C before running the program." +#. type: =item +#: ../fish/guestfish-actions.pod:1072 ../src/guestfs-actions.pod:1635 +msgid "\"x86_64\"" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1219 -msgid "guestfs_download" +#. type: textblock +#: ../fish/guestfish-actions.pod:1074 ../src/guestfs-actions.pod:1637 +msgid "64 bit x86-64." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1221 -#, no-wrap -msgid "" -" int\n" -" guestfs_download (guestfs_h *g,\n" -" const char *remotefilename,\n" -" const char *filename);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:1076 ../src/guestfs-actions.pod:1639 +msgid "\"sparc\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833 -msgid "" -"Download file C and save it as C on the local " -"machine." +#. type: textblock +#: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1641 +msgid "32 bit SPARC." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4344 -msgid "C can also be a named pipe." +#. type: =item +#: ../fish/guestfish-actions.pod:1080 ../src/guestfs-actions.pod:1643 +msgid "\"sparc64\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1231 -msgid "See also C, C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1082 ../src/guestfs-actions.pod:1645 +msgid "64 bit SPARC V9 and above." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1242 -msgid "guestfs_download_offset" +#. type: =item +#: ../fish/guestfish-actions.pod:1084 ../src/guestfs-actions.pod:1647 +msgid "\"ia64\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1244 -#, no-wrap -msgid "" -" int\n" -" guestfs_download_offset (guestfs_h *g,\n" -" const char *remotefilename,\n" -" const char *filename,\n" -" int64_t offset,\n" -" int64_t size);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1086 ../src/guestfs-actions.pod:1649 +msgid "Intel Itanium." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1254 ../fish/guestfish-actions.pod:836 -msgid "" -"C is read for C bytes starting at C (this " -"region must be within the file or device)." +#. type: =item +#: ../fish/guestfish-actions.pod:1088 ../src/guestfs-actions.pod:1651 +msgid "\"ppc\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1257 -msgid "" -"Note that there is no limit on the amount of data that can be downloaded " -"with this call, unlike with C, and this call always reads the " -"full amount unless an error occurs." +#. type: textblock +#: ../fish/guestfish-actions.pod:1090 ../src/guestfs-actions.pod:1653 +msgid "32 bit Power PC." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1262 -msgid "See also C, C." +#. type: =item +#: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1655 +msgid "\"ppc64\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:6551 -msgid "(Added in 1.5.17)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1094 ../src/guestfs-actions.pod:1657 +msgid "64 bit Power PC." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1273 -msgid "guestfs_drop_caches" +#. type: textblock +#: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1661 +msgid "Libguestfs may return other architecture strings in future." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1275 -#, no-wrap -msgid "" -" int\n" -" guestfs_drop_caches (guestfs_h *g,\n" -" int whattodrop);\n" -"\n" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:852 -msgid "" -"This instructs the guest kernel to drop its page cache, and/or dentries and " -"inode caches. The parameter C tells the kernel what precisely " -"to drop, see L" +#. type: textblock +#: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1663 +msgid "The function works on at least the following types of files:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857 -msgid "Setting C to 3 should drop everything." +#. type: textblock +#: ../fish/guestfish-actions.pod:1106 ../src/guestfs-actions.pod:1669 +msgid "many types of Un*x and Linux binary" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1286 ../fish/guestfish-actions.pod:859 -msgid "" -"This automatically calls L before the operation, so that the " -"maximum guest memory is freed." +#. type: textblock +#: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1673 +msgid "many types of Un*x and Linux shared library" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1293 -msgid "guestfs_du" +#. type: textblock +#: ../fish/guestfish-actions.pod:1114 ../src/guestfs-actions.pod:1677 +msgid "Windows Win32 and Win64 binaries" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1295 -#, no-wrap -msgid "" -" int64_t\n" -" guestfs_du (guestfs_h *g,\n" -" const char *path);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1118 ../src/guestfs-actions.pod:1681 +msgid "Windows Win32 and Win64 DLLs" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1299 ../fish/guestfish-actions.pod:866 -msgid "" -"This command runs the C command to estimate file space usage for " -"C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1683 +msgid "Win32 binaries and DLLs return C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1302 ../fish/guestfish-actions.pod:869 -msgid "" -"C can be a file or a directory. If C is a directory then the " -"estimate includes the contents of the directory and all subdirectories " -"(recursively)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1122 ../src/guestfs-actions.pod:1685 +msgid "Win64 binaries and DLLs return C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1306 ../fish/guestfish-actions.pod:873 -msgid "The result is the estimated size in I (ie. units of 1024 bytes)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1126 ../src/guestfs-actions.pod:1689 +msgid "Linux kernel modules" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1313 -msgid "guestfs_e2fsck_f" +#. type: textblock +#: ../fish/guestfish-actions.pod:1130 ../src/guestfs-actions.pod:1693 +msgid "Linux new-style initrd images" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1315 -#, no-wrap -msgid "" -" int\n" -" guestfs_e2fsck_f (guestfs_h *g,\n" -" const char *device);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1134 ../src/guestfs-actions.pod:1697 +msgid "some non-x86 Linux vmlinuz kernels" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:880 -msgid "" -"This runs C, ie. runs the ext2/ext3 filesystem checker " -"on C, noninteractively (C<-p>), even if the filesystem appears to be " -"clean (C<-f>)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1138 ../src/guestfs-actions.pod:1701 +msgid "What it can't do currently:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1323 -msgid "" -"This command is only needed because of C (q.v.). " -"Normally you should use C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1144 ../src/guestfs-actions.pod:1707 +msgid "static libraries (libfoo.a)" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1328 -msgid "(Added in 1.0.29)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1148 ../src/guestfs-actions.pod:1711 +msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1330 -msgid "guestfs_echo_daemon" +#. type: textblock +#: ../fish/guestfish-actions.pod:1152 ../src/guestfs-actions.pod:1715 +msgid "x86 Linux vmlinuz kernels" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1332 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1154 ../src/guestfs-actions.pod:1717 msgid "" -" char *\n" -" guestfs_echo_daemon (guestfs_h *g,\n" -" char *const *words);\n" -"\n" +"x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and " +"compressed code, and are horribly hard to unpack. If you want to find the " +"architecture of a kernel, use the architecture of the associated initrd or " +"kernel module(s) instead." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:891 -msgid "" -"This command concatenates the list of C passed with single spaces " -"between them and returns the resulting string." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1161 +msgid "filesize" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:894 -msgid "You can use this command to test the connection through to the daemon." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1163 +#, no-wrap +msgid "" +" filesize file\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1341 -msgid "See also C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1165 ../src/guestfs-actions.pod:1735 +msgid "This command returns the size of C in bytes." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:2073 ../src/guestfs-actions.pod:5754 -msgid "(Added in 1.0.69)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1167 +msgid "" +"To get other stats about a file, use L, L, L, " +"L etc. To get the size of block devices, use " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1348 -msgid "guestfs_egrep" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1171 +msgid "fill" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1350 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1173 #, no-wrap msgid "" -" char **\n" -" guestfs_egrep (guestfs_h *g,\n" -" const char *regex,\n" -" const char *path);\n" +" fill c len path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:902 -msgid "This calls the external C program and returns the matching lines." +#. type: textblock +#: ../fish/guestfish-actions.pod:1175 ../src/guestfs-actions.pod:1753 +msgid "" +"This command creates a new file called C. The initial content of the " +"file is C octets of C, where C must be a number in the range " +"C<[0..255]>." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1384 ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1487 ../src/guestfs-actions.pod:1506 ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3439 ../src/guestfs-actions.pod:3453 ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:5348 ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6143 ../src/guestfs-actions.pod:6156 ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6191 ../src/guestfs-actions.pod:6204 ../src/guestfs-actions.pod:6217 ../src/guestfs-actions.pod:6988 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7111 ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7176 -msgid "(Added in 1.0.66)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1179 +msgid "" +"To fill a file with zero bytes (sparsely), it is much more efficient to use " +"L. To create a file with a pattern of repeating bytes use " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1367 -msgid "guestfs_egrepi" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1184 +msgid "fill-pattern" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1369 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1186 #, no-wrap msgid "" -" char **\n" -" guestfs_egrepi (guestfs_h *g,\n" -" const char *regex,\n" -" const char *path);\n" +" fill-pattern pattern len path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1374 ../fish/guestfish-actions.pod:912 -msgid "This calls the external C program and returns the matching lines." +#. type: textblock +#: ../fish/guestfish-actions.pod:1188 +msgid "" +"This function is like L except that it creates a new file of length " +"C containing the repeating pattern of bytes in C. The pattern " +"is truncated if necessary to ensure the length of the file is exactly C " +"bytes." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1386 -msgid "guestfs_equal" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1193 +msgid "find" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1388 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1195 #, no-wrap msgid "" -" int\n" -" guestfs_equal (guestfs_h *g,\n" -" const char *file1,\n" -" const char *file2);\n" +" find directory\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1393 ../fish/guestfish-actions.pod:922 +#. type: textblock +#: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:1799 msgid "" -"This compares the two files C and C and returns true if their " -"content is exactly equal, or false otherwise." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:925 -msgid "The external L program is used for the comparison." +"This command lists out all files and directories, recursively, starting at " +"C. It is essentially equivalent to running the shell command " +"C but some post-processing happens on the output, " +"described below." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1402 -msgid "guestfs_exists" +#. type: textblock +#: ../fish/guestfish-actions.pod:1202 ../src/guestfs-actions.pod:1804 +msgid "" +"This returns a list of strings I. Thus if the directory " +"structure was:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1404 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1205 ../src/guestfs-actions.pod:1807 #, no-wrap msgid "" -" int\n" -" guestfs_exists (guestfs_h *g,\n" -" const char *path);\n" +" /tmp/a\n" +" /tmp/b\n" +" /tmp/c/d\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1408 ../fish/guestfish-actions.pod:931 -msgid "" -"This returns C if and only if there is a file, directory (or anything) " -"with the given C name." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1411 -msgid "See also C, C, C." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:1417 -msgid "guestfs_fallocate" +#. type: textblock +#: ../fish/guestfish-actions.pod:1209 +msgid "then the returned list from L C would be 4 elements:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1419 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1212 ../src/guestfs-actions.pod:1814 #, no-wrap msgid "" -" int\n" -" guestfs_fallocate (guestfs_h *g,\n" -" const char *path,\n" -" int len);\n" +" a\n" +" b\n" +" c\n" +" c/d\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1424 ../src/guestfs-actions.pod:1450 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959 -msgid "" -"This command preallocates a file (containing zero bytes) named C of " -"size C bytes. If the file exists already, it is overwritten." +#. type: textblock +#: ../fish/guestfish-actions.pod:1217 ../src/guestfs-actions.pod:1819 +msgid "If C is not a directory, then this command returns an error." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:944 -msgid "" -"Do not confuse this with the guestfish-specific C command which " -"allocates a file in the host and attaches it as a device." +#. type: textblock +#: ../fish/guestfish-actions.pod:1220 ../src/guestfs-actions.pod:1822 +msgid "The returned list is sorted." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1434 ../fish/guestfish-actions.pod:948 -msgid "" -"This function is deprecated. In new code, use the C call " -"instead." +#. type: textblock +#: ../fish/guestfish-actions.pod:1222 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1443 -msgid "guestfs_fallocate64" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1227 +msgid "find0" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1445 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1229 #, no-wrap msgid "" -" int\n" -" guestfs_fallocate64 (guestfs_h *g,\n" -" const char *path,\n" -" int64_t len);\n" +" find0 directory (files|-)\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1454 +#. type: textblock +#: ../fish/guestfish-actions.pod:1231 ../src/guestfs-actions.pod:1842 msgid "" -"Note that this call allocates disk blocks for the file. To create a sparse " -"file use C instead." +"This command lists out all files and directories, recursively, starting at " +"C, placing the resulting list in the external file called " +"C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1457 -msgid "" -"The deprecated call C does the same, but owing to an " -"oversight it only allowed 30 bit lengths to be specified, effectively " -"limiting the maximum size of files created through that call to 1GB." +#. type: textblock +#: ../fish/guestfish-actions.pod:1235 +msgid "This command works the same way as L with the following exceptions:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1462 ../fish/guestfish-actions.pod:971 +#. type: textblock +#: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:1853 +msgid "The resulting list is written to an external file." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:1857 msgid "" -"Do not confuse this with the guestfish-specific C and C " -"commands which create a file in the host and attach it as a device." +"Items (filenames) in the result are separated by C<\\0> characters. See " +"L option I<-print0>." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1468 -msgid "(Added in 1.3.17)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1251 ../src/guestfs-actions.pod:1862 +msgid "This command is not limited in the number of names that it can return." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1470 -msgid "guestfs_fgrep" +#. type: textblock +#: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:1867 +msgid "The result list is not sorted." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1262 +msgid "findfs-label" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1472 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1264 #, no-wrap msgid "" -" char **\n" -" guestfs_fgrep (guestfs_h *g,\n" -" const char *pattern,\n" -" const char *path);\n" +" findfs-label label\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1477 ../fish/guestfish-actions.pod:979 -msgid "This calls the external C program and returns the matching lines." +#. type: textblock +#: ../fish/guestfish-actions.pod:1266 ../src/guestfs-actions.pod:1881 +msgid "" +"This command searches the filesystems and returns the one which has the " +"given label. An error is returned if no such filesystem can be found." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1489 -msgid "guestfs_fgrepi" +#. type: textblock +#: ../fish/guestfish-actions.pod:1270 +msgid "To find the label of a filesystem, use L." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1272 +msgid "findfs-uuid" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1491 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1274 #, no-wrap msgid "" -" char **\n" -" guestfs_fgrepi (guestfs_h *g,\n" -" const char *pattern,\n" -" const char *path);\n" +" findfs-uuid uuid\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1496 ../fish/guestfish-actions.pod:989 -msgid "This calls the external C program and returns the matching lines." +#. type: textblock +#: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:1898 +msgid "" +"This command searches the filesystems and returns the one which has the " +"given UUID. An error is returned if no such filesystem can be found." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1508 -msgid "guestfs_file" +#. type: textblock +#: ../fish/guestfish-actions.pod:1280 +msgid "To find the UUID of a filesystem, use L." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1282 +msgid "fsck" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1510 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1284 #, no-wrap msgid "" -" char *\n" -" guestfs_file (guestfs_h *g,\n" -" const char *path);\n" +" fsck fstype device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1514 ../fish/guestfish-actions.pod:999 +#. type: textblock +#: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1916 msgid "" -"This call uses the standard L command to determine the type or " -"contents of the file." +"This runs the filesystem checker (fsck) on C which should have " +"filesystem type C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1002 +#. type: textblock +#: ../fish/guestfish-actions.pod:1289 ../src/guestfs-actions.pod:1919 msgid "" -"This call will also transparently look inside various types of compressed " -"file." +"The returned integer is the status. See L for the list of status " +"codes from C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1520 ../fish/guestfish-actions.pod:1005 -msgid "" -"The exact command which runs is C. Note in particular that " -"the filename is not prepended to the output (the C<-b> option)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1298 ../src/guestfs-actions.pod:1928 +msgid "Multiple status codes can be summed together." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1524 +#. type: textblock +#: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:1932 msgid "" -"This command can also be used on C devices (and partitions, LV " -"names). You can for example use this to determine if a device contains a " -"filesystem, although it's usually better to use C." +"A non-zero return code can mean \"success\", for example if errors have been " +"corrected on the filesystem." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1014 -msgid "" -"If the C does not begin with C then this command only works for " -"the content of regular files. For other file types (directory, symbolic " -"link etc) it will just return the string C etc." +#. type: textblock +#: ../fish/guestfish-actions.pod:1307 ../src/guestfs-actions.pod:1937 +msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1539 -msgid "guestfs_file_architecture" +#. type: textblock +#: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:1942 +msgid "This command is entirely equivalent to running C." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1541 +#. type: =head2 +#: ../fish/guestfish-actions.pod:1314 +msgid "get-append" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:1316 #, no-wrap msgid "" -" char *\n" -" guestfs_file_architecture (guestfs_h *g,\n" -" const char *filename);\n" +" get-append\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1545 ../fish/guestfish-actions.pod:1023 +#. type: textblock +#: ../fish/guestfish-actions.pod:1318 ../src/guestfs-actions.pod:1953 msgid "" -"This detects the architecture of the binary C, and returns it if " -"known." +"Return the additional kernel options which are added to the guest kernel " +"command line." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1026 -msgid "Currently defined architectures are:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1321 ../src/guestfs-actions.pod:1956 +msgid "If C then no options are added." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030 -msgid "\"i386\"" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1323 +msgid "get-attach-method" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1032 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1325 +#, no-wrap msgid "" -"This string is returned for all 32 bit i386, i486, i586, i686 binaries " -"irrespective of the precise processor requirements of the binary." +" get-attach-method\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035 -msgid "\"x86_64\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:1327 +msgid "Return the current attach method. See L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037 -msgid "64 bit x86-64." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1329 +msgid "get-autosync" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039 -msgid "\"sparc\"" +#. type: verbatim +#: ../fish/guestfish-actions.pod:1331 +#, no-wrap +msgid "" +" get-autosync\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041 -msgid "32 bit SPARC." +#. type: textblock +#: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:1981 +msgid "Get the autosync flag." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043 -msgid "\"sparc64\"" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1335 +msgid "get-direct" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045 -msgid "64 bit SPARC V9 and above." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1337 +#, no-wrap +msgid "" +" get-direct\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047 -msgid "\"ia64\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:1339 ../src/guestfs-actions.pod:1992 +msgid "Return the direct appliance mode flag." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049 -msgid "Intel Itanium." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1341 +msgid "get-e2label" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051 -msgid "\"ppc\"" +#. type: verbatim +#: ../fish/guestfish-actions.pod:1343 +#, no-wrap +msgid "" +" get-e2label device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053 -msgid "32 bit Power PC." +#. type: textblock +#: ../fish/guestfish-actions.pod:1345 ../src/guestfs-actions.pod:2011 +msgid "This returns the ext2/3/4 filesystem label of the filesystem on C." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055 -msgid "\"ppc64\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:1348 +msgid "" +"I In new code, use the L call " +"instead." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1057 -msgid "64 bit Power PC." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1355 +msgid "get-e2uuid" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061 -msgid "Libguestfs may return other architecture strings in future." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1357 +#, no-wrap +msgid "" +" get-e2uuid device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1063 -msgid "The function works on at least the following types of files:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1359 ../src/guestfs-actions.pod:2032 +msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1069 -msgid "many types of Un*x and Linux binary" +#. type: textblock +#: ../fish/guestfish-actions.pod:1362 +msgid "" +"I In new code, use the L call " +"instead." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1595 ../fish/guestfish-actions.pod:1073 -msgid "many types of Un*x and Linux shared library" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1369 +msgid "get-memsize" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1077 -msgid "Windows Win32 and Win64 binaries" +#. type: verbatim +#: ../fish/guestfish-actions.pod:1371 +#, no-wrap +msgid "" +" get-memsize\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081 -msgid "Windows Win32 and Win64 DLLs" +#. type: textblock +#: ../fish/guestfish-actions.pod:1373 ../src/guestfs-actions.pod:2045 +msgid "This gets the memory size in megabytes allocated to the qemu subprocess." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083 -msgid "Win32 binaries and DLLs return C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1376 +msgid "" +"If L was not called on this handle, and if " +"C was not set, then this returns the compiled-in default " +"value for memsize." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1085 -msgid "Win64 binaries and DLLs return C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1380 ../fish/guestfish-actions.pod:1437 ../fish/guestfish-actions.pod:4168 ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:2052 ../src/guestfs-actions.pod:2144 ../src/guestfs-actions.pod:6298 ../src/guestfs-actions.pod:6424 +msgid "For more information on the architecture of libguestfs, see L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1611 ../fish/guestfish-actions.pod:1089 -msgid "Linux kernel modules" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1383 +msgid "get-network" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1615 ../fish/guestfish-actions.pod:1093 -msgid "Linux new-style initrd images" +#. type: verbatim +#: ../fish/guestfish-actions.pod:1385 +#, no-wrap +msgid "" +" get-network\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1097 -msgid "some non-x86 Linux vmlinuz kernels" +#. type: textblock +#: ../fish/guestfish-actions.pod:1387 ../src/guestfs-actions.pod:2064 +msgid "This returns the enable network flag." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1101 -msgid "What it can't do currently:" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1389 +msgid "get-path" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1107 -msgid "static libraries (libfoo.a)" +#. type: verbatim +#: ../fish/guestfish-actions.pod:1391 +#, no-wrap +msgid "" +" get-path\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1111 -msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1393 ../src/guestfs-actions.pod:2075 +msgid "Return the current search path." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115 -msgid "x86 Linux vmlinuz kernels" +#. type: textblock +#: ../fish/guestfish-actions.pod:1395 ../src/guestfs-actions.pod:2077 +msgid "" +"This is always non-NULL. If it wasn't set already, then this will return " +"the default path." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1398 +msgid "get-pgroup" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1117 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1400 +#, no-wrap msgid "" -"x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and " -"compressed code, and are horribly hard to unpack. If you want to find the " -"architecture of a kernel, use the architecture of the associated initrd or " -"kernel module(s) instead." +" get-pgroup\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:2664 ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:2718 ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3169 -msgid "(Added in 1.5.3)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1402 ../src/guestfs-actions.pod:2090 +msgid "This returns the process group flag." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1651 -msgid "guestfs_filesize" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1404 +msgid "get-pid" +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1406 +msgid "pid" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1653 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1408 #, no-wrap msgid "" -" int64_t\n" -" guestfs_filesize (guestfs_h *g,\n" -" const char *file);\n" +" get-pid\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1657 ../fish/guestfish-actions.pod:1128 -msgid "This command returns the size of C in bytes." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1659 +#. type: textblock +#: ../fish/guestfish-actions.pod:1410 ../src/guestfs-actions.pod:2101 msgid "" -"To get other stats about a file, use C, C, " -"C, C etc. To get the size of block " -"devices, use C." +"Return the process ID of the qemu subprocess. If there is no qemu " +"subprocess, then this will return an error." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1665 -msgid "(Added in 1.0.82)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1413 ../src/guestfs-actions.pod:2104 +msgid "This is an internal call used for debugging and testing." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1667 -msgid "guestfs_fill" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1415 +msgid "get-qemu" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1669 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1417 #, no-wrap msgid "" -" int\n" -" guestfs_fill (guestfs_h *g,\n" -" int c,\n" -" int len,\n" -" const char *path);\n" +" get-qemu\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1138 +#. type: textblock +#: ../fish/guestfish-actions.pod:1419 ../src/guestfs-actions.pod:2115 +msgid "Return the current qemu binary." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:1421 ../src/guestfs-actions.pod:2117 msgid "" -"This command creates a new file called C. The initial content of the " -"file is C octets of C, where C must be a number in the range " -"C<[0..255]>." +"This is always non-NULL. If it wasn't set already, then this will return " +"the default qemu binary name." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1424 +msgid "get-recovery-proc" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1679 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1426 +#, no-wrap msgid "" -"To fill a file with zero bytes (sparsely), it is much more efficient to use " -"C. To create a file with a pattern of repeating " -"bytes use C." +" get-recovery-proc\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1691 -msgid "(Added in 1.0.79)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1428 ../src/guestfs-actions.pod:2130 +msgid "Return the recovery process enabled flag." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1693 -msgid "guestfs_fill_pattern" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1430 +msgid "get-selinux" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1695 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1432 #, no-wrap msgid "" -" int\n" -" guestfs_fill_pattern (guestfs_h *g,\n" -" const char *pattern,\n" -" int len,\n" -" const char *path);\n" +" get-selinux\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1701 +#. type: textblock +#: ../fish/guestfish-actions.pod:1434 msgid "" -"This function is like C except that it creates a new file of " -"length C containing the repeating pattern of bytes in C. The " -"pattern is truncated if necessary to ensure the length of the file is " -"exactly C bytes." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1713 -msgid "(Added in 1.3.12)" +"This returns the current setting of the selinux flag which is passed to the " +"appliance at boot time. See L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1715 -msgid "guestfs_find" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1440 +msgid "get-state" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1717 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1442 #, no-wrap msgid "" -" char **\n" -" guestfs_find (guestfs_h *g,\n" -" const char *directory);\n" +" get-state\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1721 ../fish/guestfish-actions.pod:1160 +#. type: textblock +#: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2156 msgid "" -"This command lists out all files and directories, recursively, starting at " -"C. It is essentially equivalent to running the shell command " -"C but some post-processing happens on the output, " -"described below." +"This returns the current state as an opaque integer. This is only useful " +"for printing debug and internal error messages." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1726 ../fish/guestfish-actions.pod:1165 -msgid "" -"This returns a list of strings I. Thus if the directory " -"structure was:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1447 ../fish/guestfish-actions.pod:2367 ../fish/guestfish-actions.pod:2385 ../fish/guestfish-actions.pod:2423 ../fish/guestfish-actions.pod:2439 ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3439 ../src/guestfs-actions.pod:3468 ../src/guestfs-actions.pod:3529 ../src/guestfs-actions.pod:3556 +msgid "For more information on states, see L." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1168 +#. type: =head2 +#: ../fish/guestfish-actions.pod:1449 +msgid "get-trace" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:1451 #, no-wrap msgid "" -" /tmp/a\n" -" /tmp/b\n" -" /tmp/c/d\n" +" get-trace\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1733 -msgid "then the returned list from C C would be 4 elements:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1453 ../src/guestfs-actions.pod:2170 +msgid "Return the command trace flag." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1455 +msgid "get-umask" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1736 ../fish/guestfish-actions.pod:1175 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1457 #, no-wrap msgid "" -" a\n" -" b\n" -" c\n" -" c/d\n" +" get-umask\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1741 ../fish/guestfish-actions.pod:1180 -msgid "If C is not a directory, then this command returns an error." +#. type: textblock +#: ../fish/guestfish-actions.pod:1459 +msgid "" +"Return the current umask. By default the umask is C<022> unless it has been " +"set by calling L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1183 -msgid "The returned list is sorted." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1462 +msgid "get-verbose" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1746 -msgid "See also C." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1464 +#, no-wrap +msgid "" +" get-verbose\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:3856 ../src/guestfs-actions.pod:5383 -msgid "(Added in 1.0.27)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1466 ../src/guestfs-actions.pod:2193 +msgid "This returns the verbose messages flag." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1757 -msgid "guestfs_find0" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1468 +msgid "getcon" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1759 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1470 #, no-wrap msgid "" -" int\n" -" guestfs_find0 (guestfs_h *g,\n" -" const char *directory,\n" -" const char *files);\n" +" getcon\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1194 -msgid "" -"This command lists out all files and directories, recursively, starting at " -"C, placing the resulting list in the external file called " -"C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1472 ../src/guestfs-actions.pod:2204 +msgid "This gets the SELinux security context of the daemon." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1768 -msgid "" -"This command works the same way as C with the following " -"exceptions:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1474 +msgid "See the documentation about SELINUX in L, and L" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1775 ../fish/guestfish-actions.pod:1205 -msgid "The resulting list is written to an external file." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1477 +msgid "getxattr" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1779 ../fish/guestfish-actions.pod:1209 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1479 +#, no-wrap msgid "" -"Items (filenames) in the result are separated by C<\\0> characters. See " -"L option I<-print0>." +" getxattr path name\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1784 ../fish/guestfish-actions.pod:1214 -msgid "This command is not limited in the number of names that it can return." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1219 -msgid "The result list is not sorted." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1795 -msgid "(Added in 1.0.74)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:1797 -msgid "guestfs_findfs_label" +#. type: textblock +#: ../fish/guestfish-actions.pod:1481 +msgid "" +"Get a single extended attribute from file C named C. This call " +"follows symlinks. If you want to lookup an extended attribute for the " +"symlink itself, use L." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1799 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1485 ../fish/guestfish-actions.pod:2512 msgid "" -" char *\n" -" guestfs_findfs_label (guestfs_h *g,\n" -" const char *label);\n" -"\n" +"Normally it is better to get all extended attributes from a file in one go " +"by calling L. However some Linux filesystem implementations are " +"buggy and do not provide a way to list out attributes. For these " +"filesystems (notably ntfs-3g) you have to know the names of the extended " +"attributes you want in advance and call this function." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1229 +#. type: textblock +#: ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:2519 ../src/guestfs-actions.pod:2233 ../src/guestfs-actions.pod:3689 msgid "" -"This command searches the filesystems and returns the one which has the " -"given label. An error is returned if no such filesystem can be found." +"Extended attribute values are blobs of binary data. If there is no extended " +"attribute named C, this returns an error." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1807 -msgid "To find the label of a filesystem, use C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1495 +msgid "See also: L, L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1814 -msgid "guestfs_findfs_uuid" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1497 +msgid "getxattrs" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1816 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1499 #, no-wrap msgid "" -" char *\n" -" guestfs_findfs_uuid (guestfs_h *g,\n" -" const char *uuid);\n" +" getxattrs path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239 +#. type: textblock +#: ../fish/guestfish-actions.pod:1501 ../src/guestfs-actions.pod:2250 +msgid "This call lists the extended attributes of the file or directory C." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:1504 ../src/guestfs-actions.pod:2253 msgid "" -"This command searches the filesystems and returns the one which has the " -"given UUID. An error is returned if no such filesystem can be found." +"At the system call level, this is a combination of the L and " +"L calls." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1824 -msgid "To find the UUID of a filesystem, use C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1507 +msgid "See also: L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1831 -msgid "guestfs_fsck" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1509 +msgid "glob-expand" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1833 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1511 #, no-wrap msgid "" -" int\n" -" guestfs_fsck (guestfs_h *g,\n" -" const char *fstype,\n" -" const char *device);\n" +" glob-expand pattern\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1838 ../fish/guestfish-actions.pod:1249 +#. type: textblock +#: ../fish/guestfish-actions.pod:1513 ../src/guestfs-actions.pod:2270 msgid "" -"This runs the filesystem checker (fsck) on C which should have " -"filesystem type C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1841 ../fish/guestfish-actions.pod:1252 -msgid "" -"The returned integer is the status. See L for the list of status " -"codes from C." +"This command searches for all the pathnames matching C according to " +"the wildcard expansion rules used by the shell." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1850 ../fish/guestfish-actions.pod:1261 -msgid "Multiple status codes can be summed together." +#. type: textblock +#: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2274 +msgid "If no paths match, then this returns an empty list (note: not an error)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1854 ../fish/guestfish-actions.pod:1265 +#. type: textblock +#: ../fish/guestfish-actions.pod:1520 ../src/guestfs-actions.pod:2277 msgid "" -"A non-zero return code can mean \"success\", for example if errors have been " -"corrected on the filesystem." +"It is just a wrapper around the C L function with flags " +"C. See that manual page for more details." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1859 ../fish/guestfish-actions.pod:1270 -msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1524 +msgid "grep" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1275 -msgid "This command is entirely equivalent to running C." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1526 +#, no-wrap +msgid "" +" grep regex path\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:7030 -msgid "(Added in 1.0.16)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1528 ../src/guestfs-actions.pod:2294 +msgid "This calls the external C program and returns the matching lines." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1870 -msgid "guestfs_get_append" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1534 +msgid "grepi" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1872 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1536 #, no-wrap msgid "" -" const char *\n" -" guestfs_get_append (guestfs_h *g);\n" +" grepi regex path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1875 ../fish/guestfish-actions.pod:1281 -msgid "" -"Return the additional kernel options which are added to the guest kernel " -"command line." +#. type: textblock +#: ../fish/guestfish-actions.pod:1538 ../src/guestfs-actions.pod:2313 +msgid "This calls the external C program and returns the matching lines." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1284 -msgid "If C then no options are added." +#. type: =head2 +#: ../fish/guestfish-actions.pod:1544 +msgid "grub-install" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1880 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1546 +#, no-wrap msgid "" -"This function returns a string which may be NULL. There is no way to return " -"an error from this function. The string is owned by the guest handle and " -"must I be freed." +" grub-install root device\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1884 ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5892 ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:5927 ../src/guestfs-actions.pod:5944 ../src/guestfs-actions.pod:6701 ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:7073 -msgid "(Added in 1.0.26)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1548 ../src/guestfs-actions.pod:2332 +msgid "" +"This command installs GRUB (the Grand Unified Bootloader) on C, with " +"the root directory being C." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1886 -msgid "guestfs_get_autosync" +#. type: textblock +#: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2335 +msgid "" +"Note: If grub-install reports the error \"No suitable drive was found in the " +"generated device map.\" it may be that you need to create a " +"C file first that contains the mapping between grub " +"device names and Linux device names. It is usually sufficient to create a " +"file containing:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1888 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1558 ../src/guestfs-actions.pod:2342 #, no-wrap msgid "" -" int\n" -" guestfs_get_autosync (guestfs_h *g);\n" +" (hd0) /dev/vda\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1891 ../fish/guestfish-actions.pod:1290 -msgid "Get the autosync flag." +#. type: textblock +#: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2344 +msgid "replacing C with the name of the installation device." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1897 -msgid "guestfs_get_direct" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1562 +msgid "head" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1899 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1564 #, no-wrap msgid "" -" int\n" -" guestfs_get_direct (guestfs_h *g);\n" +" head path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1902 ../fish/guestfish-actions.pod:1296 -msgid "Return the direct appliance mode flag." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:5565 -msgid "(Added in 1.0.72)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1566 ../src/guestfs-actions.pod:2356 +msgid "" +"This command returns up to the first 10 lines of a file as a list of " +"strings." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1908 -msgid "guestfs_get_e2label" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1572 +msgid "head-n" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1910 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1574 #, no-wrap msgid "" -" char *\n" -" guestfs_get_e2label (guestfs_h *g,\n" -" const char *device);\n" +" head-n nrlines path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1302 -msgid "This returns the ext2/3/4 filesystem label of the filesystem on C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1576 ../src/guestfs-actions.pod:2375 +msgid "" +"If the parameter C is a positive number, this returns the first " +"C lines of the file C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1920 ../fish/guestfish-actions.pod:1305 +#. type: textblock +#: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2378 msgid "" -"This function is deprecated. In new code, use the C call " -"instead." +"If the parameter C is a negative number, this returns lines from " +"the file C, excluding the last C lines." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:1948 ../src/guestfs-actions.pod:5583 ../src/guestfs-actions.pod:5602 -msgid "(Added in 1.0.15)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1582 ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:2381 ../src/guestfs-actions.pod:6996 +msgid "If the parameter C is zero, this returns an empty list." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1929 -msgid "guestfs_get_e2uuid" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1587 +msgid "hexdump" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1931 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1589 #, no-wrap msgid "" -" char *\n" -" guestfs_get_e2uuid (guestfs_h *g,\n" -" const char *device);\n" +" hexdump path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1935 ../fish/guestfish-actions.pod:1316 -msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1319 -msgid "This function is deprecated. In new code, use the C call instead." +#. type: textblock +#: ../fish/guestfish-actions.pod:1591 ../src/guestfs-actions.pod:2398 +msgid "" +"This runs C on the given C. The result is the " +"human-readable, canonical hex dump of the file." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1950 -msgid "guestfs_get_memsize" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1597 +msgid "initrd-cat" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1952 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1599 #, no-wrap msgid "" -" int\n" -" guestfs_get_memsize (guestfs_h *g);\n" +" initrd-cat initrdpath filename\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1330 -msgid "This gets the memory size in megabytes allocated to the qemu subprocess." +#. type: textblock +#: ../fish/guestfish-actions.pod:1601 ../src/guestfs-actions.pod:2417 +msgid "" +"This command unpacks the file C from the initrd file called " +"C. The filename must be given I the initial C " +"character." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1958 +#. type: textblock +#: ../fish/guestfish-actions.pod:1605 ../src/guestfs-actions.pod:2421 msgid "" -"If C was not called on this handle, and if " -"C was not set, then this returns the compiled-in default " -"value for memsize." +"For example, in guestfish you could use the following command to examine the " +"boot script (usually called C) contained in a Linux initrd or " +"initramfs image:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2043 ../src/guestfs-actions.pod:5618 ../src/guestfs-actions.pod:5725 ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388 ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:3838 -msgid "For more information on the architecture of libguestfs, see L." +#. type: verbatim +#: ../fish/guestfish-actions.pod:1609 ../src/guestfs-actions.pod:2425 +#, no-wrap +msgid "" +" initrd-cat /boot/initrd-.img init\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1967 ../src/guestfs-actions.pod:4147 ../src/guestfs-actions.pod:4328 ../src/guestfs-actions.pod:4347 ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4378 ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4408 ../src/guestfs-actions.pod:5286 ../src/guestfs-actions.pod:5623 ../src/guestfs-actions.pod:5866 ../src/guestfs-actions.pod:6467 -msgid "(Added in 1.0.55)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1611 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1969 -msgid "guestfs_get_network" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1616 +msgid "initrd-list" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1971 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1618 #, no-wrap msgid "" -" int\n" -" guestfs_get_network (guestfs_h *g);\n" +" initrd-list path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1974 ../fish/guestfish-actions.pod:1344 -msgid "This returns the enable network flag." +#. type: textblock +#: ../fish/guestfish-actions.pod:1620 ../src/guestfs-actions.pod:2444 +msgid "This command lists out files contained in an initrd." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1978 ../src/guestfs-actions.pod:5642 -msgid "(Added in 1.5.4)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1622 ../src/guestfs-actions.pod:2446 +msgid "" +"The files are listed without any initial C character. The files are " +"listed in the order they appear (not necessarily alphabetical). Directory " +"names are listed as separate items." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1980 -msgid "guestfs_get_path" +#. type: textblock +#: ../fish/guestfish-actions.pod:1626 ../src/guestfs-actions.pod:2450 +msgid "" +"Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as " +"initrd. We I support the newer initramfs format (compressed cpio " +"files)." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1630 +msgid "inotify-add-watch" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1982 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1632 #, no-wrap msgid "" -" const char *\n" -" guestfs_get_path (guestfs_h *g);\n" +" inotify-add-watch path mask\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350 -msgid "Return the current search path." +#. type: textblock +#: ../fish/guestfish-actions.pod:1634 ../src/guestfs-actions.pod:2467 +msgid "Watch C for the events listed in C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1352 +#. type: textblock +#: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2469 msgid "" -"This is always non-NULL. If it wasn't set already, then this will return " -"the default path." +"Note that if C is a directory then events within that directory are " +"watched, but this does I happen recursively (in subdirectories)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:2019 +#. type: textblock +#: ../fish/guestfish-actions.pod:1640 ../src/guestfs-actions.pod:2473 msgid "" -"This function returns a string, or NULL on error. The string is owned by " -"the guest handle and must I be freed." +"Note for non-C or non-Linux callers: the inotify events are defined by the " +"Linux kernel ABI and are listed in C." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:1995 -msgid "guestfs_get_pid" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1644 +msgid "inotify-close" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:1997 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1646 #, no-wrap msgid "" -" int\n" -" guestfs_get_pid (guestfs_h *g);\n" +" inotify-close\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1361 +#. type: textblock +#: ../fish/guestfish-actions.pod:1648 ../src/guestfs-actions.pod:2486 msgid "" -"Return the process ID of the qemu subprocess. If there is no qemu " -"subprocess, then this will return an error." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2003 ../fish/guestfish-actions.pod:1364 -msgid "This is an internal call used for debugging and testing." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2007 -msgid "(Added in 1.0.56)" +"This closes the inotify handle which was previously opened by inotify_init. " +"It removes all watches, throws away any pending events, and deallocates all " +"resources." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2009 -msgid "guestfs_get_qemu" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1652 +msgid "inotify-files" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2011 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1654 #, no-wrap msgid "" -" const char *\n" -" guestfs_get_qemu (guestfs_h *g);\n" +" inotify-files\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370 -msgid "Return the current qemu binary." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1372 +#. type: textblock +#: ../fish/guestfish-actions.pod:1656 msgid "" -"This is always non-NULL. If it wasn't set already, then this will return " -"the default qemu binary name." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2022 ../src/guestfs-actions.pod:5687 -msgid "(Added in 1.0.6)" +"This function is a helpful wrapper around L which just " +"returns a list of pathnames of objects that were touched. The returned " +"pathnames are sorted and deduplicated." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2024 -msgid "guestfs_get_recovery_proc" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1660 +msgid "inotify-init" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2026 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1662 #, no-wrap msgid "" -" int\n" -" guestfs_get_recovery_proc (guestfs_h *g);\n" +" inotify-init maxevents\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1379 -msgid "Return the recovery process enabled flag." +#. type: textblock +#: ../fish/guestfish-actions.pod:1664 ../src/guestfs-actions.pod:2515 +msgid "" +"This command creates a new inotify handle. The inotify subsystem can be " +"used to notify events which happen to objects in the guest filesystem." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3554 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3986 ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5334 ../src/guestfs-actions.pod:5711 ../src/guestfs-actions.pod:6370 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6582 -msgid "(Added in 1.0.77)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1668 +msgid "" +"C is the maximum number of events which will be queued up between " +"calls to L or L. If this is passed as C<0>, " +"then the kernel (or previously set) default is used. For Linux 2.6.29 the " +"default was 16384 events. Beyond this limit, the kernel throws away events, " +"but records the fact that it threw them away by setting a flag " +"C in the returned structure list (see L)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2035 -msgid "guestfs_get_selinux" +#. type: textblock +#: ../fish/guestfish-actions.pod:1678 +msgid "" +"Before any events are generated, you have to add some watches to the " +"internal watch list. See: L, L and " +"L." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2037 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1684 msgid "" -" int\n" -" guestfs_get_selinux (guestfs_h *g);\n" -"\n" +"Queued up events should be read periodically by calling L (or " +"L which is just a helpful wrapper around L). " +"If you don't read the events out often enough then you risk the internal " +"queue overflowing." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2040 +#. type: textblock +#: ../fish/guestfish-actions.pod:1691 msgid "" -"This returns the current setting of the selinux flag which is passed to the " -"appliance at boot time. See C." +"The handle should be closed after use by calling L. This " +"also removes any watches automatically." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:2111 ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:5784 -msgid "(Added in 1.0.67)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1695 ../src/guestfs-actions.pod:2546 +msgid "" +"See also L for an overview of the inotify interface as exposed " +"by the Linux kernel, which is roughly what we expose via libguestfs. Note " +"that there is one global inotify handle per libguestfs instance." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2050 -msgid "guestfs_get_state" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1700 +msgid "inotify-read" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2052 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1702 #, no-wrap msgid "" -" int\n" -" guestfs_get_state (guestfs_h *g);\n" +" inotify-read\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1395 +#. type: textblock +#: ../fish/guestfish-actions.pod:1704 ../src/guestfs-actions.pod:2560 msgid "" -"This returns the current state as an opaque integer. This is only useful " -"for printing debug and internal error messages." +"Return the complete queue of events that have happened since the previous " +"read call." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:3062 ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3179 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:2133 ../fish/guestfish-actions.pod:2151 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2205 -msgid "For more information on states, see L." +#. type: textblock +#: ../fish/guestfish-actions.pod:1707 ../src/guestfs-actions.pod:2563 +msgid "If no events have happened, this returns an empty list." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2064 -msgid "guestfs_get_trace" +#. type: textblock +#: ../fish/guestfish-actions.pod:1709 ../src/guestfs-actions.pod:2565 +msgid "" +"I: In order to make sure that all events have been read, you must call " +"this function repeatedly until it returns an empty list. The reason is that " +"the call will read events up to the maximum appliance-to-host message size " +"and leave remaining events in the queue." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1715 +msgid "inotify-rm-watch" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2066 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1717 #, no-wrap msgid "" -" int\n" -" guestfs_get_trace (guestfs_h *g);\n" +" inotify-rm-watch wd\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1404 -msgid "Return the command trace flag." +#. type: textblock +#: ../fish/guestfish-actions.pod:1719 +msgid "Remove a previously defined inotify watch. See L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2075 -msgid "guestfs_get_umask" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1722 +msgid "inspect-get-arch" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2077 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1724 #, no-wrap msgid "" -" int\n" -" guestfs_get_umask (guestfs_h *g);\n" +" inspect-get-arch root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2080 +#. type: textblock +#: ../fish/guestfish-actions.pod:1726 msgid "" -"Return the current umask. By default the umask is C<022> unless it has been " -"set by calling C." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:2087 -msgid "guestfs_get_verbose" +"This returns the architecture of the inspected operating system. The " +"possible return values are listed under L." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2089 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1730 ../src/guestfs-actions.pod:2600 msgid "" -" int\n" -" guestfs_get_verbose (guestfs_h *g);\n" -"\n" +"If the architecture could not be determined, then the string C is " +"returned." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2092 ../fish/guestfish-actions.pod:1417 -msgid "This returns the verbose messages flag." +#. type: textblock +#: ../fish/guestfish-actions.pod:1733 ../fish/guestfish-actions.pod:1816 ../fish/guestfish-actions.pod:1895 ../fish/guestfish-actions.pod:1907 ../fish/guestfish-actions.pod:1991 ../fish/guestfish-actions.pod:2052 ../fish/guestfish-actions.pod:2073 ../fish/guestfish-actions.pod:2087 ../fish/guestfish-actions.pod:2127 ../fish/guestfish-actions.pod:2159 ../fish/guestfish-actions.pod:2172 ../fish/guestfish-actions.pod:2185 ../fish/guestfish-actions.pod:2195 ../fish/guestfish-actions.pod:2205 ../fish/guestfish-actions.pod:2217 ../fish/guestfish-actions.pod:2313 ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:2603 ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2947 ../src/guestfs-actions.pod:3030 ../src/guestfs-actions.pod:3058 ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3172 ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3212 ../src/guestfs-actions.pod:3229 ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3263 ../src/guestfs-actions.pod:3365 ../src/guestfs-actions.pod:3406 +msgid "Please read L for more details." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2098 -msgid "guestfs_getcon" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1735 +msgid "inspect-get-distro" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2100 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1737 #, no-wrap msgid "" -" char *\n" -" guestfs_getcon (guestfs_h *g);\n" +" inspect-get-distro root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2103 ../fish/guestfish-actions.pod:1423 -msgid "This gets the SELinux security context of the daemon." +#. type: textblock +#: ../fish/guestfish-actions.pod:1739 ../src/guestfs-actions.pod:2616 +msgid "This returns the distro (distribution) of the inspected operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2105 -msgid "See the documentation about SELINUX in L, and C" +#. type: textblock +#: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2619 +msgid "Currently defined distros are:" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2113 -msgid "guestfs_getxattr" +#. type: =item +#: ../fish/guestfish-actions.pod:1746 ../src/guestfs-actions.pod:2623 +msgid "\"archlinux\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2115 -#, no-wrap -msgid "" -" char *\n" -" guestfs_getxattr (guestfs_h *g,\n" -" const char *path,\n" -" const char *name,\n" -" size_t *size_r);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1748 ../src/guestfs-actions.pod:2625 +msgid "Arch Linux." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2121 -msgid "" -"Get a single extended attribute from file C named C. This call " -"follows symlinks. If you want to lookup an extended attribute for the " -"symlink itself, use C." +#. type: =item +#: ../fish/guestfish-actions.pod:1750 ../src/guestfs-actions.pod:2627 +msgid "\"centos\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3273 -msgid "" -"Normally it is better to get all extended attributes from a file in one go " -"by calling C. However some Linux filesystem " -"implementations are buggy and do not provide a way to list out attributes. " -"For these filesystems (notably ntfs-3g) you have to know the names of the " -"extended attributes you want in advance and call this function." +#. type: textblock +#: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2629 +msgid "CentOS." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2132 ../src/guestfs-actions.pod:3280 ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:2270 -msgid "" -"Extended attribute values are blobs of binary data. If there is no extended " -"attribute named C, this returns an error." +#. type: =item +#: ../fish/guestfish-actions.pod:1754 ../src/guestfs-actions.pod:2631 +msgid "\"debian\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2135 -msgid "See also: C, C, L." +#. type: textblock +#: ../fish/guestfish-actions.pod:1756 ../src/guestfs-actions.pod:2633 +msgid "Debian." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:3285 ../src/guestfs-actions.pod:4984 ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5191 -msgid "" -"This function returns a buffer, or NULL on error. The size of the returned " -"buffer is written to C<*size_r>. I." +#. type: =item +#: ../fish/guestfish-actions.pod:1758 ../src/guestfs-actions.pod:2635 +msgid "\"fedora\"" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2141 -msgid "guestfs_getxattrs" +#. type: textblock +#: ../fish/guestfish-actions.pod:1760 ../src/guestfs-actions.pod:2637 +msgid "Fedora." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2143 -#, no-wrap -msgid "" -" struct guestfs_xattr_list *\n" -" guestfs_getxattrs (guestfs_h *g,\n" -" const char *path);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2639 +msgid "\"gentoo\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1452 -msgid "This call lists the extended attributes of the file or directory C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1764 ../src/guestfs-actions.pod:2641 +msgid "Gentoo." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1455 -msgid "" -"At the system call level, this is a combination of the L and " -"L calls." +#. type: =item +#: ../fish/guestfish-actions.pod:1766 ../src/guestfs-actions.pod:2643 +msgid "\"linuxmint\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2153 -msgid "See also: C, L." +#. type: textblock +#: ../fish/guestfish-actions.pod:1768 ../src/guestfs-actions.pod:2645 +msgid "Linux Mint." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3299 ../src/guestfs-actions.pod:3950 -msgid "" -"This function returns a C, or NULL if there was " -"an error. I after use>." +#. type: =item +#: ../fish/guestfish-actions.pod:1770 ../src/guestfs-actions.pod:2647 +msgid "\"mandriva\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3303 ../src/guestfs-actions.pod:3468 ../src/guestfs-actions.pod:3504 ../src/guestfs-actions.pod:5364 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7138 -msgid "(Added in 1.0.59)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2649 +msgid "Mandriva." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2161 -msgid "guestfs_glob_expand" +#. type: =item +#: ../fish/guestfish-actions.pod:1774 ../src/guestfs-actions.pod:2651 +msgid "\"meego\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2163 -#, no-wrap -msgid "" -" char **\n" -" guestfs_glob_expand (guestfs_h *g,\n" -" const char *pattern);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1776 ../src/guestfs-actions.pod:2653 +msgid "MeeGo." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1464 -msgid "" -"This command searches for all the pathnames matching C according to " -"the wildcard expansion rules used by the shell." +#. type: =item +#: ../fish/guestfish-actions.pod:1778 ../src/guestfs-actions.pod:2655 +msgid "\"pardus\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1468 -msgid "If no paths match, then this returns an empty list (note: not an error)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1780 ../src/guestfs-actions.pod:2657 +msgid "Pardus." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1471 -msgid "" -"It is just a wrapper around the C L function with flags " -"C. See that manual page for more details." +#. type: =item +#: ../fish/guestfish-actions.pod:1782 ../src/guestfs-actions.pod:2659 +msgid "\"redhat-based\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:5985 -msgid "(Added in 1.0.50)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1784 ../src/guestfs-actions.pod:2661 +msgid "Some Red Hat-derived distro." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2184 -msgid "guestfs_grep" +#. type: =item +#: ../fish/guestfish-actions.pod:1786 ../src/guestfs-actions.pod:2663 +msgid "\"rhel\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2186 -#, no-wrap -msgid "" -" char **\n" -" guestfs_grep (guestfs_h *g,\n" -" const char *regex,\n" -" const char *path);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1788 ../src/guestfs-actions.pod:2665 +msgid "Red Hat Enterprise Linux." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1479 -msgid "This calls the external C program and returns the matching lines." +#. type: =item +#: ../fish/guestfish-actions.pod:1790 ../src/guestfs-actions.pod:2667 +msgid "\"scientificlinux\"" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2203 -msgid "guestfs_grepi" +#. type: textblock +#: ../fish/guestfish-actions.pod:1792 ../src/guestfs-actions.pod:2669 +msgid "Scientific Linux." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2205 -#, no-wrap -msgid "" -" char **\n" -" guestfs_grepi (guestfs_h *g,\n" -" const char *regex,\n" -" const char *path);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:1794 ../src/guestfs-actions.pod:2671 +msgid "\"slackware\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1489 -msgid "This calls the external C program and returns the matching lines." +#. type: textblock +#: ../fish/guestfish-actions.pod:1796 ../src/guestfs-actions.pod:2673 +msgid "Slackware." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2222 -msgid "guestfs_grub_install" +#. type: =item +#: ../fish/guestfish-actions.pod:1798 ../src/guestfs-actions.pod:2675 +msgid "\"ubuntu\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2224 -#, no-wrap -msgid "" -" int\n" -" guestfs_grub_install (guestfs_h *g,\n" -" const char *root,\n" -" const char *device);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1800 ../src/guestfs-actions.pod:2677 +msgid "Ubuntu." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1499 -msgid "" -"This command installs GRUB (the Grand Unified Bootloader) on C, with " -"the root directory being C." +#. type: =item +#: ../fish/guestfish-actions.pod:1802 ../fish/guestfish-actions.pod:1886 ../fish/guestfish-actions.pod:2150 ../src/guestfs-actions.pod:2679 ../src/guestfs-actions.pod:2788 ../src/guestfs-actions.pod:3163 +msgid "\"unknown\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1502 -msgid "" -"Note: If grub-install reports the error \"No suitable drive was found in the " -"generated device map.\" it may be that you need to create a " -"C file first that contains the mapping between grub " -"device names and Linux device names. It is usually sufficient to create a " -"file containing:" +#. type: textblock +#: ../fish/guestfish-actions.pod:1804 ../src/guestfs-actions.pod:2681 +msgid "The distro could not be determined." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1509 -#, no-wrap -msgid "" -" (hd0) /dev/vda\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:1806 ../fish/guestfish-actions.pod:2142 ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:3155 +msgid "\"windows\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1511 -msgid "replacing C with the name of the installation device." +#. type: textblock +#: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2685 +msgid "" +"Windows does not have distributions. This string is returned if the OS type " +"is Windows." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2245 -msgid "(Added in 1.0.17)" +#. type: textblock +#: ../fish/guestfish-actions.pod:1813 ../fish/guestfish-actions.pod:1892 ../fish/guestfish-actions.pod:2156 ../src/guestfs-actions.pod:2690 ../src/guestfs-actions.pod:2794 ../src/guestfs-actions.pod:3169 +msgid "" +"Future versions of libguestfs may return other strings here. The caller " +"should be prepared to handle any string." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2247 -msgid "guestfs_head" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1818 +msgid "inspect-get-drive-mappings" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2249 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1820 #, no-wrap msgid "" -" char **\n" -" guestfs_head (guestfs_h *g,\n" -" const char *path);\n" +" inspect-get-drive-mappings root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1517 +#. type: textblock +#: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2706 msgid "" -"This command returns up to the first 10 lines of a file as a list of " -"strings." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:2265 -msgid "guestfs_head_n" +"This call is useful for Windows which uses a primitive system of assigning " +"drive letters (like \"C:\") to partitions. This inspection API examines the " +"Windows Registry to find out how disks/partitions are mapped to drive " +"letters, and returns a hash table as in the example below:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2267 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1828 ../src/guestfs-actions.pod:2712 #, no-wrap msgid "" -" char **\n" -" guestfs_head_n (guestfs_h *g,\n" -" int nrlines,\n" -" const char *path);\n" +" C => /dev/vda2\n" +" E => /dev/vdb1\n" +" F => /dev/vdc1\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1527 +#. type: textblock +#: ../fish/guestfish-actions.pod:1832 ../src/guestfs-actions.pod:2716 msgid "" -"If the parameter C is a positive number, this returns the first " -"C lines of the file C." +"Note that keys are drive letters. For Windows, the key is case insensitive " +"and just contains the drive letter, without the customary colon separator " +"character." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1530 +#. type: textblock +#: ../fish/guestfish-actions.pod:1836 ../src/guestfs-actions.pod:2720 msgid "" -"If the parameter C is a negative number, this returns lines from " -"the file C, excluding the last C lines." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6265 ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:4184 -msgid "If the parameter C is zero, this returns an empty list." +"In future we may support other operating systems that also used drive " +"letters, but the keys for those might not be case insensitive and might be " +"longer than 1 character. For example in OS-9, hard drives were named C, " +"C

etc." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2289 -msgid "guestfs_hexdump" +#. type: textblock +#: ../fish/guestfish-actions.pod:1841 ../src/guestfs-actions.pod:2725 +msgid "" +"For Windows guests, currently only hard drive mappings are returned. " +"Removable disks (eg. DVD-ROMs) are ignored." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2291 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1844 ../src/guestfs-actions.pod:2728 msgid "" -" char *\n" -" guestfs_hexdump (guestfs_h *g,\n" -" const char *path);\n" -"\n" +"For guests that do not use drive mappings, or if the drive mappings could " +"not be determined, this returns an empty hash table." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1542 +#. type: textblock +#: ../fish/guestfish-actions.pod:1847 msgid "" -"This runs C on the given C. The result is the " -"human-readable, canonical hex dump of the file." +"Please read L for more details. See also " +"L, L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6049 ../src/guestfs-actions.pod:6104 -msgid "(Added in 1.0.22)" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1851 +msgid "inspect-get-filesystems" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2306 -msgid "guestfs_initrd_cat" -msgstr "" - -# type: verbatim -#: ../src/guestfs-actions.pod:2308 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1853 #, no-wrap msgid "" -" char *\n" -" guestfs_initrd_cat (guestfs_h *g,\n" -" const char *initrdpath,\n" -" const char *filename,\n" -" size_t *size_r);\n" +" inspect-get-filesystems root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1552 +#. type: textblock +#: ../fish/guestfish-actions.pod:1855 ../src/guestfs-actions.pod:2749 msgid "" -"This command unpacks the file C from the initrd file called " -"C. The filename must be given I the initial C " -"character." +"This returns a list of all the filesystems that we think are associated with " +"this operating system. This includes the root filesystem, other ordinary " +"filesystems, and non-mounted devices like swap partitions." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1556 +#. type: textblock +#: ../fish/guestfish-actions.pod:1860 ../src/guestfs-actions.pod:2754 msgid "" -"For example, in guestfish you could use the following command to examine the " -"boot script (usually called C) contained in a Linux initrd or " -"initramfs image:" +"In the case of a multi-boot virtual machine, it is possible for a filesystem " +"to be shared between operating systems." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1560 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1863 msgid "" -" initrd-cat /boot/initrd-.img init\n" -"\n" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2324 -msgid "See also C." +"Please read L for more details. See also " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2335 -msgid "guestfs_initrd_list" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1866 +msgid "inspect-get-format" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2337 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1868 #, no-wrap msgid "" -" char **\n" -" guestfs_initrd_list (guestfs_h *g,\n" -" const char *path);\n" +" inspect-get-format root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1571 -msgid "This command lists out files contained in an initrd." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1573 +#. type: textblock +#: ../fish/guestfish-actions.pod:1870 ../src/guestfs-actions.pod:2772 msgid "" -"The files are listed without any initial C character. The files are " -"listed in the order they appear (not necessarily alphabetical). Directory " -"names are listed as separate items." +"This returns the format of the inspected operating system. You can use it " +"to detect install images, live CDs and similar." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1577 -msgid "" -"Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as " -"initrd. We I support the newer initramfs format (compressed cpio " -"files)." +#. type: textblock +#: ../fish/guestfish-actions.pod:1873 ../src/guestfs-actions.pod:2775 +msgid "Currently defined formats are:" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2357 -msgid "guestfs_inotify_add_watch" +#. type: =item +#: ../fish/guestfish-actions.pod:1877 ../src/guestfs-actions.pod:2779 +msgid "\"installed\"" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2359 -#, no-wrap -msgid "" -" int64_t\n" -" guestfs_inotify_add_watch (guestfs_h *g,\n" -" const char *path,\n" -" int mask);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:1879 ../src/guestfs-actions.pod:2781 +msgid "This is an installed operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1585 -msgid "Watch C for the events listed in C." +#. type: =item +#: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2783 +msgid "\"installer\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1587 +#. type: textblock +#: ../fish/guestfish-actions.pod:1883 ../src/guestfs-actions.pod:2785 msgid "" -"Note that if C is a directory then events within that directory are " -"watched, but this does I happen recursively (in subdirectories)." +"The disk image being inspected is not an installed operating system, but a " +"I install disk, live CD, or similar." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1591 -msgid "" -"Note for non-C or non-Linux callers: the inotify events are defined by the " -"Linux kernel ABI and are listed in C." +#. type: textblock +#: ../fish/guestfish-actions.pod:1888 ../src/guestfs-actions.pod:2790 +msgid "The format of this disk image is not known." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2378 -msgid "guestfs_inotify_close" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1897 +msgid "inspect-get-hostname" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2380 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1899 #, no-wrap msgid "" -" int\n" -" guestfs_inotify_close (guestfs_h *g);\n" +" inspect-get-hostname root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1599 +#. type: textblock +#: ../fish/guestfish-actions.pod:1901 ../src/guestfs-actions.pod:2810 msgid "" -"This closes the inotify handle which was previously opened by inotify_init. " -"It removes all watches, throws away any pending events, and deallocates all " -"resources." +"This function returns the hostname of the operating system as found by " +"inspection of the guest's configuration files." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2391 -msgid "guestfs_inotify_files" +#. type: textblock +#: ../fish/guestfish-actions.pod:1904 ../src/guestfs-actions.pod:2813 +msgid "" +"If the hostname could not be determined, then the string C is " +"returned." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:1909 +msgid "inspect-get-icon" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2393 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1911 #, no-wrap msgid "" -" char **\n" -" guestfs_inotify_files (guestfs_h *g);\n" +" inspect-get-icon root [favicon:..] [highquality:..]\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2396 +#. type: textblock +#: ../fish/guestfish-actions.pod:1913 ../src/guestfs-actions.pod:2839 msgid "" -"This function is a helpful wrapper around C which just " -"returns a list of pathnames of objects that were touched. The returned " -"pathnames are sorted and deduplicated." +"This function returns an icon corresponding to the inspected operating " +"system. The icon is returned as a buffer containing a PNG image (re-encoded " +"to PNG if necessary)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2406 -msgid "guestfs_inotify_init" +#. type: textblock +#: ../fish/guestfish-actions.pod:1917 ../src/guestfs-actions.pod:2843 +msgid "" +"If it was not possible to get an icon this function returns a zero-length " +"(non-NULL) buffer. I." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2408 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:1920 ../src/guestfs-actions.pod:2846 msgid "" -" int\n" -" guestfs_inotify_init (guestfs_h *g,\n" -" int maxevents);\n" -"\n" +"Libguestfs will start by looking for a file called C or " +"C and if it has the correct format, the contents of " +"this file will be returned. You can disable favicons by passing the " +"optional C boolean as false (default is true)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615 +#. type: textblock +#: ../fish/guestfish-actions.pod:1926 ../src/guestfs-actions.pod:2852 msgid "" -"This command creates a new inotify handle. The inotify subsystem can be " -"used to notify events which happen to objects in the guest filesystem." +"If finding the favicon fails, then we look in other places in the guest for " +"a suitable icon." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2416 +#. type: textblock +#: ../fish/guestfish-actions.pod:1929 ../src/guestfs-actions.pod:2855 msgid "" -"C is the maximum number of events which will be queued up between " -"calls to C or C. If this is " -"passed as C<0>, then the kernel (or previously set) default is used. For " -"Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel " -"throws away events, but records the fact that it threw them away by setting " -"a flag C in the returned structure list (see " -"C)." +"If the optional C boolean is true then only high quality icons " +"are returned, which means only icons of high resolution with an alpha " +"channel. The default (false) is to return any icon we can, even if it is of " +"substandard quality." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2426 +#. type: textblock +#: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:2866 msgid "" -"Before any events are generated, you have to add some watches to the " -"internal watch list. See: C, " -"C and C." +"Unlike most other inspection API calls, the guest's disks must be mounted up " +"before you call this, since it needs to read information from the guest " +"filesystem during the call." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2432 +#. type: textblock +#: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:2872 msgid "" -"Queued up events should be read periodically by calling " -"C (or C which is just a helpful " -"wrapper around C). If you don't read the events out " -"often enough then you risk the internal queue overflowing." +"B The icon data comes from the untrusted guest, and should be " +"treated with caution. PNG files have been known to contain exploits. " +"Ensure that libpng (or other relevant libraries) are fully up to date before " +"trying to process or display the icon." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2439 +#. type: textblock +#: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:2880 msgid "" -"The handle should be closed after use by calling C. " -"This also removes any watches automatically." +"The PNG image returned can be any size. It might not be square. Libguestfs " +"tries to return the largest, highest quality icon available. The " +"application must scale the icon to the required size." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1646 +#. type: textblock +#: ../fish/guestfish-actions.pod:1961 ../src/guestfs-actions.pod:2887 msgid "" -"See also L for an overview of the inotify interface as exposed " -"by the Linux kernel, which is roughly what we expose via libguestfs. Note " -"that there is one global inotify handle per libguestfs instance." +"Extracting icons from Windows guests requires the external C " +"program from the C package, and several programs (C, " +"C, C) from the C package. These must be " +"installed separately." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2452 -msgid "guestfs_inotify_read" +#. type: textblock +#: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:2894 +msgid "" +"Operating system icons are usually trademarks. Seek legal advice before " +"using trademarks in applications." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2454 -#, no-wrap -msgid "" -" struct guestfs_inotify_event_list *\n" -" guestfs_inotify_read (guestfs_h *g);\n" -"\n" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1975 +msgid "inspect-get-major-version" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1655 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1977 +#, no-wrap msgid "" -"Return the complete queue of events that have happened since the previous " -"read call." +" inspect-get-major-version root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1658 -msgid "If no events have happened, this returns an empty list." +#. type: textblock +#: ../fish/guestfish-actions.pod:1979 ../src/guestfs-actions.pod:2935 +msgid "This returns the major version number of the inspected operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1660 +#. type: textblock +#: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:2938 msgid "" -"I: In order to make sure that all events have been read, you must call " -"this function repeatedly until it returns an empty list. The reason is that " -"the call will read events up to the maximum appliance-to-host message size " -"and leave remaining events in the queue." +"Windows uses a consistent versioning scheme which is I reflected in the " +"popular public names used by the operating system. Notably the operating " +"system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = " +"1). You can find out the real versions corresponding to releases of Windows " +"by consulting Wikipedia or MSDN." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2468 -msgid "" -"This function returns a C, or NULL if " -"there was an error. I after use>." +#. type: textblock +#: ../fish/guestfish-actions.pod:1989 ../fish/guestfish-actions.pod:2000 ../src/guestfs-actions.pod:2945 ../src/guestfs-actions.pod:2962 +msgid "If the version could not be determined, then C<0> is returned." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2474 -msgid "guestfs_inotify_rm_watch" +#. type: =head2 +#: ../fish/guestfish-actions.pod:1993 +msgid "inspect-get-minor-version" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2476 +#. type: verbatim +#: ../fish/guestfish-actions.pod:1995 #, no-wrap msgid "" -" int\n" -" guestfs_inotify_rm_watch (guestfs_h *g,\n" -" int wd);\n" +" inspect-get-minor-version root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2480 +#. type: textblock +#: ../fish/guestfish-actions.pod:1997 ../src/guestfs-actions.pod:2959 +msgid "This returns the minor version number of the inspected operating system." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2002 msgid "" -"Remove a previously defined inotify watch. See " -"C." +"Please read L for more details. See also " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2487 -msgid "guestfs_inspect_get_arch" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2005 +msgid "inspect-get-mountpoints" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2489 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2007 #, no-wrap msgid "" -" char *\n" -" guestfs_inspect_get_arch (guestfs_h *g,\n" -" const char *root);\n" +" inspect-get-mountpoints root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2645 ../src/guestfs-actions.pod:2672 ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2726 ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2786 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2872 ../src/guestfs-actions.pod:2895 +#. type: textblock +#: ../fish/guestfish-actions.pod:2009 ../src/guestfs-actions.pod:2977 msgid "" -"This function should only be called with a root device string as returned by " -"C." +"This returns a hash of where we think the filesystems associated with this " +"operating system should be mounted. Callers should note that this is at " +"best an educated guess made by reading configuration files such as " +"C. I that this may return filesystems which " +"are non-existent or not mountable and callers should be prepared to handle " +"or ignore failures if they try to mount them." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2496 +#. type: textblock +#: ../fish/guestfish-actions.pod:2018 ../src/guestfs-actions.pod:2986 msgid "" -"This returns the architecture of the inspected operating system. The " -"possible return values are listed under C." +"Each element in the returned hashtable has a key which is the path of the " +"mountpoint (eg. C) and a value which is the filesystem that would be " +"mounted there (eg. C)." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2023 ../src/guestfs-actions.pod:2991 +msgid "Non-mounted devices such as swap devices are I returned in this list." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1684 +#. type: textblock +#: ../fish/guestfish-actions.pod:2026 msgid "" -"If the architecture could not be determined, then the string C is " -"returned." +"For operating systems like Windows which still use drive letters, this call " +"will only return an entry for the first drive \"mounted on\" C. For " +"information about the mapping of drive letters to partitions, see " +"L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2660 ../src/guestfs-actions.pod:2742 ../src/guestfs-actions.pod:2773 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1761 ../fish/guestfish-actions.pod:1794 ../fish/guestfish-actions.pod:1815 ../fish/guestfish-actions.pod:1875 ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:1916 ../fish/guestfish-actions.pod:1929 ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1980 ../fish/guestfish-actions.pod:2079 ../fish/guestfish-actions.pod:2113 -msgid "Please read L for more details." +#. type: textblock +#: ../fish/guestfish-actions.pod:2032 +msgid "" +"Please read L for more details. See also " +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2510 -msgid "guestfs_inspect_get_distro" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2035 +msgid "inspect-get-package-format" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2512 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2037 #, no-wrap msgid "" -" char *\n" -" guestfs_inspect_get_distro (guestfs_h *g,\n" -" const char *root);\n" +" inspect-get-package-format root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1696 -msgid "This returns the distro (distribution) of the inspected operating system." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1699 -msgid "Currently defined distros are:" +#. type: textblock +#: ../fish/guestfish-actions.pod:2039 +msgid "" +"This function and L return the package " +"format and package management tool used by the inspected operating system. " +"For example for Fedora these functions would return C (package format) " +"and C (package management)." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1703 -msgid "\"archlinux\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2045 ../src/guestfs-actions.pod:3023 +msgid "" +"This returns the string C if we could not determine the package " +"format I if the operating system does not have a real packaging system " +"(eg. Windows)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1705 -msgid "Arch Linux." +#. type: textblock +#: ../fish/guestfish-actions.pod:2049 ../src/guestfs-actions.pod:3027 +msgid "" +"Possible strings include: C, C, C, C, C. " +"Future versions of libguestfs may return other strings." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1707 -msgid "\"debian\"" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2054 +msgid "inspect-get-package-management" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1709 -msgid "Debian." +#. type: verbatim +#: ../fish/guestfish-actions.pod:2056 +#, no-wrap +msgid "" +" inspect-get-package-management root\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1711 -msgid "\"fedora\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2058 +msgid "" +"L and this function return the package format " +"and package management tool used by the inspected operating system. For " +"example for Fedora these functions would return C (package format) and " +"C (package management)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1713 -msgid "Fedora." +#. type: textblock +#: ../fish/guestfish-actions.pod:2064 ../src/guestfs-actions.pod:3049 +msgid "" +"This returns the string C if we could not determine the package " +"management tool I if the operating system does not have a real packaging " +"system (eg. Windows)." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1715 -msgid "\"gentoo\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3053 +msgid "" +"Possible strings include: C, C, C (for all Debian " +"derivatives), C, C, C, C. Future versions of " +"libguestfs may return other strings." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1717 -msgid "Gentoo." +#. type: =head2 +#: ../fish/guestfish-actions.pod:2075 +msgid "inspect-get-product-name" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1719 -msgid "\"linuxmint\"" +#. type: verbatim +#: ../fish/guestfish-actions.pod:2077 +#, no-wrap +msgid "" +" inspect-get-product-name root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1721 -msgid "Linux Mint." +#. type: textblock +#: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3071 +msgid "" +"This returns the product name of the inspected operating system. The " +"product name is generally some freeform string which can be displayed to the " +"user, but should not be parsed by programs." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1723 -msgid "\"mandriva\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2084 ../src/guestfs-actions.pod:3076 +msgid "" +"If the product name could not be determined, then the string C is " +"returned." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1725 -msgid "Mandriva." +#. type: =head2 +#: ../fish/guestfish-actions.pod:2089 +msgid "inspect-get-product-variant" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1727 -msgid "\"meego\"" +#. type: verbatim +#: ../fish/guestfish-actions.pod:2091 +#, no-wrap +msgid "" +" inspect-get-product-variant root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1729 -msgid "MeeGo." +#. type: textblock +#: ../fish/guestfish-actions.pod:2093 ../src/guestfs-actions.pod:3092 +msgid "This returns the product variant of the inspected operating system." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1731 -msgid "\"pardus\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2096 ../src/guestfs-actions.pod:3095 +msgid "" +"For Windows guests, this returns the contents of the Registry key " +"C C " +"which is usually a string such as C or C (other values are " +"possible). This can be used to distinguish consumer and enterprise versions " +"of Windows that have the same version number (for example, Windows 7 and " +"Windows 2008 Server are both version 6.1, but the former is C and " +"the latter is C)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1733 -msgid "Pardus." +#. type: textblock +#: ../fish/guestfish-actions.pod:2105 ../src/guestfs-actions.pod:3104 +msgid "" +"For enterprise Linux guests, in future we intend this to return the product " +"variant such as C, C and so on. But this is not " +"implemented at present." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1735 -msgid "\"redhat-based\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2109 ../src/guestfs-actions.pod:3108 +msgid "" +"If the product variant could not be determined, then the string C " +"is returned." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1737 -msgid "Some Red Hat-derived distro." +#. type: textblock +#: ../fish/guestfish-actions.pod:2112 +msgid "" +"Please read L for more details. See also " +"L, L." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1739 -msgid "\"rhel\"" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2116 +msgid "inspect-get-roots" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1741 -msgid "Red Hat Enterprise Linux and some derivatives." +#. type: verbatim +#: ../fish/guestfish-actions.pod:2118 +#, no-wrap +msgid "" +" inspect-get-roots\n" +"\n" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1743 -msgid "\"ubuntu\"" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1745 -msgid "Ubuntu." +#. type: textblock +#: ../fish/guestfish-actions.pod:2120 +msgid "" +"This function is a convenient way to get the list of root devices, as " +"returned from a previous call to L, but without redoing the " +"whole inspection process." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2850 ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1955 -msgid "\"unknown\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2124 +msgid "" +"This returns an empty list if either no root devices were found or the " +"caller has not called L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1749 -msgid "The distro could not be determined." +#. type: =head2 +#: ../fish/guestfish-actions.pod:2129 +msgid "inspect-get-type" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2842 ../fish/guestfish-actions.pod:1751 ../fish/guestfish-actions.pod:1947 -msgid "\"windows\"" +#. type: verbatim +#: ../fish/guestfish-actions.pod:2131 +#, no-wrap +msgid "" +" inspect-get-type root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1753 +#. type: textblock +#: ../fish/guestfish-actions.pod:2133 ../src/guestfs-actions.pod:3146 msgid "" -"Windows does not have distributions. This string is returned if the OS type " -"is Windows." +"This returns the type of the inspected operating system. Currently defined " +"types are:" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1758 ../fish/guestfish-actions.pod:1961 -msgid "" -"Future versions of libguestfs may return other strings here. The caller " -"should be prepared to handle any string." +#. type: =item +#: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3151 +msgid "\"linux\"" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2591 -msgid "guestfs_inspect_get_filesystems" +#. type: textblock +#: ../fish/guestfish-actions.pod:2140 ../src/guestfs-actions.pod:3153 +msgid "Any Linux-based operating system." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2593 -#, no-wrap -msgid "" -" char **\n" -" guestfs_inspect_get_filesystems (guestfs_h *g,\n" -" const char *root);\n" -"\n" +#. type: textblock +#: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3157 +msgid "Any Microsoft Windows operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1770 -msgid "" -"This returns a list of all the filesystems that we think are associated with " -"this operating system. This includes the root filesystem, other ordinary " -"filesystems, and non-mounted devices like swap partitions." +#. type: =item +#: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3159 +msgid "\"freebsd\"" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1775 -msgid "" -"In the case of a multi-boot virtual machine, it is possible for a filesystem " -"to be shared between operating systems." +#. type: textblock +#: ../fish/guestfish-actions.pod:2148 ../src/guestfs-actions.pod:3161 +msgid "FreeBSD." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2608 -msgid "" -"Please read L for more details. See also " -"C." +#. type: textblock +#: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3165 +msgid "The operating system type could not be determined." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2617 -msgid "guestfs_inspect_get_hostname" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2161 +msgid "inspect-get-windows-current-control-set" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2619 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2163 #, no-wrap msgid "" -" char *\n" -" guestfs_inspect_get_hostname (guestfs_h *g,\n" -" const char *root);\n" +" inspect-get-windows-current-control-set root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1788 +#. type: textblock +#: ../fish/guestfish-actions.pod:2165 ../src/guestfs-actions.pod:3185 msgid "" -"This function returns the hostname of the operating system as found by " -"inspection of the guest's configuration files." +"This returns the Windows CurrentControlSet of the inspected guest. The " +"CurrentControlSet is a registry key name such as C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1791 +#. type: textblock +#: ../fish/guestfish-actions.pod:2168 ../src/guestfs-actions.pod:3188 msgid "" -"If the hostname could not be determined, then the string C is " -"returned." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2637 -msgid "(Added in 1.7.9)" +"This call assumes that the guest is Windows and that the Registry could be " +"examined by inspection. If this is not the case then an error is returned." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2639 -msgid "guestfs_inspect_get_major_version" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2174 +msgid "inspect-get-windows-systemroot" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2641 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2176 #, no-wrap msgid "" -" int\n" -" guestfs_inspect_get_major_version (guestfs_h *g,\n" -" const char *root);\n" +" inspect-get-windows-systemroot root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1803 -msgid "This returns the major version number of the inspected operating system." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1806 +#. type: textblock +#: ../fish/guestfish-actions.pod:2178 ../src/guestfs-actions.pod:3205 msgid "" -"Windows uses a consistent versioning scheme which is I reflected in the " -"popular public names used by the operating system. Notably the operating " -"system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = " -"1). You can find out the real versions corresponding to releases of Windows " -"by consulting Wikipedia or MSDN." +"This returns the Windows systemroot of the inspected guest. The systemroot " +"is a directory path such as C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2678 ../fish/guestfish-actions.pod:1813 ../fish/guestfish-actions.pod:1827 -msgid "If the version could not be determined, then C<0> is returned." +#. type: textblock +#: ../fish/guestfish-actions.pod:2181 ../src/guestfs-actions.pod:3208 +msgid "" +"This call assumes that the guest is Windows and that the systemroot could be " +"determined by inspection. If this is not the case then an error is " +"returned." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2666 -msgid "guestfs_inspect_get_minor_version" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2187 +msgid "inspect-is-live" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2668 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2189 #, no-wrap msgid "" -" int\n" -" guestfs_inspect_get_minor_version (guestfs_h *g,\n" -" const char *root);\n" +" inspect-is-live root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1824 -msgid "This returns the minor version number of the inspected operating system." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2680 +#. type: textblock +#: ../fish/guestfish-actions.pod:2191 msgid "" -"Please read L for more details. See also " -"C." +"If L returns C (this is an install disk), " +"then this returns true if a live image was detected on the disk." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2687 -msgid "guestfs_inspect_get_mountpoints" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2197 +msgid "inspect-is-multipart" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2689 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2199 #, no-wrap msgid "" -" char **\n" -" guestfs_inspect_get_mountpoints (guestfs_h *g,\n" -" const char *root);\n" +" inspect-is-multipart root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2696 ../fish/guestfish-actions.pod:1839 +#. type: textblock +#: ../fish/guestfish-actions.pod:2201 msgid "" -"This returns a hash of where we think the filesystems associated with this " -"operating system should be mounted. Callers should note that this is at " -"best an educated guess made by reading configuration files such as " -"C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2701 ../fish/guestfish-actions.pod:1844 -msgid "" -"Each element in the returned hashtable has a key which is the path of the " -"mountpoint (eg. C) and a value which is the filesystem that would be " -"mounted there (eg. C)." +"If L returns C (this is an install disk), " +"then this returns true if the disk is part of a set." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1849 -msgid "Non-mounted devices such as swap devices are I returned in this list." +#. type: =head2 +#: ../fish/guestfish-actions.pod:2207 +msgid "inspect-is-netinst" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2709 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2209 +#, no-wrap msgid "" -"Please read L for more details. See also " -"C." +" inspect-is-netinst root\n" +"\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:6406 +#. type: textblock +#: ../fish/guestfish-actions.pod:2211 msgid "" -"This function returns a NULL-terminated array of strings, or NULL if there " -"was an error. The array of strings will always have length C<2n+1>, where " -"C keys and values alternate, followed by the trailing NULL entry. I." +"If L returns C (this is an install disk), " +"then this returns true if the disk is a network installer, ie. not a " +"self-contained install CD but one which is likely to require network access " +"to complete the install." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2720 -msgid "guestfs_inspect_get_package_format" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2219 +msgid "inspect-list-applications" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2722 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2221 #, no-wrap msgid "" -" char *\n" -" guestfs_inspect_get_package_format (guestfs_h *g,\n" -" const char *root);\n" +" inspect-list-applications root\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2729 -msgid "" -"This function and C return the " -"package format and package management tool used by the inspected operating " -"system. For example for Fedora these functions would return C (package " -"format) and C (package management)." +#. type: textblock +#: ../fish/guestfish-actions.pod:2223 ../src/guestfs-actions.pod:3275 +msgid "Return the list of applications installed in the operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1868 +#. type: textblock +#: ../fish/guestfish-actions.pod:2225 msgid "" -"This returns the string C if we could not determine the package " -"format I if the operating system does not have a real packaging system " -"(eg. Windows)." +"I This call works differently from other parts of the inspection " +"API. You have to call L, then L, " +"then mount up the disks, before calling this. Listing applications is a " +"significantly more difficult operation which requires access to the full " +"filesystem. Also note that unlike the other L calls which " +"are just returning data cached in the libguestfs handle, this call actually " +"reads parts of the mounted filesystems during the call." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2739 ../fish/guestfish-actions.pod:1872 +#. type: textblock +#: ../fish/guestfish-actions.pod:2235 ../src/guestfs-actions.pod:3287 msgid "" -"Possible strings include: C, C, C, C, C. " -"Future versions of libguestfs may return other strings." +"This returns an empty list if the inspection code was not able to determine " +"the list of applications." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2778 -msgid "(Added in 1.7.5)" +#. type: textblock +#: ../fish/guestfish-actions.pod:2238 ../src/guestfs-actions.pod:3290 +msgid "The application structure contains the following fields:" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2749 -msgid "guestfs_inspect_get_package_management" +#. type: =item +#: ../fish/guestfish-actions.pod:2242 ../src/guestfs-actions.pod:3294 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2751 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:2244 ../src/guestfs-actions.pod:3296 msgid "" -" char *\n" -" guestfs_inspect_get_package_management (guestfs_h *g,\n" -" const char *root);\n" -"\n" +"The name of the application. For Red Hat-derived and Debian-derived Linux " +"guests, this is the package name." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2758 -msgid "" -"C and this function return the package " -"format and package management tool used by the inspected operating system. " -"For example for Fedora these functions would return C (package format) " -"and C (package management)." +#. type: =item +#: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3299 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2764 ../fish/guestfish-actions.pod:1890 +#. type: textblock +#: ../fish/guestfish-actions.pod:2249 ../src/guestfs-actions.pod:3301 msgid "" -"This returns the string C if we could not determine the package " -"management tool I if the operating system does not have a real packaging " -"system (eg. Windows)." +"The display name of the application, sometimes localized to the install " +"language of the guest operating system." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1894 +#. type: textblock +#: ../fish/guestfish-actions.pod:2252 ../src/guestfs-actions.pod:3304 msgid "" -"Possible strings include: C, C, C (for all Debian " -"derivatives), C, C, C, C. Future versions of " -"libguestfs may return other strings." +"If unavailable this is returned as an empty string C<\"\">. Callers needing " +"to display something can use C instead." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2780 -msgid "guestfs_inspect_get_product_name" +#. type: =item +#: ../fish/guestfish-actions.pod:2255 ../src/guestfs-actions.pod:3307 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2782 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:2257 ../src/guestfs-actions.pod:3309 msgid "" -" char *\n" -" guestfs_inspect_get_product_name (guestfs_h *g,\n" -" const char *root);\n" -"\n" +"For package managers which use epochs, this contains the epoch of the " +"package (an integer). If unavailable, this is returned as C<0>." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2789 ../fish/guestfish-actions.pod:1908 -msgid "" -"This returns the product name of the inspected operating system. The " -"product name is generally some freeform string which can be displayed to the " -"user, but should not be parsed by programs." +#. type: =item +#: ../fish/guestfish-actions.pod:2260 ../src/guestfs-actions.pod:3312 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2794 ../fish/guestfish-actions.pod:1913 +#. type: textblock +#: ../fish/guestfish-actions.pod:2262 ../src/guestfs-actions.pod:3314 msgid "" -"If the product name could not be determined, then the string C is " -"returned." +"The version string of the application or package. If unavailable this is " +"returned as an empty string C<\"\">." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2804 -msgid "guestfs_inspect_get_roots" +#. type: =item +#: ../fish/guestfish-actions.pod:2265 ../src/guestfs-actions.pod:3317 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2806 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3319 msgid "" -" char **\n" -" guestfs_inspect_get_roots (guestfs_h *g);\n" -"\n" +"The release string of the application or package, for package managers that " +"use this. If unavailable this is returned as an empty string C<\"\">." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2809 -msgid "" -"This function is a convenient way to get the list of root devices, as " -"returned from a previous call to C, but without redoing " -"the whole inspection process." +#. type: =item +#: ../fish/guestfish-actions.pod:2271 ../src/guestfs-actions.pod:3323 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2813 +#. type: textblock +#: ../fish/guestfish-actions.pod:2273 ../src/guestfs-actions.pod:3325 msgid "" -"This returns an empty list if either no root devices were found or the " -"caller has not called C." +"The installation path of the application (on operating systems such as " +"Windows which use installation paths). This path is in the format used by " +"the guest operating system, it is not a libguestfs path." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2822 -msgid "(Added in 1.7.3)" +#. type: textblock +#: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3330 +msgid "If unavailable this is returned as an empty string C<\"\">." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2824 -msgid "guestfs_inspect_get_type" +#. type: =item +#: ../fish/guestfish-actions.pod:2280 ../src/guestfs-actions.pod:3332 +msgid "C" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2826 -#, no-wrap +#. type: textblock +#: ../fish/guestfish-actions.pod:2282 ../src/guestfs-actions.pod:3334 msgid "" -" char *\n" -" guestfs_inspect_get_type (guestfs_h *g,\n" -" const char *root);\n" -"\n" +"The install path translated into a libguestfs path. If unavailable this is " +"returned as an empty string C<\"\">." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2833 ../fish/guestfish-actions.pod:1938 -msgid "" -"This returns the type of the inspected operating system. Currently defined " -"types are:" +#. type: =item +#: ../fish/guestfish-actions.pod:2285 ../src/guestfs-actions.pod:3337 +msgid "C" msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:1943 -msgid "\"linux\"" +#. type: textblock +#: ../fish/guestfish-actions.pod:2287 ../src/guestfs-actions.pod:3339 +msgid "" +"The name of the publisher of the application, for package managers that use " +"this. If unavailable this is returned as an empty string C<\"\">." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2840 ../fish/guestfish-actions.pod:1945 -msgid "Any Linux-based operating system." +#. type: =item +#: ../fish/guestfish-actions.pod:2291 ../src/guestfs-actions.pod:3343 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2844 ../fish/guestfish-actions.pod:1949 -msgid "Any Microsoft Windows operating system." +#. type: textblock +#: ../fish/guestfish-actions.pod:2293 ../src/guestfs-actions.pod:3345 +msgid "" +"The URL (eg. upstream URL) of the application. If unavailable this is " +"returned as an empty string C<\"\">." msgstr "" -# type: =item -#: ../src/guestfs-actions.pod:2846 ../fish/guestfish-actions.pod:1951 -msgid "\"freebsd\"" +#. type: =item +#: ../fish/guestfish-actions.pod:2296 ../src/guestfs-actions.pod:3348 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1953 -msgid "FreeBSD." +#. type: textblock +#: ../fish/guestfish-actions.pod:2298 ../src/guestfs-actions.pod:3350 +msgid "" +"For packaging systems which support this, the name of the source package. " +"If unavailable this is returned as an empty string C<\"\">." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1957 -msgid "The operating system type could not be determined." +#. type: =item +#: ../fish/guestfish-actions.pod:2301 ../src/guestfs-actions.pod:3353 +msgid "C" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:2866 -msgid "guestfs_inspect_get_windows_systemroot" +#. type: textblock +#: ../fish/guestfish-actions.pod:2303 ../src/guestfs-actions.pod:3355 +msgid "" +"A short (usually one line) description of the application or package. If " +"unavailable this is returned as an empty string C<\"\">." msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2868 -#, no-wrap -msgid "" -" char *\n" -" guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n" -" const char *root);\n" -"\n" +#. type: =item +#: ../fish/guestfish-actions.pod:2306 ../src/guestfs-actions.pod:3358 +msgid "C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2875 ../fish/guestfish-actions.pod:1973 +#. type: textblock +#: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3360 msgid "" -"This returns the Windows systemroot of the inspected guest. The systemroot " -"is a directory path such as C." +"A longer description of the application or package. If unavailable this is " +"returned as an empty string C<\"\">." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:2878 ../fish/guestfish-actions.pod:1976 -msgid "" -"This call assumes that the guest is Windows and that the systemroot could be " -"determined by inspection. If this is not the case then an error is " -"returned." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2887 -msgid "(Added in 1.5.25)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:2889 -msgid "guestfs_inspect_list_applications" -msgstr "" - -# type: verbatim -#: ../src/guestfs-actions.pod:2891 -#, no-wrap -msgid "" -" struct guestfs_application_list *\n" -" guestfs_inspect_list_applications (guestfs_h *g,\n" -" const char *root);\n" -"\n" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1989 -msgid "Return the list of applications installed in the operating system." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2900 -msgid "" -"I This call works differently from other parts of the inspection " -"API. You have to call C, then " -"C, then mount up the disks, before calling " -"this. Listing applications is a significantly more difficult operation " -"which requires access to the full filesystem. Also note that unlike the " -"other C calls which are just returning data cached in " -"the libguestfs handle, this call actually reads parts of the mounted " -"filesystems during the call." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2001 -msgid "" -"This returns an empty list if the inspection code was not able to determine " -"the list of applications." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:2004 -msgid "The application structure contains the following fields:" -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2917 ../fish/guestfish-actions.pod:2008 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2010 -msgid "" -"The name of the application. For Red Hat-derived and Debian-derived Linux " -"guests, this is the package name." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2922 ../fish/guestfish-actions.pod:2013 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2924 ../fish/guestfish-actions.pod:2015 -msgid "" -"The display name of the application, sometimes localized to the install " -"language of the guest operating system." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2927 ../fish/guestfish-actions.pod:2018 -msgid "" -"If unavailable this is returned as an empty string C<\"\">. Callers needing " -"to display something can use C instead." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2021 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2932 ../fish/guestfish-actions.pod:2023 -msgid "" -"For package managers which use epochs, this contains the epoch of the " -"package (an integer). If unavailable, this is returned as C<0>." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2026 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2937 ../fish/guestfish-actions.pod:2028 -msgid "" -"The version string of the application or package. If unavailable this is " -"returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2940 ../fish/guestfish-actions.pod:2031 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2942 ../fish/guestfish-actions.pod:2033 -msgid "" -"The release string of the application or package, for package managers that " -"use this. If unavailable this is returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2037 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2948 ../fish/guestfish-actions.pod:2039 -msgid "" -"The installation path of the application (on operating systems such as " -"Windows which use installation paths). This path is in the format used by " -"the guest operating system, it is not a libguestfs path." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2953 ../fish/guestfish-actions.pod:2044 -msgid "If unavailable this is returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2046 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2957 ../fish/guestfish-actions.pod:2048 -msgid "" -"The install path translated into a libguestfs path. If unavailable this is " -"returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2051 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2962 ../fish/guestfish-actions.pod:2053 -msgid "" -"The name of the publisher of the application, for package managers that use " -"this. If unavailable this is returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2966 ../fish/guestfish-actions.pod:2057 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2968 ../fish/guestfish-actions.pod:2059 -msgid "" -"The URL (eg. upstream URL) of the application. If unavailable this is " -"returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2971 ../fish/guestfish-actions.pod:2062 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2973 ../fish/guestfish-actions.pod:2064 -msgid "" -"For packaging systems which support this, the name of the source package. " -"If unavailable this is returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2067 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2069 -msgid "" -"A short (usually one line) description of the application or package. If " -"unavailable this is returned as an empty string C<\"\">." -msgstr "" - -# type: =item -#: ../src/guestfs-actions.pod:2981 ../fish/guestfish-actions.pod:2072 -msgid "C" -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2983 ../fish/guestfish-actions.pod:2074 -msgid "" -"A longer description of the application or package. If unavailable this is " -"returned as an empty string C<\"\">." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2990 -msgid "" -"This function returns a C, or NULL if " -"there was an error. I " -"after use>." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:2994 -msgid "(Added in 1.7.8)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:2996 -msgid "guestfs_inspect_os" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2315 +msgid "inspect-os" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:2998 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2317 #, no-wrap msgid "" -" char **\n" -" guestfs_inspect_os (guestfs_h *g);\n" +" inspect-os\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2085 +#. type: textblock +#: ../fish/guestfish-actions.pod:2319 ../src/guestfs-actions.pod:3378 msgid "" "This function uses other libguestfs functions and certain heuristics to " "inspect the disk(s) (usually disks belonging to a virtual machine), looking " "for operating systems." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2089 +#. type: textblock +#: ../fish/guestfish-actions.pod:2323 ../src/guestfs-actions.pod:3382 msgid "The list returned is empty if no operating systems were found." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2091 +#. type: textblock +#: ../fish/guestfish-actions.pod:2325 ../src/guestfs-actions.pod:3384 msgid "" "If one operating system was found, then this returns a list with a single " "element, which is the name of the root filesystem of this operating system. " @@ -9301,484 +8517,545 @@ msgid "" "element being the root filesystem of one of the operating systems." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3014 +#. type: textblock +#: ../fish/guestfish-actions.pod:2332 msgid "" -"You can pass the root string(s) returned to other C " +"You can pass the root string(s) returned to other L " "functions in order to query further information about each operating system, " "such as the name and version." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3019 +#. type: textblock +#: ../fish/guestfish-actions.pod:2337 msgid "" -"This function uses other libguestfs features such as C and " -"C in order to mount and unmount filesystems and look at " -"the contents. This should be called with no disks currently mounted. The " +"This function uses other libguestfs features such as L and " +"L in order to mount and unmount filesystems and look at the " +"contents. This should be called with no disks currently mounted. The " "function may also use Augeas, so any existing Augeas handle will be closed." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:2109 +#. type: textblock +#: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3402 msgid "" "This function cannot decrypt encrypted disks. The caller must do that first " "(supplying the necessary keys) if the disk is encrypted." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3376 -msgid "See also C." +#. type: textblock +#: ../fish/guestfish-actions.pod:2349 ../fish/guestfish-actions.pod:2547 ../fish/guestfish-actions.pod:2606 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3039 -msgid "guestfs_is_blockdev" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2351 +msgid "is-blockdev" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3041 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2353 #, no-wrap msgid "" -" int\n" -" guestfs_is_blockdev (guestfs_h *g,\n" -" const char *path);\n" +" is-blockdev path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3045 ../fish/guestfish-actions.pod:2121 +#. type: textblock +#: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3422 msgid "" "This returns C if and only if there is a block device with the given " "C name." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3122 ../src/guestfs-actions.pod:3138 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3209 -msgid "See also C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3081 ../src/guestfs-actions.pod:3126 ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3213 -msgid "(Added in 1.5.10)" +#. type: textblock +#: ../fish/guestfish-actions.pod:2358 ../fish/guestfish-actions.pod:2376 ../fish/guestfish-actions.pod:2395 ../fish/guestfish-actions.pod:2404 ../fish/guestfish-actions.pod:2414 ../fish/guestfish-actions.pod:2448 ../fish/guestfish-actions.pod:2457 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3054 -msgid "guestfs_is_busy" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2360 +msgid "is-busy" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3056 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2362 #, no-wrap msgid "" -" int\n" -" guestfs_is_busy (guestfs_h *g);\n" +" is-busy\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3059 ../fish/guestfish-actions.pod:2130 +#. type: textblock +#: ../fish/guestfish-actions.pod:2364 ../src/guestfs-actions.pod:3436 msgid "" "This returns true iff this handle is busy processing a command (in the " "C state)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3068 -msgid "guestfs_is_chardev" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2369 +msgid "is-chardev" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3070 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2371 #, no-wrap msgid "" -" int\n" -" guestfs_is_chardev (guestfs_h *g,\n" -" const char *path);\n" +" is-chardev path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2139 +#. type: textblock +#: ../fish/guestfish-actions.pod:2373 ../src/guestfs-actions.pod:3451 msgid "" "This returns C if and only if there is a character device with the " "given C name." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3083 -msgid "guestfs_is_config" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2378 +msgid "is-config" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3085 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2380 #, no-wrap msgid "" -" int\n" -" guestfs_is_config (guestfs_h *g);\n" +" is-config\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2148 +#. type: textblock +#: ../fish/guestfish-actions.pod:2382 ../src/guestfs-actions.pod:3465 msgid "" "This returns true iff this handle is being configured (in the C " "state)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3097 -msgid "guestfs_is_dir" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2387 +msgid "is-dir" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3099 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2389 #, no-wrap msgid "" -" int\n" -" guestfs_is_dir (guestfs_h *g,\n" -" const char *path);\n" +" is-dir path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2157 +#. type: textblock +#: ../fish/guestfish-actions.pod:2391 ../src/guestfs-actions.pod:3480 msgid "" "This returns C if and only if there is a directory with the given " "C name. Note that it returns false for other objects like files." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3113 -msgid "guestfs_is_fifo" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2397 +msgid "is-fifo" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3115 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2399 #, no-wrap msgid "" -" int\n" -" guestfs_is_fifo (guestfs_h *g,\n" -" const char *path);\n" +" is-fifo path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2167 +#. type: textblock +#: ../fish/guestfish-actions.pod:2401 ../src/guestfs-actions.pod:3496 msgid "" "This returns C if and only if there is a FIFO (named pipe) with the " "given C name." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3128 -msgid "guestfs_is_file" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2406 +msgid "is-file" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3130 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2408 #, no-wrap msgid "" -" int\n" -" guestfs_is_file (guestfs_h *g,\n" -" const char *path);\n" +" is-file path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2176 +#. type: textblock +#: ../fish/guestfish-actions.pod:2410 ../src/guestfs-actions.pod:3511 msgid "" "This returns C if and only if there is a regular file with the given " "C name. Note that it returns false for other objects like " "directories." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3144 -msgid "guestfs_is_launching" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2416 +msgid "is-launching" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3146 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2418 #, no-wrap msgid "" -" int\n" -" guestfs_is_launching (guestfs_h *g);\n" +" is-launching\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3149 ../fish/guestfish-actions.pod:2186 +#. type: textblock +#: ../fish/guestfish-actions.pod:2420 ../src/guestfs-actions.pod:3526 msgid "" "This returns true iff this handle is launching the subprocess (in the " "C state)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3158 -msgid "guestfs_is_lv" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2425 +msgid "is-lv" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3160 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2427 #, no-wrap msgid "" -" int\n" -" guestfs_is_lv (guestfs_h *g,\n" -" const char *device);\n" +" is-lv device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2195 +#. type: textblock +#: ../fish/guestfish-actions.pod:2429 ../src/guestfs-actions.pod:3541 msgid "" "This command tests whether C is a logical volume, and returns true " "iff this is the case." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3171 -msgid "guestfs_is_ready" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2432 +msgid "is-ready" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3173 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2434 #, no-wrap msgid "" -" int\n" -" guestfs_is_ready (guestfs_h *g);\n" +" is-ready\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2202 +#. type: textblock +#: ../fish/guestfish-actions.pod:2436 ../src/guestfs-actions.pod:3553 msgid "" "This returns true iff this handle is ready to accept commands (in the " "C state)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3185 -msgid "guestfs_is_socket" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2441 +msgid "is-socket" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3187 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2443 #, no-wrap msgid "" -" int\n" -" guestfs_is_socket (guestfs_h *g,\n" -" const char *path);\n" +" is-socket path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2211 +#. type: textblock +#: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3568 msgid "" "This returns C if and only if there is a Unix domain socket with the " "given C name." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3200 -msgid "guestfs_is_symlink" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2450 +msgid "is-symlink" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3202 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2452 #, no-wrap msgid "" -" int\n" -" guestfs_is_symlink (guestfs_h *g,\n" -" const char *path);\n" +" is-symlink path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2220 +#. type: textblock +#: ../fish/guestfish-actions.pod:2454 ../src/guestfs-actions.pod:3583 msgid "" "This returns C if and only if there is a symbolic link with the given " "C name." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3215 -msgid "guestfs_kill_subprocess" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2459 +msgid "is-zero" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3217 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2461 #, no-wrap msgid "" -" int\n" -" guestfs_kill_subprocess (guestfs_h *g);\n" +" is-zero path\n" +"\n" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3598 +msgid "" +"This returns true iff the file exists and the file is empty or it contains " +"all zero bytes." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:2466 +msgid "is-zero-device" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:2468 +#, no-wrap +msgid "" +" is-zero-device device\n" +"\n" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3611 +msgid "This returns true iff the device exists and contains all zero bytes." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2472 ../src/guestfs-actions.pod:3613 +msgid "Note that for large devices this can take a long time to run." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:2474 +msgid "kill-subprocess" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:2476 +#, no-wrap +msgid "" +" kill-subprocess\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2229 +#. type: textblock +#: ../fish/guestfish-actions.pod:2478 ../src/guestfs-actions.pod:3624 msgid "This kills the qemu subprocess. You should never need to call this." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3226 -msgid "guestfs_launch" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2480 +msgid "launch" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3228 +#. type: =head2 +#: ../fish/guestfish-actions.pod:2482 +msgid "run" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:2484 #, no-wrap msgid "" -" int\n" -" guestfs_launch (guestfs_h *g);\n" +" launch\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3231 ../fish/guestfish-actions.pod:2237 +#. type: textblock +#: ../fish/guestfish-actions.pod:2486 ../src/guestfs-actions.pod:3635 msgid "" "Internally libguestfs is implemented by running a virtual machine using " "L." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2240 +#. type: textblock +#: ../fish/guestfish-actions.pod:2489 ../src/guestfs-actions.pod:3638 msgid "" "You should call this after configuring the handle (eg. adding drives) but " "before performing any actions." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3241 -msgid "guestfs_lchown" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2492 +msgid "lchown" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3243 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2494 #, no-wrap msgid "" -" int\n" -" guestfs_lchown (guestfs_h *g,\n" -" int owner,\n" -" int group,\n" -" const char *path);\n" +" lchown owner group path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3249 +#. type: textblock +#: ../fish/guestfish-actions.pod:2496 msgid "" "Change the file owner to C and group to C. This is like " -"C but if C is a symlink then the link itself is " -"changed, not the target." +"L but if C is a symlink then the link itself is changed, not " +"the target." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3261 -msgid "guestfs_lgetxattr" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2504 +msgid "lgetxattr" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3263 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2506 #, no-wrap msgid "" -" char *\n" -" guestfs_lgetxattr (guestfs_h *g,\n" -" const char *path,\n" -" const char *name,\n" -" size_t *size_r);\n" +" lgetxattr path name\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:2259 +#. type: textblock +#: ../fish/guestfish-actions.pod:2508 ../src/guestfs-actions.pod:3678 msgid "" "Get a single extended attribute from file C named C. If C " "is a symlink, then this call returns an extended attribute from the symlink." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3283 -msgid "See also: C, C, L." +#. type: textblock +#: ../fish/guestfish-actions.pod:2522 +msgid "See also: L, L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3289 -msgid "guestfs_lgetxattrs" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2524 +msgid "lgetxattrs" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3291 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2526 #, no-wrap msgid "" -" struct guestfs_xattr_list *\n" -" guestfs_lgetxattrs (guestfs_h *g,\n" -" const char *path);\n" +" lgetxattrs path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3295 +#. type: textblock +#: ../fish/guestfish-actions.pod:2528 msgid "" -"This is the same as C, but if C is a symbolic link, " -"then it returns the extended attributes of the link itself." +"This is the same as L, but if C is a symbolic link, then " +"it returns the extended attributes of the link itself." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3305 -msgid "guestfs_list_devices" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2532 +msgid "list-9p" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3307 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2534 #, no-wrap msgid "" -" char **\n" -" guestfs_list_devices (guestfs_h *g);\n" +" list-9p\n" +"\n" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2536 ../src/guestfs-actions.pod:3721 +msgid "" +"List all 9p filesystems attached to the guest. A list of mount tags is " +"returned." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:2539 +msgid "list-devices" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:2541 +#, no-wrap +msgid "" +" list-devices\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3310 ../fish/guestfish-actions.pod:2287 +#. type: textblock +#: ../fish/guestfish-actions.pod:2543 ../src/guestfs-actions.pod:3735 msgid "List all the block devices." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2289 +#. type: textblock +#: ../fish/guestfish-actions.pod:2545 ../src/guestfs-actions.pod:3737 msgid "The full block device names are returned, eg. C." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3322 -msgid "guestfs_list_filesystems" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2549 +msgid "list-dm-devices" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3324 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2551 #, no-wrap msgid "" -" char **\n" -" guestfs_list_filesystems (guestfs_h *g);\n" +" list-dm-devices\n" +"\n" +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2553 ../src/guestfs-actions.pod:3752 +msgid "List all device mapper devices." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2555 +msgid "" +"The returned list contains C devices, eg. ones created by a " +"previous call to L." +msgstr "" + +#. type: textblock +#: ../fish/guestfish-actions.pod:2558 +msgid "" +"Device mapper devices which correspond to logical volumes are I " +"returned in this list. Call L if you want to list logical volumes." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:2562 +msgid "list-filesystems" +msgstr "" + +#. type: verbatim +#: ../fish/guestfish-actions.pod:2564 +#, no-wrap +msgid "" +" list-filesystems\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2297 +#. type: textblock +#: ../fish/guestfish-actions.pod:2566 ../src/guestfs-actions.pod:3772 msgid "" "This inspection command looks for filesystems on partitions, block devices " "and logical volumes, returning a list of devices containing filesystems and " "their type." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2301 +#. type: textblock +#: ../fish/guestfish-actions.pod:2570 ../src/guestfs-actions.pod:3776 msgid "" "The return value is a hash, where the keys are the devices containing " "filesystems, and the values are the filesystem types. For example:" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3335 ../fish/guestfish-actions.pod:2305 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2574 ../src/guestfs-actions.pod:3780 #, no-wrap msgid "" " \"/dev/sda1\" => \"ntfs\"\n" @@ -9788,725 +9065,620 @@ msgid "" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2310 +#. type: textblock +#: ../fish/guestfish-actions.pod:2579 ../src/guestfs-actions.pod:3785 msgid "" "The value can have the special value \"unknown\", meaning the content of the " "device is undetermined or empty. \"swap\" means a Linux swap partition." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3344 +#. type: textblock +#: ../fish/guestfish-actions.pod:2583 msgid "" -"This command runs other libguestfs commands, which might include " -"C and C, and therefore you should use this " -"soon after launch and only when nothing is mounted." +"This command runs other libguestfs commands, which might include L " +"and L, and therefore you should use this soon after launch and only " +"when nothing is mounted." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3348 +#. type: textblock +#: ../fish/guestfish-actions.pod:2587 msgid "" "Not all of the filesystems returned will be mountable. In particular, swap " "partitions are returned in the list. Also this command does not check that " "each filesystem found is valid and mountable, and some filesystems might be " "mountable but require special options. Filesystems may not all belong to a " -"single logical operating system (use C to look for " -"OSes)." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:3362 ../src/guestfs-actions.pod:4951 -msgid "(Added in 1.5.15)" +"single logical operating system (use L to look for OSes)." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3364 -msgid "guestfs_list_partitions" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2595 +msgid "list-partitions" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3366 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2597 #, no-wrap msgid "" -" char **\n" -" guestfs_list_partitions (guestfs_h *g);\n" +" list-partitions\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2330 +#. type: textblock +#: ../fish/guestfish-actions.pod:2599 ../src/guestfs-actions.pod:3814 msgid "List all the partitions detected on all block devices." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2332 +#. type: textblock +#: ../fish/guestfish-actions.pod:2601 ../src/guestfs-actions.pod:3816 msgid "The full partition device names are returned, eg. C" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3373 +#. type: textblock +#: ../fish/guestfish-actions.pod:2603 msgid "" "This does not return logical volumes. For that you will need to call " -"C." +"L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3384 -msgid "guestfs_ll" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2608 +msgid "ll" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3386 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2610 #, no-wrap msgid "" -" char *\n" -" guestfs_ll (guestfs_h *g,\n" -" const char *directory);\n" +" ll directory\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2343 +#. type: textblock +#: ../fish/guestfish-actions.pod:2612 ../src/guestfs-actions.pod:3835 msgid "" "List the files in C (relative to the root directory, there is no " "cwd) in the format of 'ls -la'." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3393 ../fish/guestfish-actions.pod:2346 +#. type: textblock +#: ../fish/guestfish-actions.pod:2615 ../src/guestfs-actions.pod:3838 msgid "" "This command is mostly useful for interactive sessions. It is I " "intended that you try to parse the output string." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3401 -msgid "guestfs_ln" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2618 +msgid "ln" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3403 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2620 #, no-wrap msgid "" -" int\n" -" guestfs_ln (guestfs_h *g,\n" -" const char *target,\n" -" const char *linkname);\n" +" ln target linkname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3408 ../fish/guestfish-actions.pod:2353 +#. type: textblock +#: ../fish/guestfish-actions.pod:2622 ../src/guestfs-actions.pod:3853 msgid "This command creates a hard link using the C command." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3414 -msgid "guestfs_ln_f" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2624 +msgid "ln-f" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3416 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2626 #, no-wrap msgid "" -" int\n" -" guestfs_ln_f (guestfs_h *g,\n" -" const char *target,\n" -" const char *linkname);\n" +" ln-f target linkname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3421 ../fish/guestfish-actions.pod:2359 +#. type: textblock +#: ../fish/guestfish-actions.pod:2628 ../src/guestfs-actions.pod:3866 msgid "" -"This command creates a hard link using the C command. The C<-f> " +"This command creates a hard link using the C command. The I<-f> " "option removes the link (C) if it exists already." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3428 -msgid "guestfs_ln_s" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2631 +msgid "ln-s" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3430 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2633 #, no-wrap msgid "" -" int\n" -" guestfs_ln_s (guestfs_h *g,\n" -" const char *target,\n" -" const char *linkname);\n" +" ln-s target linkname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3435 ../fish/guestfish-actions.pod:2366 +#. type: textblock +#: ../fish/guestfish-actions.pod:2635 ../src/guestfs-actions.pod:3880 msgid "This command creates a symbolic link using the C command." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3441 -msgid "guestfs_ln_sf" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2637 +msgid "ln-sf" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3443 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2639 #, no-wrap msgid "" -" int\n" -" guestfs_ln_sf (guestfs_h *g,\n" -" const char *target,\n" -" const char *linkname);\n" +" ln-sf target linkname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3448 ../fish/guestfish-actions.pod:2372 +#. type: textblock +#: ../fish/guestfish-actions.pod:2641 ../src/guestfs-actions.pod:3893 msgid "" -"This command creates a symbolic link using the C command, The C<-f> " +"This command creates a symbolic link using the C command, The I<-f> " "option removes the link (C) if it exists already." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3455 -msgid "guestfs_lremovexattr" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2644 +msgid "lremovexattr" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3457 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2646 #, no-wrap msgid "" -" int\n" -" guestfs_lremovexattr (guestfs_h *g,\n" -" const char *xattr,\n" -" const char *path);\n" +" lremovexattr xattr path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3462 +#. type: textblock +#: ../fish/guestfish-actions.pod:2648 msgid "" -"This is the same as C, but if C is a symbolic " -"link, then it removes an extended attribute of the link itself." +"This is the same as L, but if C is a symbolic link, then " +"it removes an extended attribute of the link itself." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3470 -msgid "guestfs_ls" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2652 +msgid "ls" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3472 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2654 #, no-wrap msgid "" -" char **\n" -" guestfs_ls (guestfs_h *g,\n" -" const char *directory);\n" +" ls directory\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3476 ../fish/guestfish-actions.pod:2387 +#. type: textblock +#: ../fish/guestfish-actions.pod:2656 ../src/guestfs-actions.pod:3921 msgid "" "List the files in C (relative to the root directory, there is no " "cwd). The '.' and '..' entries are not returned, but hidden files are " "shown." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3480 +#. type: textblock +#: ../fish/guestfish-actions.pod:2660 msgid "" "This command is mostly useful for interactive sessions. Programs should " -"probably use C instead." +"probably use L instead." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3489 -msgid "guestfs_lsetxattr" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2663 +msgid "lsetxattr" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3491 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2665 #, no-wrap msgid "" -" int\n" -" guestfs_lsetxattr (guestfs_h *g,\n" -" const char *xattr,\n" -" const char *val,\n" -" int vallen,\n" -" const char *path);\n" +" lsetxattr xattr val vallen path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3498 +#. type: textblock +#: ../fish/guestfish-actions.pod:2667 msgid "" -"This is the same as C, but if C is a symbolic link, " -"then it sets an extended attribute of the link itself." +"This is the same as L, but if C is a symbolic link, then it " +"sets an extended attribute of the link itself." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3506 -msgid "guestfs_lstat" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2671 +msgid "lstat" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3508 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2673 #, no-wrap msgid "" -" struct guestfs_stat *\n" -" guestfs_lstat (guestfs_h *g,\n" -" const char *path);\n" +" lstat path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3512 ../src/guestfs-actions.pod:6005 ../fish/guestfish-actions.pod:2406 ../fish/guestfish-actions.pod:4019 +#. type: textblock +#: ../fish/guestfish-actions.pod:2675 ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:3957 ../src/guestfs-actions.pod:6736 msgid "Returns file information for the given C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3514 +#. type: textblock +#: ../fish/guestfish-actions.pod:2677 msgid "" -"This is the same as C except that if C is a symbolic " -"link, then the link is stat-ed, not the file it refers to." +"This is the same as L except that if C is a symbolic link, then " +"the link is stat-ed, not the file it refers to." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3518 ../fish/guestfish-actions.pod:2412 +#. type: textblock +#: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:3963 msgid "This is the same as the C system call." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3520 ../src/guestfs-actions.pod:6009 -msgid "" -"This function returns a C, or NULL if there was an " -"error. I after use>." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:6013 ../src/guestfs-actions.pod:6031 ../src/guestfs-actions.pod:6412 -msgid "(Added in 0.9.2)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3526 -msgid "guestfs_lstatlist" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2683 +msgid "lstatlist" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3528 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2685 #, no-wrap msgid "" -" struct guestfs_stat_list *\n" -" guestfs_lstatlist (guestfs_h *g,\n" -" const char *path,\n" -" char *const *names);\n" +" lstatlist path 'names ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3533 +#. type: textblock +#: ../fish/guestfish-actions.pod:2687 msgid "" -"This call allows you to perform the C operation on multiple " -"files, where all files are in the directory C. C is the list " -"of files from this directory." +"This call allows you to perform the L operation on multiple files, " +"where all files are in the directory C. C is the list of files " +"from this directory." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2422 +#. type: textblock +#: ../fish/guestfish-actions.pod:2691 ../src/guestfs-actions.pod:3982 msgid "" "On return you get a list of stat structs, with a one-to-one correspondence " "to the C list. If any name did not exist or could not be lstat'd, " "then the C field of that structure is set to C<-1>." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3542 +#. type: textblock +#: ../fish/guestfish-actions.pod:2696 msgid "" "This call is intended for programs that want to efficiently list a directory " -"contents without making many round-trips. See also C " -"for a similarly efficient call for getting extended attributes. Very long " +"contents without making many round-trips. See also L for a " +"similarly efficient call for getting extended attributes. Very long " "directory listings might cause the protocol message size to be exceeded, " "causing this call to fail. The caller must split up such requests into " "smaller groups of names." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3550 -msgid "" -"This function returns a C, or NULL if there was " -"an error. I after use>." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3556 -msgid "guestfs_luks_add_key" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2704 +msgid "luks-add-key" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3558 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2706 #, no-wrap msgid "" -" int\n" -" guestfs_luks_add_key (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" const char *newkey,\n" -" int keyslot);\n" +" luks-add-key device keyslot\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2439 +#. type: textblock +#: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4010 msgid "" "This command adds a new key on LUKS device C. C is any " "existing key, and is used to access the device. C is the new key to " "add. C is the key slot that will be replaced." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3570 +#. type: textblock +#: ../fish/guestfish-actions.pod:2713 msgid "" "Note that if C already contains a key, then this command will " -"fail. You have to use C first to remove that key." +"fail. You have to use L first to remove that key." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3616 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3710 +#. type: textblock +#: ../fish/guestfish-actions.pod:2717 ../fish/guestfish-actions.pod:2739 ../fish/guestfish-actions.pod:2752 ../fish/guestfish-actions.pod:2766 ../fish/guestfish-actions.pod:2792 ../fish/guestfish-actions.pod:2802 msgid "" -"This function takes a key or passphrase parameter which could contain " -"sensitive material. Read the section L for more " -"information." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:3580 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3663 -msgid "(Added in 1.5.2)" +"This command has one or more key or passphrase parameters. Guestfish will " +"prompt for these separately." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3582 -msgid "guestfs_luks_close" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2720 +msgid "luks-close" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3584 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2722 #, no-wrap msgid "" -" int\n" -" guestfs_luks_close (guestfs_h *g,\n" -" const char *device);\n" +" luks-close device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3588 +#. type: textblock +#: ../fish/guestfish-actions.pod:2724 msgid "" -"This closes a LUKS device that was created earlier by C " -"or C. The C parameter must be the name of the " -"LUKS mapping device (ie. C) and I the name of the " +"This closes a LUKS device that was created earlier by L or " +"L. The C parameter must be the name of the LUKS " +"mapping device (ie. C) and I the name of the " "underlying block device." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3812 -msgid "(Added in 1.5.1)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3598 -msgid "guestfs_luks_format" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2730 +msgid "luks-format" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3600 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2732 #, no-wrap msgid "" -" int\n" -" guestfs_luks_format (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" int keyslot);\n" +" luks-format device keyslot\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2465 +#. type: textblock +#: ../fish/guestfish-actions.pod:2734 ../src/guestfs-actions.pod:4051 msgid "" "This command erases existing data on C and formats the device as a " "LUKS encrypted device. C is the initial key, which is added to key " "slot C. (LUKS supports 8 key slots, numbered 0-7)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3613 ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3776 ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:5840 ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5889 ../src/guestfs-actions.pod:7049 ../fish/guestfish-actions.pod:2473 ../fish/guestfish-actions.pod:2486 ../fish/guestfish-actions.pod:2570 ../fish/guestfish-actions.pod:3131 ../fish/guestfish-actions.pod:3638 ../fish/guestfish-actions.pod:3918 ../fish/guestfish-actions.pod:3934 ../fish/guestfish-actions.pod:3949 ../fish/guestfish-actions.pod:4664 +#. type: textblock +#: ../fish/guestfish-actions.pod:2742 ../fish/guestfish-actions.pod:2755 ../fish/guestfish-actions.pod:2842 ../fish/guestfish-actions.pod:3503 ../fish/guestfish-actions.pod:4029 ../fish/guestfish-actions.pod:4354 ../fish/guestfish-actions.pod:4377 ../fish/guestfish-actions.pod:4399 ../fish/guestfish-actions.pod:5145 ../src/guestfs-actions.pod:4058 ../src/guestfs-actions.pod:4081 ../src/guestfs-actions.pod:4224 ../src/guestfs-actions.pod:5327 ../src/guestfs-actions.pod:6115 ../src/guestfs-actions.pod:6550 ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6613 ../src/guestfs-actions.pod:7812 msgid "" "B." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3622 -msgid "guestfs_luks_format_cipher" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2745 +msgid "luks-format-cipher" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3624 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2747 #, no-wrap msgid "" -" int\n" -" guestfs_luks_format_cipher (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" int keyslot,\n" -" const char *cipher);\n" +" luks-format-cipher device keyslot cipher\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3631 +#. type: textblock +#: ../fish/guestfish-actions.pod:2749 msgid "" -"This command is the same as C but it also allows you to " -"set the C used." +"This command is the same as L but it also allows you to set " +"the C used." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3645 -msgid "guestfs_luks_kill_slot" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2758 +msgid "luks-kill-slot" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3647 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2760 #, no-wrap msgid "" -" int\n" -" guestfs_luks_kill_slot (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" int keyslot);\n" +" luks-kill-slot device keyslot\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2493 +#. type: textblock +#: ../fish/guestfish-actions.pod:2762 ../src/guestfs-actions.pod:4098 msgid "" "This command deletes the key in key slot C from the encrypted LUKS " "device C. C must be one of the I keys." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3665 -msgid "guestfs_luks_open" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2769 +msgid "luks-open" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3667 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2771 #, no-wrap msgid "" -" int\n" -" guestfs_luks_open (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" const char *mapname);\n" +" luks-open device mapname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2504 +#. type: textblock +#: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4118 msgid "" "This command opens a block device which has been encrypted according to the " "Linux Unified Key Setup (LUKS) standard." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2507 +#. type: textblock +#: ../fish/guestfish-actions.pod:2776 ../src/guestfs-actions.pod:4121 msgid "C is the encrypted block device or partition." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2509 +#. type: textblock +#: ../fish/guestfish-actions.pod:2778 ../src/guestfs-actions.pod:4123 msgid "" "The caller must supply one of the keys associated with the LUKS block " "device, in the C parameter." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3681 ../fish/guestfish-actions.pod:2512 +#. type: textblock +#: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4126 msgid "" "This creates a new block device called C. Reads and " "writes to this block device are decrypted from and encrypted to the " "underlying C respectively." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3685 +#. type: textblock +#: ../fish/guestfish-actions.pod:2785 msgid "" -"If this block device contains LVM volume groups, then calling " -"C followed by C will make them " -"visible." +"If this block device contains LVM volume groups, then calling L " +"followed by L will make them visible." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3697 -msgid "guestfs_luks_open_ro" +#. type: textblock +#: ../fish/guestfish-actions.pod:2789 +msgid "Use L to list all device mapper devices." +msgstr "" + +#. type: =head2 +#: ../fish/guestfish-actions.pod:2795 +msgid "luks-open-ro" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3699 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2797 #, no-wrap msgid "" -" int\n" -" guestfs_luks_open_ro (guestfs_h *g,\n" -" const char *device,\n" -" const char *key,\n" -" const char *mapname);\n" +" luks-open-ro device mapname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3705 +#. type: textblock +#: ../fish/guestfish-actions.pod:2799 msgid "" -"This is the same as C except that a read-only mapping is " +"This is the same as L except that a read-only mapping is " "created." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3716 -msgid "guestfs_lvcreate" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2805 +msgid "lvcreate" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3718 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2807 #, no-wrap msgid "" -" int\n" -" guestfs_lvcreate (guestfs_h *g,\n" -" const char *logvol,\n" -" const char *volgroup,\n" -" int mbytes);\n" +" lvcreate logvol volgroup mbytes\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3724 ../fish/guestfish-actions.pod:2537 +#. type: textblock +#: ../fish/guestfish-actions.pod:2809 ../src/guestfs-actions.pod:4172 msgid "" "This creates an LVM logical volume called C on the volume group " "C, with C megabytes." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3731 -msgid "guestfs_lvm_canonical_lv_name" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2812 +msgid "lvm-canonical-lv-name" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3733 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2814 #, no-wrap msgid "" -" char *\n" -" guestfs_lvm_canonical_lv_name (guestfs_h *g,\n" -" const char *lvname);\n" +" lvm-canonical-lv-name lvname\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2544 +#. type: textblock +#: ../fish/guestfish-actions.pod:2816 ../src/guestfs-actions.pod:4185 msgid "" "This converts alternative naming schemes for LVs that you might find to the " "canonical name. For example, C is converted to " "C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3741 ../fish/guestfish-actions.pod:2548 +#. type: textblock +#: ../fish/guestfish-actions.pod:2820 ../src/guestfs-actions.pod:4189 msgid "" "This command returns an error if the C parameter does not refer to a " "logical volume." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3744 -msgid "See also C." -msgstr "" - -# type: textblock -#: ../src/guestfs-actions.pod:3749 -msgid "(Added in 1.5.24)" +#. type: textblock +#: ../fish/guestfish-actions.pod:2823 +msgid "See also L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3751 -msgid "guestfs_lvm_clear_filter" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2825 +msgid "lvm-clear-filter" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3753 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2827 #, no-wrap msgid "" -" int\n" -" guestfs_lvm_clear_filter (guestfs_h *g);\n" +" lvm-clear-filter\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3756 +#. type: textblock +#: ../fish/guestfish-actions.pod:2829 msgid "" -"This undoes the effect of C. LVM will be able to " -"see every block device." +"This undoes the effect of L. LVM will be able to see every " +"block device." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3801 ../fish/guestfish-actions.pod:2560 ../fish/guestfish-actions.pod:2591 +#. type: textblock +#: ../fish/guestfish-actions.pod:2832 ../fish/guestfish-actions.pod:2863 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4249 msgid "This command also clears the LVM cache and performs a volume group scan." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3766 -msgid "guestfs_lvm_remove_all" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2835 +msgid "lvm-remove-all" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3768 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2837 #, no-wrap msgid "" -" int\n" -" guestfs_lvm_remove_all (guestfs_h *g);\n" +" lvm-remove-all\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2567 +#. type: textblock +#: ../fish/guestfish-actions.pod:2839 ../src/guestfs-actions.pod:4219 msgid "" "This command removes all LVM logical volumes, volume groups and physical " "volumes." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3781 -msgid "guestfs_lvm_set_filter" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2845 +msgid "lvm-set-filter" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3783 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2847 #, no-wrap msgid "" -" int\n" -" guestfs_lvm_set_filter (guestfs_h *g,\n" -" char *const *devices);\n" +" lvm-set-filter 'devices ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2577 +#. type: textblock +#: ../fish/guestfish-actions.pod:2849 ../src/guestfs-actions.pod:4235 msgid "" "This sets the LVM device filter so that LVM will only be able to \"see\" the " "block devices in the list C, and will ignore all other attached " "block devices." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2581 +#. type: textblock +#: ../fish/guestfish-actions.pod:2853 ../src/guestfs-actions.pod:4239 msgid "" "Where disk image(s) contain duplicate PVs or VGs, this command is useful to " "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also " @@ -10517,119 +9689,98 @@ msgid "" "inside the LVM metadata." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2594 +#. type: textblock +#: ../fish/guestfish-actions.pod:2866 ../src/guestfs-actions.pod:4252 msgid "You can filter whole block devices or individual partitions." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2596 +#. type: textblock +#: ../fish/guestfish-actions.pod:2868 ../src/guestfs-actions.pod:4254 msgid "" "You cannot use this if any VG is currently in use (eg. contains a mounted " "filesystem), even if you are not filtering out that VG." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3814 -msgid "guestfs_lvremove" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2872 +msgid "lvremove" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3816 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2874 #, no-wrap msgid "" -" int\n" -" guestfs_lvremove (guestfs_h *g,\n" -" const char *device);\n" +" lvremove device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3820 ../fish/guestfish-actions.pod:2604 +#. type: textblock +#: ../fish/guestfish-actions.pod:2876 ../src/guestfs-actions.pod:4268 msgid "" "Remove an LVM logical volume C, where C is the path to the " "LV, such as C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2607 +#. type: textblock +#: ../fish/guestfish-actions.pod:2879 ../src/guestfs-actions.pod:4271 msgid "" "You can also remove all LVs in a volume group by specifying the VG name, " "C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:6788 -msgid "(Added in 1.0.13)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3830 -msgid "guestfs_lvrename" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2882 +msgid "lvrename" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3832 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2884 #, no-wrap msgid "" -" int\n" -" guestfs_lvrename (guestfs_h *g,\n" -" const char *logvol,\n" -" const char *newlogvol);\n" +" lvrename logvol newlogvol\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3837 ../fish/guestfish-actions.pod:2614 +#. type: textblock +#: ../fish/guestfish-actions.pod:2886 ../src/guestfs-actions.pod:4285 msgid "Rename a logical volume C with the new name C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3841 ../src/guestfs-actions.pod:6801 -msgid "(Added in 1.0.83)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3843 -msgid "guestfs_lvresize" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2888 +msgid "lvresize" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3845 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2890 #, no-wrap msgid "" -" int\n" -" guestfs_lvresize (guestfs_h *g,\n" -" const char *device,\n" -" int mbytes);\n" +" lvresize device mbytes\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2620 +#. type: textblock +#: ../fish/guestfish-actions.pod:2892 ../src/guestfs-actions.pod:4298 msgid "" "This resizes (expands or shrinks) an existing LVM logical volume to " "C. When reducing, data in the reduced part is lost." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3858 -msgid "guestfs_lvresize_free" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2896 +msgid "lvresize-free" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3860 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2898 #, no-wrap msgid "" -" int\n" -" guestfs_lvresize_free (guestfs_h *g,\n" -" const char *lv,\n" -" int percent);\n" +" lvresize-free lv percent\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3865 ../fish/guestfish-actions.pod:2628 +#. type: textblock +#: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4313 msgid "" "This expands an existing logical volume C so that it fills C% of the " "remaining free space in the volume group. Commonly you would call this with " @@ -10637,119 +9788,99 @@ msgid "" "remaining free space in the volume group." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3873 -msgid "(Added in 1.3.3)" -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3875 -msgid "guestfs_lvs" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2906 +msgid "lvs" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3877 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2908 #, no-wrap msgid "" -" char **\n" -" guestfs_lvs (guestfs_h *g);\n" +" lvs\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2638 +#. type: textblock +#: ../fish/guestfish-actions.pod:2910 ../src/guestfs-actions.pod:4328 msgid "" "List all the logical volumes detected. This is the equivalent of the " "L command." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3883 ../fish/guestfish-actions.pod:2641 +#. type: textblock +#: ../fish/guestfish-actions.pod:2913 ../src/guestfs-actions.pod:4331 msgid "" "This returns a list of the logical volume device names " "(eg. C)." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3886 -msgid "See also C, C." +#. type: textblock +#: ../fish/guestfish-actions.pod:2916 +msgid "See also L, L." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3894 -msgid "guestfs_lvs_full" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2918 +msgid "lvs-full" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3896 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2920 #, no-wrap msgid "" -" struct guestfs_lvm_lv_list *\n" -" guestfs_lvs_full (guestfs_h *g);\n" +" lvs-full\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3899 ../fish/guestfish-actions.pod:2650 +#. type: textblock +#: ../fish/guestfish-actions.pod:2922 ../src/guestfs-actions.pod:4347 msgid "" "List all the logical volumes detected. This is the equivalent of the " "L command. The \"full\" version includes all fields." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3902 -msgid "" -"This function returns a C, or NULL if there " -"was an error. I after " -"use>." -msgstr "" - -# type: =head2 -#: ../src/guestfs-actions.pod:3908 -msgid "guestfs_lvuuid" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2925 +msgid "lvuuid" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3910 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2927 #, no-wrap msgid "" -" char *\n" -" guestfs_lvuuid (guestfs_h *g,\n" -" const char *device);\n" +" lvuuid device\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:2657 +#. type: textblock +#: ../fish/guestfish-actions.pod:2929 ../src/guestfs-actions.pod:4362 msgid "This command returns the UUID of the LVM LV C." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3921 -msgid "guestfs_lxattrlist" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2931 +msgid "lxattrlist" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3923 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2933 #, no-wrap msgid "" -" struct guestfs_xattr_list *\n" -" guestfs_lxattrlist (guestfs_h *g,\n" -" const char *path,\n" -" char *const *names);\n" +" lxattrlist path 'names ...'\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2663 +#. type: textblock +#: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4376 msgid "" "This call allows you to get the extended attributes of multiple files, where " "all files are in the directory C. C is the list of files from " "this directory." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:2667 +#. type: textblock +#: ../fish/guestfish-actions.pod:2939 ../src/guestfs-actions.pod:4380 msgid "" "On return you get a flat list of xattr structs which must be interpreted " "sequentially. The first xattr struct always has a zero-length C. " @@ -10761,540 +9892,485 @@ msgid "" "subsequent files." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3942 +#. type: textblock +#: ../fish/guestfish-actions.pod:2949 msgid "" "This call is intended for programs that want to efficiently list a directory " -"contents without making many round-trips. See also C for " -"a similarly efficient call for getting standard stats. Very long directory " +"contents without making many round-trips. See also L for a " +"similarly efficient call for getting standard stats. Very long directory " "listings might cause the protocol message size to be exceeded, causing this " "call to fail. The caller must split up such requests into smaller groups of " "names." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3956 -msgid "guestfs_mkdir" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2957 +msgid "mkdir" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3958 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2959 #, no-wrap msgid "" -" int\n" -" guestfs_mkdir (guestfs_h *g,\n" -" const char *path);\n" +" mkdir path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3962 ../fish/guestfish-actions.pod:2689 +#. type: textblock +#: ../fish/guestfish-actions.pod:2961 ../src/guestfs-actions.pod:4410 msgid "Create a directory named C." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3968 -msgid "guestfs_mkdir_mode" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2963 +msgid "mkdir-mode" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3970 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2965 #, no-wrap msgid "" -" int\n" -" guestfs_mkdir_mode (guestfs_h *g,\n" -" const char *path,\n" -" int mode);\n" +" mkdir-mode path mode\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:2695 +#. type: textblock +#: ../fish/guestfish-actions.pod:2967 ../src/guestfs-actions.pod:4423 msgid "" "This command creates a directory, setting the initial permissions of the " "directory to C." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:2698 +#. type: textblock +#: ../fish/guestfish-actions.pod:2970 ../src/guestfs-actions.pod:4426 msgid "" "For common Linux filesystems, the actual mode which is set will be C. Non-native-Linux filesystems may interpret the mode in " "other ways." msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3982 -msgid "See also C, C" +#. type: textblock +#: ../fish/guestfish-actions.pod:2974 +msgid "See also L, L" msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:3988 -msgid "guestfs_mkdir_p" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2976 +msgid "mkdir-p" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:3990 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2978 #, no-wrap msgid "" -" int\n" -" guestfs_mkdir_p (guestfs_h *g,\n" -" const char *path);\n" +" mkdir-p path\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2708 +#. type: textblock +#: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4442 msgid "" "Create a directory named C, creating any parent directories as " "necessary. This is like the C shell command." msgstr "" -# type: =head2 -#: ../src/guestfs-actions.pod:4001 -msgid "guestfs_mkdtemp" +#. type: =head2 +#: ../fish/guestfish-actions.pod:2983 +msgid "mkdtemp" msgstr "" -# type: verbatim -#: ../src/guestfs-actions.pod:4003 +#. type: verbatim +#: ../fish/guestfish-actions.pod:2985 #, no-wrap msgid "" -" char *\n" -" guestfs_mkdtemp (guestfs_h *g,\n" -" const char *template);\n" +" mkdtemp template\n" "\n" msgstr "" -# type: textblock -#: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2715 +#. type: textblock +#: ../fish/guestfish-actions.pod:2987 ../src/guestfs-actions.pod:4455 msgid "" "This command creates a temporary directory. The C