[Pkg-libvirt-commits] [libguestfs] 02/29: uuid: use existing function of ext2

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:15:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.49
in repository libguestfs.

commit ad21fb8acf449b251460528a9244cc5567838799
Author: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
Date:   Tue Jun 30 19:23:09 2015 +0800

    uuid: use existing function of ext2
    
    Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 daemon/uuids.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/daemon/uuids.c b/daemon/uuids.c
index 06b33e9..eafe62b 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -27,16 +27,12 @@
 #include "actions.h"
 #include "optgroups.h"
 
-GUESTFSD_EXT_CMD(str_tune2fs, tune2fs);
 GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin);
 GUESTFSD_EXT_CMD(str_swaplabel, swaplabel);
 
 static int
 e2uuid (const char *device, const char *uuid)
 {
-  int r;
-  CLEANUP_FREE char *err = NULL;
-
   /* Don't allow the magic values here.  If callers want to do this
    * we'll add alternate set_uuid_* calls.
    */
@@ -46,13 +42,7 @@ e2uuid (const char *device, const char *uuid)
     return -1;
   }
 
-  r = command (NULL, &err, str_tune2fs, "-U", uuid, device, NULL);
-  if (r == -1) {
-    reply_with_error ("%s", err);
-    return -1;
-  }
-
-  return 0;
+  return do_set_e2uuid (device, uuid);
 }
 
 static int

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list