diff options
author | ed <ed@FreeBSD.org> | 2012-02-10 12:35:57 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-02-10 12:35:57 +0000 |
commit | 28b4a002d6c95bc9e26ea30871aa91c1cc4b3563 (patch) | |
tree | 38fefd1e5bde255db2d3eab529d481ce373dec71 /sys/compat/linux/linux_stats.c | |
parent | 7bf1094d6b76324d8ab7decb5dc0d06999a72842 (diff) | |
download | FreeBSD-src-28b4a002d6c95bc9e26ea30871aa91c1cc4b3563.zip FreeBSD-src-28b4a002d6c95bc9e26ea30871aa91c1cc4b3563.tar.gz |
Remove direct access to si_name.
Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.
MFC after: 2 weeks
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index bea7747..2e05c85 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -66,7 +66,7 @@ translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) int major, minor; if (vp->v_type == VCHR && vp->v_rdev != NULL && - linux_driver_get_major_minor(vp->v_rdev->si_name, + linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { sb->st_rdev = (major << 8 | minor); } @@ -149,14 +149,14 @@ translate_fd_major_minor(struct thread *td, int fd, struct stat *buf) return; vp = fp->f_vnode; if (vp != NULL && vp->v_rdev != NULL && - linux_driver_get_major_minor(vp->v_rdev->si_name, + linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { buf->st_rdev = (major << 8 | minor); } else if (fp->f_type == DTYPE_PTS) { struct tty *tp = fp->f_data; /* Convert the numbers for the slave device. */ - if (linux_driver_get_major_minor(tp->t_dev->si_name, + if (linux_driver_get_major_minor(devtoname(tp->t_dev), &major, &minor) == 0) { buf->st_rdev = (major << 8 | minor); } |