From ad21fb8acf449b251460528a9244cc5567838799 Mon Sep 17 00:00:00 2001 From: Chen Hanxiao Date: Tue, 30 Jun 2015 19:23:09 +0800 Subject: [PATCH] uuid: use existing function of ext2 Signed-off-by: Chen Hanxiao --- daemon/uuids.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index 06b33e938..eafe62b24 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