summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2001-11-05 20:40:24 +0000
committerdwmalone <dwmalone@FreeBSD.org>2001-11-05 20:40:24 +0000
commit8a1a60f8392d3f3d39a56af3ae208f07fe1ffa8a (patch)
treee5b69b8f541fbf5a262cc89b39b69a895fc98b21
parent3e00db61efc8e8fc7d328f24d170414bc889ff17 (diff)
downloadFreeBSD-src-8a1a60f8392d3f3d39a56af3ae208f07fe1ffa8a.zip
FreeBSD-src-8a1a60f8392d3f3d39a56af3ae208f07fe1ffa8a.tar.gz
Anding the fsid with 0xffff was causing aliasing problems.
PR: 17405, 16320 Submitted by: Mark W. Krentel <krentel@dreamscape.com> Submitted by: Peter Edwards <peter.edwards@ireland.com> MFC after: 2 weeks
-rw-r--r--usr.bin/fstat/cd9660.c2
-rw-r--r--usr.bin/fstat/fstat.c4
-rw-r--r--usr.bin/fstat/msdosfs.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/fstat/cd9660.c b/usr.bin/fstat/cd9660.c
index 0d739a6..1b4f22f 100644
--- a/usr.bin/fstat/cd9660.c
+++ b/usr.bin/fstat/cd9660.c
@@ -67,7 +67,7 @@ isofs_filestat(vp, fsp)
(void *)VTOI(vp), Pid);
return 0;
}
- fsp->fsid = dev2udev(isonode.i_dev) & 0xffff;
+ fsp->fsid = dev2udev(isonode.i_dev);
fsp->mode = (mode_t)isonode.inode.iso_mode;
fsp->rdev = isonode.i_dev;
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 0e76a5a..a874c3e 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -561,7 +561,7 @@ ufs_filestat(vp, fsp)
* contain dev_t structures. We need to convert to udev to make
* comparisons
*/
- fsp->fsid = dev2udev(inode.i_dev) & 0xffff;
+ fsp->fsid = dev2udev(inode.i_dev);
fsp->fileid = (long)inode.i_number;
fsp->mode = (mode_t)inode.i_mode;
fsp->size = (u_long)inode.i_size;
@@ -859,7 +859,7 @@ getfname(filename)
devs = cur;
cur->ino = statbuf.st_ino;
- cur->fsid = statbuf.st_dev & 0xffff;
+ cur->fsid = statbuf.st_dev;
cur->name = filename;
return(1);
}
diff --git a/usr.bin/fstat/msdosfs.c b/usr.bin/fstat/msdosfs.c
index 0c9c161..019d208 100644
--- a/usr.bin/fstat/msdosfs.c
+++ b/usr.bin/fstat/msdosfs.c
@@ -110,7 +110,7 @@ msdosfs_filestat(vp, fsp)
}
}
- fsp->fsid = dev2udev(denode.de_dev) & 0xffff;
+ fsp->fsid = dev2udev(denode.de_dev);
fsp->mode = 0555;
fsp->mode |= denode.de_Attributes & ATTR_READONLY ? 0 : 0222;
fsp->mode &= mnt->data.pm_mask;
OpenPOWER on IntegriCloud