projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs-progs: sb-mod: add csum_type
[platform/upstream/btrfs-progs.git]
/
btrfs-crc.c
diff --git
a/btrfs-crc.c
b/btrfs-crc.c
index
27244d7
..
c3e4774
100644
(file)
--- a/
btrfs-crc.c
+++ b/
btrfs-crc.c
@@
-69,12
+69,14
@@
int main(int argc, char **argv)
str = argv[optind];
if (!loop) {
str = argv[optind];
if (!loop) {
- if (check_argc_
min
(argc - optind, 1))
+ if (check_argc_
exact
(argc - optind, 1))
print_usage(255);
printf("%12u - %s\n", crc32c(~1, str, strlen(str)), str);
return 0;
}
print_usage(255);
printf("%12u - %s\n", crc32c(~1, str, strlen(str)), str);
return 0;
}
+ if (check_argc_exact(argc - optind, 0))
+ print_usage(255);
buf = malloc(length);
if (!buf)
buf = malloc(length);
if (!buf)