summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-06-14 06:30:03 +0000
committerNeil Brown <neilb@suse.de>2005-06-14 06:30:03 +0000
commit0bbc98b563b39b5159d247a0a4d6e8e1e6e38c30 (patch)
treeed0d0dc99b1d308b3bc774aef8a255f4af43de23
parent98ce3849202b323eb57a34f038bd8faa7ab30541 (diff)
downloadmdadm-0bbc98b563b39b5159d247a0a4d6e8e1e6e38c30.tar.gz
mdadm-0bbc98b563b39b5159d247a0a4d6e8e1e6e38c30.tar.xz
mdadm-0bbc98b563b39b5159d247a0a4d6e8e1e6e38c30.zip
Avoid using lstat, it isn't right.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
-rw-r--r--ChangeLog3
-rw-r--r--mdopen.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 29cfc3a..d23bf4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Changes Prior to this release
+ - Don't use 'lstat' to check for blockdevices, use stat.
+
Changes Prior to 1.11.0 release
- Fix embarassing bug which causes --add to always fail.
diff --git a/mdopen.c b/mdopen.c
index 3d99060..721d74a 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -97,7 +97,7 @@ int open_mddev(char *dev, int autof)
return -1;
}
stb.st_mode = 0;
- if (lstat(dev, &stb)==0 && ! S_ISBLK(stb.st_mode)) {
+ if (stat(dev, &stb)==0 && ! S_ISBLK(stb.st_mode)) {
fprintf(stderr, Name ": %s is not a block device.\n",
dev);
return -1;