summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-06-01 14:04:51 +0100
committerRichard Jones <rjones@redhat.com>2010-06-01 15:30:13 +0100
commitda4812ab6b44c29cb3cf181c7aa896420ecb8aa6 (patch)
tree183f6e9d704a4dbd35af040cf52906423ed241d0 /src
parent27b730a6820b80a49a4da1af9f4c8e8a952f735e (diff)
downloadlibguestfs-da4812ab6b44c29cb3cf181c7aa896420ecb8aa6.tar.gz
libguestfs-da4812ab6b44c29cb3cf181c7aa896420ecb8aa6.tar.xz
libguestfs-da4812ab6b44c29cb3cf181c7aa896420ecb8aa6.zip
Fix and deprecate get_e2label and get_e2uuid (RHBZ#597112).
Fix these calls (see description in RHBZ#597112), but also deprecate them since the new calls vfs_label and vfs_uuid can work on any filesystem type. This also adds a regression test for the original bug reported in RHBZ#597112.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 85a867e0..ff772f52 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -2222,7 +2222,7 @@ C<device> to C<label>. Filesystem labels are limited to
You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label>
to return the existing label on a filesystem.");
- ("get_e2label", (RString "label", [Device "device"]), 81, [],
+ ("get_e2label", (RString "label", [Device "device"]), 81, [DeprecatedBy "vfs_label"],
[],
"get the ext2/3/4 filesystem label",
"\
@@ -2252,8 +2252,13 @@ L<tune2fs(8)> manpage.
You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid>
to return the existing UUID of a filesystem.");
- ("get_e2uuid", (RString "uuid", [Device "device"]), 83, [],
- [],
+ ("get_e2uuid", (RString "uuid", [Device "device"]), 83, [DeprecatedBy "vfs_uuid"],
+ (* Regression test for RHBZ#597112. *)
+ (let uuid = uuidgen () in
+ [InitBasicFS, Always, TestOutput (
+ [["mke2journal"; "1024"; "/dev/sdb"];
+ ["set_e2uuid"; "/dev/sdb"; uuid];
+ ["get_e2uuid"; "/dev/sdb"]], uuid)]),
"get the ext2/3/4 filesystem UUID",
"\
This returns the ext2/3/4 filesystem UUID of the filesystem on