Skip to contentSkip to conversation

rbd: Fix the showmapped cmd usage

PATCH Applied Stratos Psomadakis 2 participants 2 messages Nov 9, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rbd: Fix the showmapped cmd usage

If the rbd showmapped cmd is given any extra arguments, rbd will fail with "assert(0)". Fix it by exiting with "usage_exit()", if any arguments are present, instead of failing.

---
 src/rbd.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
src/rbd.cc +3 -0
index 30f045f..47b556d 100644
@@ -986,6 +986,9 @@ int main(int argc, const char **argv)
       case OPT_RENAME:
 	set_conf_param(v, &imgname, &destname);
 	break;
+      case OPT_SHOWMAPPED:
+	usage_exit();
+	break;
       default:
 	assert(0);
 	break;
Signature · 1 line
1.7.2.5
Applied
#1 lore raw

Applied, thanks!

Quoted 32 lines · Stratos Psomadakis

If the rbd showmapped cmd is given any extra arguments, rbd will fail with "assert(0)". Fix it by exiting with "usage_exit()", if any arguments are present, instead of failing.

---
 src/rbd.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
src/rbd.cc +3 -0
index 30f045f..47b556d 100644
@@ -986,6 +986,9 @@ int main(int argc, const char **argv)
       case OPT_RENAME:
 	set_conf_param(v, &imgname, &destname);
 	break;
+      case OPT_SHOWMAPPED:
+	usage_exit();
+	break;
       default:
 	assert(0);
 	break;
Signature · 6 lines
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html