mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Ignore sysfs symlinks when DT_UNKNOWN.
This commit is contained in:
parent
57b083718d
commit
f6ab00eb54
@ -1,5 +1,6 @@
|
||||
Version 2.00.32 -
|
||||
====================================
|
||||
Ignore sysfs symlinks when DT_UNKNOWN.
|
||||
Add clvmd init script for RHEL4.
|
||||
Skip devices that are too small to be PVs.
|
||||
Fix pvchange -x segfault with lvm2-format orphan.
|
||||
|
@ -194,8 +194,10 @@ static int _read_devs(struct dev_set *ds, const char *dir)
|
||||
dtype = d->d_type;
|
||||
|
||||
if (dtype == DT_UNKNOWN) {
|
||||
if (stat(path, &info) >= 0) {
|
||||
if (S_ISDIR(info.st_mode))
|
||||
if (lstat(path, &info) >= 0) {
|
||||
if (S_ISLNK(info.st_mode))
|
||||
dtype = DT_LNK;
|
||||
else if (S_ISDIR(info.st_mode))
|
||||
dtype = DT_DIR;
|
||||
else if (S_ISREG(info.st_mode))
|
||||
dtype = DT_REG;
|
||||
|
Loading…
Reference in New Issue
Block a user