diff options
author | Kent Overstreet <koverstreet@google.com> | 2011-07-12 15:42:37 -0700 |
---|---|---|
committer | Kent Overstreet <koverstreet@google.com> | 2011-07-12 15:42:37 -0700 |
commit | 4f88b8efe227a370ac50ed1f9bdfa8ba15a1da2d (patch) | |
tree | da3acfc4903f14475b2ccee3aea581bf6f4d84a3 | |
parent | 9e6daaffa76bd44bbd60290e0e3bf1a9fb0f82bb (diff) |
Add an option for setting the set uuid
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | make-bcache.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d03d148 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +make-bcache +probe-bcache +.* 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) |