diff options
author | Sylvestre Gallon <syl@cvs.openbsd.org> | 2013-08-10 00:12:46 +0000 |
---|---|---|
committer | Sylvestre Gallon <syl@cvs.openbsd.org> | 2013-08-10 00:12:46 +0000 |
commit | e4c3f8e42e609f2bdf410da09a3748e7276e75c3 (patch) | |
tree | 023de283fad6628da7bb78e3366d5e99c3d4aea5 /sys/miscfs/fuse | |
parent | 8a73a5c467fef90078daf5cac88475a85872a7ca (diff) |
Remove debug printfs.
Diffstat (limited to 'sys/miscfs/fuse')
-rw-r--r-- | sys/miscfs/fuse/fuse_device.c | 10 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_file.c | 8 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_lookup.c | 11 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_vnops.c | 66 | ||||
-rw-r--r-- | sys/miscfs/fuse/fusebuf.c | 10 | ||||
-rw-r--r-- | sys/miscfs/fuse/fusefs.h | 5 |
6 files changed, 11 insertions, 99 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index 97ded0fc801..c0ab0ff11a0 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.4 2013/07/11 11:38:10 syl Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.5 2013/08/10 00:12:44 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -82,7 +82,7 @@ const static struct filterops fuse_seltrue_filtops = { filt_seltrue }; -#ifdef FUSE_DEBUG +#ifdef FUSE_DEBUG static void fuse_dump_buff(char *buff, int len) { @@ -261,7 +261,6 @@ fuseioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) switch (cmd) { default: - DPRINTF("bad ioctl number %d\n", cmd); return (ENODEV); } @@ -330,7 +329,6 @@ fuseread(dev_t dev, struct uio *uio, int ioflag) } remain = (fbuf->fb_len - fbuf->fb_resid); - DPRINTF("size remaining : %i\n", remain); /* * fbuf moves from a simpleq to another @@ -370,10 +368,8 @@ fusewrite(dev_t dev, struct uio *uio, int ioflag) return (error); SIMPLEQ_FOREACH(fbuf, &fd->fd_fbufs_wait, fb_next) { - if (fbuf->fb_uuid == hdr.fh_uuid) { - DPRINTF("catch unique %lu\n", fbuf->fb_uuid); + if (fbuf->fb_uuid == hdr.fh_uuid) break; - } lastfbuf = fbuf; } diff --git a/sys/miscfs/fuse/fuse_file.c b/sys/miscfs/fuse/fuse_file.c index 0333e81ba30..faceacd1291 100644 --- a/sys/miscfs/fuse/fuse_file.c +++ b/sys/miscfs/fuse/fuse_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_file.c,v 1.1 2013/06/03 15:50:56 tedu Exp $ */ +/* $OpenBSD: fuse_file.c,v 1.2 2013/08/10 00:12:45 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -24,12 +24,6 @@ #include "fusefs_node.h" #include "fusefs.h" -#ifdef FUSE_DEBUG_VNOP -#define DPRINTF(fmt, arg...) printf("fuse vnop: " fmt, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - int fusefs_file_open(struct fusefs_mnt *fmp, struct fusefs_node *ip, enum fufh_type fufh_type, int flags, int isdir, struct proc *p) diff --git a/sys/miscfs/fuse/fuse_lookup.c b/sys/miscfs/fuse/fuse_lookup.c index d48f792c2df..45b762c70ab 100644 --- a/sys/miscfs/fuse/fuse_lookup.c +++ b/sys/miscfs/fuse/fuse_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_lookup.c,v 1.3 2013/06/12 22:55:02 tedu Exp $ */ +/* $OpenBSD: fuse_lookup.c,v 1.4 2013/08/10 00:12:45 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -26,12 +26,6 @@ #include "fusefs_node.h" #include "fusefs.h" -#ifdef FUSE_DEBUG_VNOP -#define DPRINTF(fmt, arg...) printf("fuse vnop: " fmt, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - int fusefs_lookup(void *); int @@ -62,9 +56,6 @@ fusefs_lookup(void *v) lockparent = flags & LOCKPARENT; wantparent = flags & (LOCKPARENT | WANTPARENT); - DPRINTF("lookup path %s\n", cnp->cn_pnbuf); - DPRINTF("lookup file %s\n", cnp->cn_nameptr); - if ((error = VOP_ACCESS(vdp, VEXEC, cred, cnp->cn_proc)) != 0) return (error); diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index 1bccd2e2227..74c0fd96af8 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.3 2013/06/12 22:55:02 tedu Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.4 2013/08/10 00:12:45 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -32,12 +32,6 @@ #include "fusefs_node.h" #include "fusefs.h" -#ifdef FUSE_DEBUG_VNOP -#define DPRINTF(fmt, arg...) printf("fuse vnop: " fmt, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - /* Prototypes for fusefs vnode ops */ int fusefs_lookup(void *); int fusefs_open(void *); @@ -127,8 +121,6 @@ fusefs_open(void *v) int error; int isdir; - DPRINTF("fusefs_open\n"); - ap = v; ip = VTOI(ap->a_vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -136,8 +128,6 @@ fusefs_open(void *v) if (!fmp->sess_init) return (0); - DPRINTF("inode = %i mode=0x%x\n", ip->ufs_ino.i_number, ap->a_mode); - isdir = 0; if (ip->vtype == VDIR) isdir = 1; @@ -159,8 +149,6 @@ fusefs_open(void *v) if (error) return (error); - DPRINTF("file open fd : %i\n", ip->fufh[fufh_type].fh_id); - return (error); } @@ -173,8 +161,6 @@ fusefs_close(void *v) enum fufh_type fufh_type = FUFH_RDONLY; int isdir, i; - DPRINTF("fusefs_close\n"); - ap = v; ip = VTOI(ap->a_vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -223,8 +209,6 @@ fusefs_access(void *v) uint32_t mask = 0; int error = 0; - DPRINTF("fusefs_access\n"); - ap = v; p = ap->a_p; ip = VTOI(ap->a_vp); @@ -262,7 +246,7 @@ fusefs_access(void *v) goto system_check; } - DPRINTF("access error %i\n", error); + printf("fusefs: access error %i\n", error); pool_put(&fusefs_fbuf_pool, fbuf); return (error); } @@ -288,8 +272,6 @@ fusefs_getattr(void *v) struct fusebuf *fbuf; int error = 0; - DPRINTF("fusefs_getattr\n"); - ip = VTOI(vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -300,7 +282,6 @@ fusefs_getattr(void *v) error = fb_queue(fmp->dev, fbuf); if (error) { - DPRINTF("getattr error\n"); pool_put(&fusefs_fbuf_pool, fbuf); return (error); } @@ -335,7 +316,6 @@ fusefs_setattr(void *v) struct fb_io *io; int error = 0; - DPRINTF("fusefs_setattr\n"); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; /* * Check for unsettable attributes. @@ -447,7 +427,6 @@ out: int fusefs_ioctl(void *v) { - DPRINTF("fusefs_ioctl\n"); return (ENOTTY); } @@ -465,8 +444,6 @@ fusefs_link(void *v) struct fusebuf *fbuf; int error = 0; - DPRINTF("fusefs_link\n"); - if (vp->v_type == VDIR) { VOP_ABORTOP(dvp, cnp); error = EISDIR; @@ -532,7 +509,6 @@ fusefs_symlink(void *v) int error = 0; int len; - DPRINTF("fusefs_symlink\n"); dp = VTOI(dvp); fmp = (struct fusefs_mnt *)dp->ufs_ino.i_ump; @@ -598,9 +574,6 @@ fusefs_readdir(void *v) if (!fmp->sess_init) return (0); - DPRINTF("fusefs_readdir\n"); - DPRINTF("uio resid 0x%x\n", uio->uio_resid); - if (uio->uio_resid < sizeof(struct dirent)) return (EINVAL); @@ -653,7 +626,6 @@ fusefs_inactive(void *v) int error = 0; int type; - DPRINTF("fusefs_inactive\n"); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; for (type = 0; type < FUFH_MAXTYPE; type++) { @@ -684,8 +656,6 @@ fusefs_readlink(void *v) struct proc *p; int error = 0; - DPRINTF("fusefs_readlink\n"); - ip = VTOI(vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; uio = ap->a_uio; @@ -724,14 +694,13 @@ fusefs_reclaim(void *v) struct fusefs_mnt *fmp; int type; - DPRINTF("fusefs_reclaim\n"); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; /*close opened files*/ for (type = 0; type < FUFH_MAXTYPE; type++) { fufh = &(ip->fufh[type]); if (fufh->fh_type != FUFH_INVALID) { - printf("FUSE: vnode being reclaimed is valid"); + printf("FUSE: vnode being reclaimed is valid\n"); fusefs_file_close(fmp, ip, fufh->fh_type, type, (ip->vtype == VDIR), ap->a_p); } @@ -782,8 +751,6 @@ fusefs_create(void *v) int error = 0; mode_t mode; - DPRINTF("fusefs_create(cnp %08x, vap %08x\n", cnp, vap); - ip = VTOI(dvp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; mode = MAKEIMODE(vap->va_type, vap->va_mode); @@ -854,14 +821,9 @@ fusefs_read(void *v) size_t size; int error=0; - DPRINTF("fusefs_read\n"); - ip = VTOI(vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; - DPRINTF("read inode=%i, offset=%llu, resid=%x\n", - ip->ufs_ino.i_number, uio->uio_offset, uio->uio_resid); - if (uio->uio_resid == 0) return (error); if (uio->uio_offset < 0) @@ -910,14 +872,9 @@ fusefs_write(void *v) size_t len, diff; int error=0; - DPRINTF("fusefs_write\n"); - ip = VTOI(vp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; - DPRINTF("write inode=%i, offset=%llu, resid=%x\n", - ip->ufs_ino.i_number, uio->uio_offset, uio->uio_resid); - if (uio->uio_resid == 0) return (error); @@ -931,7 +888,7 @@ fusefs_write(void *v) fbuf->fb_io_len = len; if ((error = uiomove(fbuf->fb_dat, len, uio))) { - DPRINTF("uio error %i", error); + printf("fusefs: uio error %i\n", error); break; } @@ -963,8 +920,6 @@ fusefs_poll(void *v) { struct vop_poll_args *ap = v; - DPRINTF("fusefs_poll\n"); - /* * We should really check to see if I/O is possible. */ @@ -987,8 +942,6 @@ fusefs_rename(void *v) struct fusebuf *fbuf; int error = 0; - DPRINTF("fusefs_rename\n"); - #ifdef DIAGNOSTIC if ((tcnp->cn_flags & HASBUF) == 0 || (fcnp->cn_flags & HASBUF) == 0) @@ -1105,8 +1058,6 @@ fusefs_mkdir(void *v) struct fusebuf *fbuf; int error = 0; - DPRINTF("fusefs_mkdir %s\n", cnp->cn_nameptr); - ip = VTOI(dvp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -1164,8 +1115,6 @@ fusefs_rmdir(void *v) struct fusebuf *fbuf; int error; - DPRINTF("fusefs_rmdir\n"); - ip = VTOI(vp); dp = VTOI(dvp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -1233,8 +1182,6 @@ fusefs_remove(void *v) struct fusebuf *fbuf; int error = 0; - DPRINTF("fusefs_remove\n"); - ip = VTOI(vp); dp = VTOI(dvp); fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump; @@ -1273,7 +1220,6 @@ out: int fusefs_strategy(void *v) { - DPRINTF("fusefs_strategy\n"); return (0); } @@ -1283,7 +1229,6 @@ fusefs_lock(void *v) struct vop_lock_args *ap = v; struct vnode *vp = ap->a_vp; - DPRINTF("fusefs_lock\n"); return (lockmgr(&VTOI(vp)->ufs_ino.i_lock, ap->a_flags, NULL)); } @@ -1293,7 +1238,6 @@ fusefs_unlock(void *v) struct vop_unlock_args *ap = v; struct vnode *vp = ap->a_vp; - DPRINTF("fusefs_unlock\n"); return (lockmgr(&VTOI(vp)->ufs_ino.i_lock, ap->a_flags | LK_RELEASE, NULL)); } @@ -1303,7 +1247,6 @@ fusefs_islocked(void *v) { struct vop_islocked_args *ap = v; - DPRINTF("fusefs_islocked\n"); return (lockstatus(&VTOI(ap->a_vp)->ufs_ino.i_lock)); } @@ -1313,7 +1256,6 @@ fusefs_advlock(void *v) struct vop_advlock_args *ap = v; struct fusefs_node *ip = VTOI(ap->a_vp); - DPRINTF("fusefs_advlock\n"); return (lf_advlock(&ip->ufs_ino.i_lockf, ip->filesize, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags)); } diff --git a/sys/miscfs/fuse/fusebuf.c b/sys/miscfs/fuse/fusebuf.c index 71a940a131a..9c4a217d983 100644 --- a/sys/miscfs/fuse/fusebuf.c +++ b/sys/miscfs/fuse/fusebuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fusebuf.c,v 1.1 2013/06/03 15:50:56 tedu Exp $ */ +/* $OpenBSD: fusebuf.c,v 1.2 2013/08/10 00:12:45 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -30,12 +30,6 @@ #include "fusefs_node.h" #include "fusefs.h" -#ifdef FUSE_DEBUG -#define DPRINTF(fmt, arg...) printf("fuse ipc: " fmt, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - struct fusebuf * fb_setup(size_t len, ino_t ino, int op, struct proc *p) { @@ -49,8 +43,6 @@ fb_setup(size_t len, ino_t ino, int op, struct proc *p) fbuf->fb_ino = ino; fbuf->fb_resid = -1; - DPRINTF("create unique %lu\n", fbuf->fb_uuid); - return (fbuf); } diff --git a/sys/miscfs/fuse/fusefs.h b/sys/miscfs/fuse/fusefs.h index 3c9e0fc88ed..b45d6e492ce 100644 --- a/sys/miscfs/fuse/fusefs.h +++ b/sys/miscfs/fuse/fusefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fusefs.h,v 1.2 2013/06/09 12:51:40 tedu Exp $ */ +/* $OpenBSD: fusefs.h,v 1.3 2013/08/10 00:12:45 syl Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -81,8 +81,5 @@ void fuse_device_set_fmp(struct fusefs_mnt *); #define FUSE_ROOTINO ((ino_t)1) #define VFSTOFUSEFS(mp) ((struct fusefs_mnt *)((mp)->mnt_data)) -/* #define FUSE_DEBUG_VNOP -#define FUSE_DEBUG */ - #endif /* _KERNEL */ #endif /* __FUSEFS_H__ */ |