diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-06-13 16:22:44 +0300 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-06-25 06:44:12 +0000 |
commit | fa804f13f3c1a2e8701327a3746b979f04ce09dd (patch) | |
tree | 6a9b130b0c8eb064cfc1fa37acb1f909e2047a48 /xlators/mgmt/glusterd/src/glusterd-snapshot.c | |
parent | 283b77805cca3027e333a11c9b00ac611662c9ee (diff) |
glusterd.h: remove unneeded macros or move them to their users.
Some macros were not used, so removed.
Some macros were quite local, so moved to the respective users.
Some macros simplified (removed an allocation here and there)
Change-Id: Ifaf1aff15a78f105b1549ab8053378933b35df43
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index e8e342b6f6c..f1fc06b3500 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -62,6 +62,21 @@ #include <glusterfs/lvm-defaults.h> #include <glusterfs/events.h> +#define GLUSTERD_GET_UUID_NOHYPHEN(ret_string, uuid) \ + do { \ + char *snap_volname_ptr = ret_string; \ + char tmp_uuid[64]; \ + char *snap_volid_ptr = uuid_utoa_r(uuid, tmp_uuid); \ + while (*snap_volid_ptr) { \ + if (*snap_volid_ptr == '-') { \ + snap_volid_ptr++; \ + } else { \ + (*snap_volname_ptr++) = (*snap_volid_ptr++); \ + } \ + } \ + *snap_volname_ptr = '\0'; \ + } while (0) + char snap_mount_dir[VALID_GLUSTERD_PATHMAX]; struct snap_create_args_ { xlator_t *this; |