mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
S_IFCHR is not a bit mask, it's just a value in a field. The correct
way to clear that field is to use S_IFMT. Pointed out by BDE.
This commit is contained in:
parent
f20688d55c
commit
34c4099770
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77675
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
|
|||
(dev = udev2dev(buf->st_rdev, 0)) != NODEV) {
|
||||
cdevsw = devsw(dev);
|
||||
if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) {
|
||||
tbuf.stat_mode &= ~S_IFCHR;
|
||||
tbuf.stat_mode &= ~S_IFMT;
|
||||
tbuf.stat_mode |= S_IFBLK;
|
||||
|
||||
/* XXX this may not be quite right */
|
||||
|
|
Loading…
Reference in a new issue