From 9471850c148e388bf94d02bb661aa608919ed979 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 4 Jun 2001 03:39:14 +0000 Subject: 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. --- sys/compat/linux/linux_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_stats.c') diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 53cbf32..75364fb 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -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 */ -- cgit v1.1