diff options
author | Richard Jones <rjones@redhat.com> | 2010-02-09 12:26:22 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-02-09 12:26:22 +0000 |
commit | e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38 (patch) | |
tree | d9161c19af2d943c52f1631119df9531ab69f33a /src | |
parent | 80bc4ffe9341fea06fb1c1e2bd099a53db6655f2 (diff) | |
download | libguestfs-e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38.tar.gz libguestfs-e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38.tar.xz libguestfs-e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38.zip |
New API call: initrd-cat to list a file from an initrd.
Diffstat (limited to 'src')
-rw-r--r-- | src/MAX_PROC_NR | 2 | ||||
-rwxr-xr-x | src/generator.ml | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 3d4c7bfe..7b473380 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -220 +221 diff --git a/src/generator.ml b/src/generator.ml index 6de2c7f2..b4bbf1e2 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4224,6 +4224,23 @@ Rename a logical volume C<logvol> with the new name C<newlogvol>."); "\ Rename a volume group C<volgroup> with the new name C<newvolgroup>."); + ("initrd_cat", (RBufferOut "content", [Pathname "initrdpath"; String "filename"]), 221, [], + [InitISOFS, Always, TestOutputBuffer ( + [["initrd_cat"; "/initrd"; "known-4"]], "abc\ndef\nghi")], + "list the contents of a single file in an initrd", + "\ +This command unpacks the file C<filename> from the initrd file +called C<initrdpath>. The filename must be given I<without> the +initial C</> character. + +For example, in guestfish you could use the following command +to examine the boot script (usually called C</init>) +contained in a Linux initrd or initramfs image: + + initrd-cat /boot/initrd-<version>.img init + +See also C<guestfs_initrd_list>."); + ] let all_functions = non_daemon_functions @ daemon_functions |