Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-15362 util: fix silent failure of component delete
[fs/lustre-release.git]
/
lustre
/
utils
/
lfs.c
diff --git
a/lustre/utils/lfs.c
b/lustre/utils/lfs.c
index
048b958
..
095baf4
100644
(file)
--- a/
lustre/utils/lfs.c
+++ b/
lustre/utils/lfs.c
@@
-1126,14
+1126,29
@@
static int lfs_component_del(char *fname, __u32 comp_id,
{
int rc = 0;
- if (flags && neg_flags)
+ if (flags && neg_flags) {
+ fprintf(stderr,
+ "%s: cannot specify both positive and negative flags\n",
+ progname);
return -EINVAL;
+ }
if (!flags && neg_flags)
flags = neg_flags | LCME_FL_NEG;
- if ((flags && comp_id) || (!flags && !comp_id))
+ if (flags && comp_id) {
+ fprintf(stderr,
+ "%s: cannot specify component ID and flags at the same time\n",
+ progname);
return -EINVAL;
+ }
+
+ if (!flags && !comp_id) {
+ fprintf(stderr,
+ "%s: neither flags nor component ID is specified\n",
+ progname);
+ return -EINVAL;
+ }
if (flags) {
if (flags & ~LCME_KNOWN_FLAGS) {