summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2017-04-01 17:09:55 +0000
committertrasz <trasz@FreeBSD.org>2017-04-01 17:09:55 +0000
commit7bb75a761d4016f3ec2acbfc78a64206dfe3e9c4 (patch)
tree96e23d401b7c349df78a26c216f521e33ce9736c
parent17ce1015d00eeb361a3de2119ac1a85df3c29d67 (diff)
downloadFreeBSD-src-7bb75a761d4016f3ec2acbfc78a64206dfe3e9c4.zip
FreeBSD-src-7bb75a761d4016f3ec2acbfc78a64206dfe3e9c4.tar.gz
MFC r314046:
Get rid of foo_sys() in linuxulator code. It was commented out, and it would be useless anyway - there is no point in pretending to have block devices; our "block" devices are in fact character ones, and can only be accessed as such. Sponsored by: DARPA, AFRL
-rw-r--r--sys/compat/linux/linux_stats.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 6574698..533d771 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -98,42 +98,6 @@ linux_kern_lstat(struct thread *td, char *path, enum uio_seg pathseg,
pathseg, sbp));
}
-/*
- * XXX: This was removed from newstat_copyout(), and almost identical
- * XXX: code was in stat64_copyout(). findcdev() needs to be replaced
- * XXX: with something that does lookup and locking properly.
- * XXX: When somebody fixes this: please try to avoid duplicating it.
- */
-#if 0
-static void
-disk_foo(struct somestat *tbuf)
-{
- struct cdevsw *cdevsw;
- struct cdev *dev;
-
- /* Lie about disk drives which are character devices
- * in FreeBSD but block devices under Linux.
- */
- if (S_ISCHR(tbuf.st_mode) &&
- (dev = findcdev(buf->st_rdev)) != NULL) {
- cdevsw = dev_refthread(dev);
- if (cdevsw != NULL) {
- if (cdevsw->d_flags & D_DISK) {
- tbuf.st_mode &= ~S_IFMT;
- tbuf.st_mode |= S_IFBLK;
-
- /* XXX this may not be quite right */
- /* Map major number to 0 */
- tbuf.st_dev = minor(buf->st_dev) & 0xf;
- tbuf.st_rdev = buf->st_rdev & 0xff;
- }
- dev_relthread(dev);
- }
- }
-
-}
-#endif
-
static void
translate_fd_major_minor(struct thread *td, int fd, struct stat *buf)
{
OpenPOWER on IntegriCloud