uuid: use existing function of ext2

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Chen Hanxiao
2015-06-30 19:23:09 +08:00
committed by Pino Toscano
parent 98e1e9bcc2
commit ad21fb8acf

View File

@@ -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