[Libsysio-commit] libsysio/src fcntl.c,1.2,1.2.6.1 fs.c,1.3,1.3.2.1 inode.c,1.5,1.5.2.1 mount.c,1.4,
Brought to you by:
lward
From: <rk...@us...> - 2003-04-28 20:56:08
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv3175 Modified Files: Tag: cplant fcntl.c fs.c inode.c mount.c Log Message: merge trunk changes into cplant branch Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** fcntl.c 9 Mar 2003 06:20:47 -0000 1.2 --- fcntl.c 28 Apr 2003 20:55:54 -0000 1.2.6.1 *************** *** 79,83 **** goto out; } ! err = _sysio_fd_dup2(fd, (int )newfd); } break; --- 79,83 ---- goto out; } ! return _sysio_fd_dup2(fd, (int )newfd); } break; Index: fs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fs.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** fs.c 24 Mar 2003 22:09:06 -0000 1.3 --- fs.c 28 Apr 2003 20:55:56 -0000 1.3.2.1 *************** *** 133,141 **** abort(); n = FS_ITBLSIZ; - head = fs->fs_itbl; do { while (head->lh_first) _sysio_i_gone(head->lh_first); ! } while (--n); if (n) abort(); --- 133,141 ---- abort(); n = FS_ITBLSIZ; do { + head = &fs->fs_itbl[--n]; while (head->lh_first) _sysio_i_gone(head->lh_first); ! } while (n); if (n) abort(); Index: inode.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/inode.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** inode.c 24 Mar 2003 22:09:06 -0000 1.5 --- inode.c 28 Apr 2003 20:55:56 -0000 1.5.2.1 *************** *** 163,167 **** ino = next; next = ino->i_nodes.tqe_next; ! if (ino->i_ref) continue; _sysio_i_gone(ino); --- 163,167 ---- ino = next; next = ino->i_nodes.tqe_next; ! if (ino->i_ref || ino->i_immune) continue; _sysio_i_gone(ino); *************** *** 184,187 **** --- 184,188 ---- mode_t type, dev_t rdev, + unsigned immunity, struct inode_ops *ops, void *private) *************** *** 217,221 **** ino->i_ops.inop_ioctl = o->inop_ioctl; } ! I_INIT(ino, fs, inum, type, rdev, &ino->i_ops, fid, private); ino->i_ref = 1; TAILQ_INSERT_TAIL(&_sysio_inodes, ino, i_nodes); --- 218,222 ---- ino->i_ops.inop_ioctl = o->inop_ioctl; } ! I_INIT(ino, fs, inum, type, rdev, &ino->i_ops, fid, immunity, private); ino->i_ref = 1; TAILQ_INSERT_TAIL(&_sysio_inodes, ino, i_nodes); *************** *** 783,790 **** --- 784,794 ---- struct intnl_stat *stbuf) { + /* It is possible that pno is null (for ftruncate call). */ + if (pno) { assert(!(pno->p_base->pb_ino && ino) || pno->p_base->pb_ino == ino); if (IS_RDONLY(pno, ino)) return -EROFS; + } if (!ino && pno->p_base->pb_ino) ino = pno->p_base->pb_ino; Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** mount.c 24 Mar 2003 22:09:06 -0000 1.4 --- mount.c 28 Apr 2003 20:55:56 -0000 1.4.2.1 *************** *** 337,353 **** if (err) goto out; /* * Do the deed. */ if (!pno->p_cover) { err = -EINVAL; goto error; } assert(pno->p_mount); err = _sysio_do_unmount(pno->p_mount); - error: - P_RELE(pno); out: if (err) { --- 337,354 ---- if (err) goto out; + P_RELE(pno); /* was ref'd */ /* * Do the deed. */ + #if 0 if (!pno->p_cover) { err = -EINVAL; goto error; } + #endif assert(pno->p_mount); err = _sysio_do_unmount(pno->p_mount); out: if (err) { |