search for: do_set_e2uuid

Displaying 19 results from an estimated 19 matches for "do_set_e2uuid".

2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...st char *device, const char *uuid); +extern int btrfs_set_uuid_random (const char *device); /*-- in ntfs.c --*/ extern char *ntfs_get_label (const char *device); diff --git a/daemon/ext2.c b/daemon/ext2.c index 8ef6d5f..93b530b 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -159,6 +159,12 @@ do_set_e2uuid (const char *device, const char *uuid) return 0; } +int +ext_set_uuid_random (const char *device) +{ + return do_set_e2uuid (device, "random"); +} + char * do_get_e2uuid (const char *device) { diff --git a/daemon/uuids.c b/daemon/uuids.c index 5238f3e..20eabe3 100644 --- a/daemo...
2015 Jun 24
0
[PATCH 2/5] uuid: use existed function of ext2
...n.h b/daemon/daemon.h index ee0c96f..eeb4ff7 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -219,6 +219,7 @@ extern int sync_disks (void); /* Confirmed this is true up to ext4 from the Linux sources. */ #define EXT2_LABEL_MAX 16 extern int fstype_is_extfs (const char *fstype); +extern int do_set_e2uuid (const char *device, const char *uuid); /*-- in blkid.c --*/ extern char *get_blkid_tag (const char *device, const char *tag); diff --git a/daemon/uuids.c b/daemon/uuids.c index f7791ab..8626884 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -27,16 +27,12 @@ #include "actions.h"...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...d_random (const char *device); /* ordinary daemon functions use these to indicate errors * NB: you don't need to prefix the string with the current command, diff --git a/daemon/ext2.c b/daemon/ext2.c index 8ef6d5f..8c8bd94 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -159,6 +159,12 @@ do_set_e2uuid (const char *device, const char *uuid) return 0; } +int +ext_set_e2uuid_random (const char *device) +{ + return do_set_e2uuid(device, "random"); +} + char * do_get_e2uuid (const char *device) { diff --git a/daemon/uuids.c b/daemon/uuids.c index 5238f3e..002f595 100644 --- a/daem...
2015 Jul 01
5
[PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v5: use NOT_SUPPORTED macro improve testcases v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno
2015 Jun 24
10
[PATCH 0/5] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existed functions. -- Introduce new API: btrfstune_set_uuid_random Chen Hanxiao (5): uuid: add support to change uuid of btrfs partition uuid: use existed function of ext2 uuid: use newly introduced
2015 Jun 30
0
[PATCH v4 2/7] uuid: use existing function of ext2
...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 -- 2.1.0
2015 Jun 30
13
[PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (7):
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...d_random (const char *device); /* ordinary daemon functions use these to indicate errors * NB: you don't need to prefix the string with the current command, diff --git a/daemon/ext2.c b/daemon/ext2.c index 8ef6d5f..625e5ae 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -159,6 +159,21 @@ do_set_e2uuid (const char *device, const char *uuid) return 0; } +int +set_e2uuid_random (const char *device) +{ + int r; + CLEANUP_FREE char *err = NULL; + + r = command (NULL, &err, str_tune2fs, "-U", "random", device, NULL); + if (r == -1) { + reply_with_error ("%s&qu...
2015 Jun 26
5
[PATCH v3 0/4] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3: set errno if feature is not available. Chen Hanxiao (4): uuid: add support to change uuid of btrfs partition uuid: use existing function of ext2 uuid: use newly introduced
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (9): uuid: add support to change uuid of btrfs partition uuid: use existing function of
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...DECLARE_STRINGSBUF (ret); - r = command (&out, &err, "tune2fs", "-l", device, NULL); + r = command (&out, &err, str_tune2fs, "-l", device, NULL); if (r == -1) { reply_with_error ("%s", err); free (err); @@ -135,7 +142,7 @@ do_set_e2uuid (const char *device, const char *uuid) int r; char *err; - r = command (NULL, &err, "tune2fs", "-U", uuid, device, NULL); + r = command (NULL, &err, str_tune2fs, "-U", uuid, device, NULL); if (r == -1) { reply_with_error ("%s", err);...
2012 Aug 30
1
[PATCH] collect list of called external commands
...rog (str_tune2fs) == -1) return NULL; - r = command (&out, &err, prog, "-l", device, NULL); + r = command (&out, &err, str_tune2fs, "-l", device, NULL); if (r == -1) { reply_with_error ("%s", err); free (err); @@ -165,11 +172,10 @@ do_set_e2uuid (const char *device, const char *uuid) int r; char *err; - char prog[] = "tune2fs"; - if (e2prog (prog) == -1) + if (e2prog (str_tune2fs) == -1) return -1; - r = command (NULL, &err, prog, "-U", uuid, device, NULL); + r = command (NULL, &err, str_tune...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...st char *device, const char *label) return -1; } - r = command (NULL, &err, str_e2label, device, label, NULL); + r = command (NULL, &err, "e2label", device, label, NULL); if (r == -1) { reply_with_error ("%s", err); return -1; @@ -162,7 +154,7 @@ do_set_e2uuid (const char *device, const char *uuid) int r; CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, str_tune2fs, "-U", uuid, device, NULL); + r = command (NULL, &err, "tune2fs", "-U", uuid, device, NULL); if (r == -1) { reply_with_error (&...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...st char *device, const char *label) return -1; } - r = command (NULL, &err, str_e2label, device, label, NULL); + r = command (NULL, &err, "e2label", device, label, NULL); if (r == -1) { reply_with_error ("%s", err); return -1; @@ -162,7 +157,7 @@ do_set_e2uuid (const char *device, const char *uuid) int r; CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, str_tune2fs, "-U", uuid, device, NULL); + r = command (NULL, &err, "tune2fs", "-U", uuid, device, NULL); if (r == -1) { reply_with_error (&...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’