Add an option for setting the set uuid

This commit is contained in:
Kent Overstreet 2011-07-12 15:42:37 -07:00
parent 9e6daaffa7
commit 4f88b8efe2
2 changed files with 11 additions and 1 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
make-bcache
probe-bcache
.*

View File

@ -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)