]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-nbd: sscanf return 0 mean not-match. 27484/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 19 Apr 2019 05:00:04 +0000 (13:00 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 19 Apr 2019 05:00:04 +0000 (13:00 +0800)
commit5b5c21be7138dc29f190887061f3a1de457a2e24
treec15fb19f3a4411acb971500727ad13e5eef37ac6
parent364d7b8c0eb9876e16f601fd8487cd85cbae8960
rbd-nbd: sscanf return 0 mean not-match.

When exec:  rbd-nbd map rbd/image --device /dev/image
The error message is:
rbd-nbd: failed to open device: /dev/image.

In fact, it should print:
rbd-nbd: invalid device path: /dev/image (expected /dev/nbd{num})

Meantime change help which make more understand.

Fixes: http://tracker.ceph.com/issues/39269
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/tools/rbd_nbd/rbd-nbd.cc