A bogus check for a char device also matched symbolic links.
Replace it with a correct check using S_ISCHR() Symbolic links will now work again in linux compatibility.
This commit is contained in:
parent
4b21204b19
commit
9ca3a84af2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75988
@ -120,7 +120,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
|
||||
/* Lie about disk drives which are character devices
|
||||
* in FreeBSD but block devices under Linux.
|
||||
*/
|
||||
if (tbuf.stat_mode & S_IFCHR &&
|
||||
if (S_ISCHR(tbuf.stat_mode) &&
|
||||
(dev = udev2dev(buf->st_rdev, 0)) != NODEV) {
|
||||
cdevsw = devsw(dev);
|
||||
if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) {
|
||||
|
Loading…
Reference in New Issue
Block a user