summaryrefslogtreecommitdiff
path: root/make-bcache.c
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2011-07-12 15:42:37 -0700
committerKent Overstreet <koverstreet@google.com>2011-07-12 15:42:37 -0700
commit4f88b8efe227a370ac50ed1f9bdfa8ba15a1da2d (patch)
treeda3acfc4903f14475b2ccee3aea581bf6f4d84a3 /make-bcache.c
parent9e6daaffa76bd44bbd60290e0e3bf1a9fb0f82bb (diff)
Add an option for setting the set uuid
Diffstat (limited to 'make-bcache.c')
-rw-r--r--make-bcache.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/make-bcache.c b/make-bcache.c
index b6034fe..3d2d3a2 100644
--- a/make-bcache.c
+++ b/make-bcache.c
@@ -65,7 +65,8 @@ void usage()
" -b bucket size\n"
" -w block size (hard sector size of SSD, often 2k)\n"
" -j journal size, in buckets\n"
- " -U UUID\n");
+ " -U UUID\n"
+ " -S Set UUID\n");
exit(EXIT_FAILURE);
}
@@ -105,6 +106,12 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
break;
+ case 'S':
+ if (uuid_parse(optarg, sb.set_uuid)) {
+ printf("Bad uuid\n");
+ exit(EXIT_FAILURE);
+ }
+ break;
}
if (!sb.block_size)