[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] [PATCH] umask in device node creation error handling
- From: Florian Zumbiehl <florz florz de>
- To: dm-devel redhat com
- Subject: [dm-devel] [PATCH] umask in device node creation error handling
- Date: Wed, 26 Aug 2009 17:51:17 +0200
Hi,
I guess that the diff is pretty much self-explaining ...
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index b7782a7..554c1a4 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -360,6 +360,7 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,
old_mask = umask(0);
if (mknod(path, S_IFBLK | mode, dev) < 0) {
+ umask(old_mask);
log_error("Unable to make device node for '%s'", dev_name);
return 0;
}
Florian
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]