From a1055de83e7d5e6d6f2f291eedb1df77324d9d0a Mon Sep 17 00:00:00 2001 From: natano Date: Sat, 13 Aug 2016 11:42:46 +0000 Subject: [PATCH] Kill FUSE_ROOT_ID and use FUSE_ROOTINO instead. Also, remove one (ino_t) cast from FUSE_ROOTINO, as it is already included in the #define. ok kettenis --- sys/miscfs/fuse/fuse_vfsops.c | 6 +++--- sys/sys/fusebuf.h | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index c98ec6cd403..162860c2067 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.24 2016/08/12 20:18:44 natano Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.25 2016/08/13 11:42:46 natano Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -172,7 +172,7 @@ fusefs_root(struct mount *mp, struct vnode **vpp) struct vnode *nvp; int error; - if ((error = VFS_VGET(mp, (ino_t)FUSE_ROOTINO, &nvp)) != 0) + if ((error = VFS_VGET(mp, FUSE_ROOTINO, &nvp)) != 0) return (error); nvp->v_type = VDIR; @@ -200,7 +200,7 @@ fusefs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p) copy_statfs_info(sbp, mp); if (fmp->sess_init) { - fbuf = fb_setup(0, FUSE_ROOT_ID, FBT_STATFS, p); + fbuf = fb_setup(0, FUSE_ROOTINO, FBT_STATFS, p); error = fb_queue(fmp->dev, fbuf); diff --git a/sys/sys/fusebuf.h b/sys/sys/fusebuf.h index f2e1aa0ed61..fb23973b7e6 100644 --- a/sys/sys/fusebuf.h +++ b/sys/sys/fusebuf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fusebuf.h,v 1.9 2014/01/16 09:31:44 syl Exp $ */ +/* $OpenBSD: fusebuf.h,v 1.10 2016/08/13 11:42:46 natano Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * Copyright (c) 2013 Martin Pieuchot @@ -133,9 +133,6 @@ struct fusebuf { #ifdef _KERNEL -/* The node ID of the root inode */ -#define FUSE_ROOT_ID 1 - /* fusebuf prototypes */ struct fusebuf *fb_setup(size_t, ino_t, int, struct proc *); int fb_queue(dev_t, struct fusebuf *); -- 2.20.1