summaryrefslogtreecommitdiffstats
path: root/mdopen.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-02-06 05:18:12 +0100
committerNeil Brown <neilb@suse.de>2006-02-06 05:18:12 +0100
commit1e0d770c0f2e78bb334cd75d3d71c8c7d3b8f621 (patch)
tree03546c5e2d7b63bc1b1c76954e5fea9b127f34bd /mdopen.c
parentUpdate ChangeLog and release 2.3 (diff)
downloadmdadm-1e0d770c0f2e78bb334cd75d3d71c8c7d3b8f621.tar.xz
mdadm-1e0d770c0f2e78bb334cd75d3d71c8c7d3b8f621.zip
Release some compile fixes.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mdopen.c b/mdopen.c
index 0656ce26..e4139e55 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -64,9 +64,12 @@ void make_parts(char *dev, int cnt)
} else {
stb2 = stb;
}
- mknod(name, S_IFBLK | 0600, makedev(major, minor+i));
- chown(name, stb2.st_uid, stb2.st_gid);
- chmod(name, stb2.st_mode & 07777);
+ if (mknod(name, S_IFBLK | 0600, makedev(major, minor+i)))
+ perror("mknod");
+ if (chown(name, stb2.st_uid, stb2.st_gid))
+ perror("chown");
+ if (chmod(name, stb2.st_mode & 07777))
+ perror("chmod");
stat(name, &stb2);
add_dev(name, &stb2, 0, NULL);
}
@@ -205,8 +208,10 @@ int open_mddev(char *dev, int autof)
return -1;
}
if (must_remove) {
- chown(dev, stb.st_uid, stb.st_gid);
- chmod(dev, stb.st_mode & 07777);
+ if (chown(dev, stb.st_uid, stb.st_gid))
+ perror("chown");
+ if (chmod(dev, stb.st_mode & 07777))
+ perror("chmod");
}
stat(dev, &stb);
add_dev(dev, &stb, 0, NULL);