]> granicus.if.org Git - strace/commitdiff
dm: return RVAL_DECODED instead of 0 if we can't decode command
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sat, 26 Aug 2017 22:24:37 +0000 (00:24 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 28 Aug 2017 00:33:20 +0000 (02:33 +0200)
Return RVAL_DECODED if we can't decode command in order to avoid being
called on exiting.

* dm.c (dm_ioctl): Return RVAL_DECODED instead of 0 if command can't be
decoded.

dm.c

diff --git a/dm.c b/dm.c
index bf122d9421d4b49981a0b4e3d5a39c63fabcbaf9..327a5e1abce383836633e1fa4e4203b06bac188a 100644 (file)
--- a/dm.c
+++ b/dm.c
@@ -578,7 +578,7 @@ dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t ar
        case DM_DEV_SET_GEOMETRY:
                return dm_known_ioctl(tcp, code, arg);
        default:
-               return 0;
+               return RVAL_DECODED;
        }
 }
 
@@ -587,7 +587,7 @@ dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t ar
 int
 dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg)
 {
-       return 0;
+       return RVAL_DECODED;
 }
 
 # endif /* DM_VERSION_MAJOR == 4 */