diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index d3cc78cd0..766eb200f 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.143 - ================================= + Restore umask when creation of node fails. Add --concise to dmsetup create for many devices with tables in one command. Accept minor number without major in library when it knows dm major number. Introduce single-line concise table output format: dmsetup table --concise diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index e32af80ef..63d305b33 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -293,13 +293,12 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor) if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR, MKDEV((dev_t)major, (dev_t)minor)) < 0) { log_sys_error("mknod", control); - (void) dm_prepare_selinux_context(NULL, 0); - return 0; + ret = 0; } umask(old_umask); (void) dm_prepare_selinux_context(NULL, 0); - return 1; + return ret; } #endif