summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-06-01 13:57:12 +0100
committerRichard Jones <rjones@redhat.com>2010-06-01 15:30:08 +0100
commit27b730a6820b80a49a4da1af9f4c8e8a952f735e (patch)
tree0942e13a9e75d313b4b9720b280e4990b10a8fe5 /daemon
parent21c42e9fabf6cea3d564e338a314479ef120502a (diff)
downloadlibguestfs-27b730a6820b80a49a4da1af9f4c8e8a952f735e.tar.gz
libguestfs-27b730a6820b80a49a4da1af9f4c8e8a952f735e.tar.xz
libguestfs-27b730a6820b80a49a4da1af9f4c8e8a952f735e.zip
New APIs: vfs-label and vfs-uuid return label and uuid for many fs types.
These APIs generalize the existing 'get-e2label' and 'get-e2uuid' calls, to provide calls which should be able to get the label and UUID for most filesystem types. These use 'blkid' to do the work. I have tested that the blkid commands themselves work on RHEL 5. (Suggested by Yufang Zhang).
Diffstat (limited to 'daemon')
-rw-r--r--daemon/blkid.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/daemon/blkid.c b/daemon/blkid.c
index a6197308..108eee6f 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -64,3 +64,15 @@ do_vfs_type (const char *device)
{
return get_blkid_tag (device, "TYPE");
}
+
+char *
+do_vfs_label (const char *device)
+{
+ return get_blkid_tag (device, "LABEL");
+}
+
+char *
+do_vfs_uuid (const char *device)
+{
+ return get_blkid_tag (device, "UUID");
+}