diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 15:16:40 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 15:16:40 +0100 |
commit | 4dff42aa13dd726fb6b02843d0f4db4b4b330fe3 (patch) | |
tree | b7d9979063d29915df9b2d09780bd2b42674562d /src | |
parent | e492608f2f3809a824cb70ee03ff305964b69dd7 (diff) | |
download | libguestfs-4dff42aa13dd726fb6b02843d0f4db4b4b330fe3.tar.gz libguestfs-4dff42aa13dd726fb6b02843d0f4db4b4b330fe3.tar.xz libguestfs-4dff42aa13dd726fb6b02843d0f4db4b4b330fe3.zip |
Add 'initrd-list' command to list contents of initrd images.
Add 'initrd-list' command to list the files inside (new-style)
initrd images. Update virt-inspector to use this instead of
the less efficient download/unpack locally method.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index 5885ff3f..2dfc8cb3 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2599,6 +2599,22 @@ subdirectories (recursively). The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."); + ("initrd_list", (RStringList "filenames", [String "path"]), 128, [], + [InitBasicFS, Always, TestOutputList ( + [["mount_vfs"; "ro"; "squashfs"; "/dev/sdd"; "/"]; + ["initrd_list"; "/initrd"]], ["empty";"known-1";"known-2";"known-3"])], + "list files in an initrd", + "\ +This command lists out files contained in an initrd. + +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. + +Old Linux kernels (2.4 and earlier) used a compressed ext2 +filesystem as initrd. We I<only> support the newer initramfs +format (compressed cpio files)."); + ] let all_functions = non_daemon_functions @ daemon_functions |