mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
uuid: use existing function of ext2
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
committed by
Pino Toscano
parent
98e1e9bcc2
commit
ad21fb8acf
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user