projects
/
multipath-tools
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
960bb23
)
kpartx: fix bad dm_devn return
author
Benjamin Marzinski
<bmarzins@redhat.com>
Wed, 1 Aug 2018 20:57:00 +0000
(15:57 -0500)
committer
Christophe Varoqui
<christophe.varoqui@opensvc.com>
Tue, 7 Aug 2018 13:30:27 +0000
(15:30 +0200)
dm_devn shouldn't be returning success if you can't create a dm task to
find the device info. Found by coverity.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/devmapper.c
patch
|
blob
|
history
diff --git
a/kpartx/devmapper.c
b/kpartx/devmapper.c
index
cd33449
..
8db1eb5
100644
(file)
--- a/
kpartx/devmapper.c
+++ b/
kpartx/devmapper.c
@@
-365,7
+365,7
@@
dm_devn (const char * mapname, int *major, int *minor)
struct dm_info info;
if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
- return
0
;
+ return
1
;
if (!dm_task_set_name(dmt, mapname))
goto out;