diff --git a/sys/kern/tty.c b/sys/kern/tty.c index c07d6dfaee99..fb45cb958e97 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.8 1994/10/03 01:12:18 ache Exp $ + * $Id: tty.c,v 1.9 1994/10/06 21:06:34 davidg Exp $ */ #include @@ -1274,7 +1274,7 @@ loop: goto read; carrier = ISSET(tp->t_state, TS_CARR_ON) || ISSET(tp->t_cflag, CLOCAL); - if (!carrier && ISSET(tp->t_state, TS_ISOPEN) || + if ((!carrier && ISSET(tp->t_state, TS_ISOPEN)) || !ISSET(lflag, ICANON) && cc[VMIN] == 0) { splx(s); return (0); diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index a0cea5b65d01..a0752c8fd2d5 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_compat.c 8.1 (Berkeley) 6/10/93 - * $Id: tty_compat.c,v 1.3 1994/08/02 07:42:48 davidg Exp $ + * $Id: tty_compat.c,v 1.4 1994/08/25 10:01:00 bde Exp $ */ /* @@ -129,7 +129,7 @@ ttcompat(tp, com, data, flag) term.c_ospeed = compatspcodes[speed]; term.c_cc[VERASE] = sg->sg_erase; term.c_cc[VKILL] = sg->sg_kill; - tp->t_flags = tp->t_flags&0xffff0000 | sg->sg_flags&0xffff; + tp->t_flags = (tp->t_flags&0xffff0000) | (sg->sg_flags&0xffff); ttcompatsetflags(tp, &term); return (ttioctl(tp, com == TIOCSETP ? TIOCSETAF : TIOCSETA, &term, flag)); diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index c73335c7e894..005da05c8700 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 - * $Id: vfs_cluster.c,v 1.4 1994/08/08 09:11:31 davidg Exp $ + * $Id: vfs_cluster.c,v 1.5 1994/09/24 18:31:45 davidg Exp $ */ #include @@ -662,7 +662,7 @@ redo: * case we don't want to write it twice). */ if (!incore(vp, start_lbn) || - last_bp == NULL && start_lbn == lbn) + (last_bp == NULL && start_lbn == lbn)) break; /* @@ -683,10 +683,10 @@ redo: /* Move memory from children to parent */ if (tbp->b_blkno != (bp->b_blkno + btodb(bp->b_bufsize))) { - printf("Clustered Block: %d addr %x bufsize: %d\n", - bp->b_lblkno, bp->b_blkno, bp->b_bufsize); - printf("Child Block: %d addr: %x\n", tbp->b_lblkno, - tbp->b_blkno); + printf("Clustered Block: %lu addr %lx bufsize: %ld\n", + (u_long)bp->b_lblkno, bp->b_blkno, bp->b_bufsize); + printf("Child Block: %lu addr: %lx\n", + (u_long)tbp->b_lblkno, tbp->b_blkno); panic("Clustered write to wrong blocks"); } diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 0a85336aafeb..cb3664034186 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.10 1994/10/02 17:35:39 phk Exp $ + * $Id: vfs_syscalls.c,v 1.11 1994/10/05 09:48:25 davidg Exp $ */ #include @@ -57,6 +57,7 @@ #include static int change_dir __P((struct nameidata *ndp, struct proc *p)); +static int getvnode __P((struct filedesc *, int, struct file **)); /* * Virtual File System System Calls @@ -471,7 +472,8 @@ getfsstat(p, uap, retval) (error = VFS_STATFS(mp, sp, p))) continue; sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; - if (error = copyout((caddr_t)sp, sfsp, sizeof(*sp))) + error = copyout((caddr_t)sp, sfsp, sizeof(*sp)); + if (error) return (error); sfsp += sizeof(*sp); } diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 398467d4162b..3fe155587db9 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id: vfs_init.c,v 1.6 1994/09/22 01:05:09 wollman Exp $ + * $Id: vfs_init.c,v 1.7 1994/09/22 22:10:36 wollman Exp $ */ @@ -311,8 +311,8 @@ fs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) return ENOMEM; } - if(error = copyout(vfsconf[i], where, - sizeof *vfsconf[i])) + error = copyout(vfsconf[i], where, sizeof *vfsconf[i]); + if(error) return error; where += sizeof *vfsconf[i]; buflen -= sizeof *vfsconf[i]; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 0a85336aafeb..cb3664034186 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.10 1994/10/02 17:35:39 phk Exp $ + * $Id: vfs_syscalls.c,v 1.11 1994/10/05 09:48:25 davidg Exp $ */ #include @@ -57,6 +57,7 @@ #include static int change_dir __P((struct nameidata *ndp, struct proc *p)); +static int getvnode __P((struct filedesc *, int, struct file **)); /* * Virtual File System System Calls @@ -471,7 +472,8 @@ getfsstat(p, uap, retval) (error = VFS_STATFS(mp, sp, p))) continue; sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; - if (error = copyout((caddr_t)sp, sfsp, sizeof(*sp))) + error = copyout((caddr_t)sp, sfsp, sizeof(*sp)); + if (error) return (error); sfsp += sizeof(*sp); }