diff options
author | Raghu Krishnamurthy <rk@daterainc.com> | 2015-01-28 16:59:38 -0800 |
---|---|---|
committer | Raghu Krishnamurthy <rk@daterainc.com> | 2015-01-28 16:59:38 -0800 |
commit | 38aa84d04bcd47bb832c3b7ec1e40be9d3c38c69 (patch) | |
tree | 7016a2dfe9b67c6096b297604720b325c4347edb | |
parent | 5730e47b6f6b1463c27eb8f6bcc8c1345be50e75 (diff) |
if cache_set uuid is given in format command, then put the same
information in both set-uuid and user-uuid until support is added
in the CLI to display user-uuid as part of query-devs and in
format command to accept set_uuid and user_uuid.
Issue DAT-
Change-Id: I6f2306d858211933cb783f0efe8fe0ade64dd312
-rw-r--r-- | bcacheadm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bcacheadm.c b/bcacheadm.c index cf1ecfc..6ffceaa 100644 --- a/bcacheadm.c +++ b/bcacheadm.c @@ -297,7 +297,18 @@ int make_bcache(NihCommand *command, char *const *args) cache_set_sb = calloc(1, sizeof(*cache_set_sb) + sizeof(struct cache_member) * devs); - uuid_generate(cache_set_sb->set_uuid.b); + /* + * Currently make the cache-set uuid and user_id same, + * until proper support/usage is added. + */ + if (cache_set_uuid) { + if (uuid_parse(cache_set_uuid, cache_set_sb->set_uuid.b)) { + fprintf(stderr, "Bad uuid\n"); + return -1; + } + } else { + uuid_generate(cache_set_sb->set_uuid.b); + } if (cache_set_uuid) { if(uuid_parse(cache_set_uuid, cache_set_sb->user_uuid.b)) { |