SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 7.9
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 7.9
SCCS-vsn: sys/kern/init_main.c 7.12
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)init_main.c 7.11 (Berkeley) %G%
+ * @(#)init_main.c 7.12 (Berkeley) %G%
* handled when copying the u. area in newproc().
*/
u.u_nd.ni_iov = &u.u_nd.ni_nd.nd_iovec;
* handled when copying the u. area in newproc().
*/
u.u_nd.ni_iov = &u.u_nd.ni_nd.nd_iovec;
+ u.u_nd.ni_base = (caddr_t)&u.u_nd.ni_dent;
+ u.u_nd.ni_rw = UIO_WRITE;
+ u.u_nd.ni_segflg = UIO_SYSSPACE;
+ u.u_ap = u.u_arg;
u.u_cmask = cmask;
u.u_lastfile = -1;
u.u_cmask = cmask;
u.u_lastfile = -1;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_lookup.c 7.8 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.9 (Berkeley) %G%
if (ndp->ni_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
ndp->ni_dent.d_reclen = DIRBLKSIZ;
if (ndp->ni_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
ndp->ni_dent.d_reclen = DIRBLKSIZ;
- error = rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- newentrysize, ndp->ni_offset, UIO_SYSSPACE, ndp->ni_cred,
- (int *)0);
+ ndp->ni_count = newentrysize;
+ ndp->ni_resid = newentrysize;
+ error = writeip(dp, &ndp->ni_uio, ndp->ni_cred);
if (DIRBLKSIZ > dp->i_fs->fs_fsize)
panic("wdir: blksize"); /* XXX - should grow w/balloc */
else
if (DIRBLKSIZ > dp->i_fs->fs_fsize)
panic("wdir: blksize"); /* XXX - should grow w/balloc */
else
- * Remove a directory entry after a call to namei, using the
- * parameters which it left in the u. area. The u. entry
+ * Remove a directory entry after a call to namei, using
+ * the parameters which it left in nameidata. The entry
* ni_offset contains the offset into the directory of the
* entry to be eliminated. The ni_count field contains the
* size of the previous record in the directory. If this
* ni_offset contains the offset into the directory of the
* entry to be eliminated. The ni_count field contains the
* size of the previous record in the directory. If this
* First entry in block: set d_ino to zero.
*/
ndp->ni_dent.d_ino = 0;
* First entry in block: set d_ino to zero.
*/
ndp->ni_dent.d_ino = 0;
- error = rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- (int)DIRSIZ(&ndp->ni_dent), ndp->ni_offset, UIO_SYSSPACE,
- ndp->ni_cred, (int *)0);
+ ndp->ni_count = ndp->ni_resid = DIRSIZ(&ndp->ni_dent);
+ error = writeip(dp, &ndp->ni_uio, ndp->ni_cred);
} else {
/*
* Collapse new free space into previous entry.
} else {
/*
* Collapse new free space into previous entry.
{
ndp->ni_dent.d_ino = ip->i_number;
{
ndp->ni_dent.d_ino = ip->i_number;
- return (rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- (int)DIRSIZ(&ndp->ni_dent), ndp->ni_offset, UIO_SYSSPACE,
- ndp->ni_cred, (int *)0));
+ ndp->ni_count = ndp->ni_resid = DIRSIZ(&ndp->ni_dent);
+ return (writeip(dp, &ndp->ni_uio, ndp->ni_cred));
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_lookup.c 7.8 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.9 (Berkeley) %G%
if (ndp->ni_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
ndp->ni_dent.d_reclen = DIRBLKSIZ;
if (ndp->ni_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
ndp->ni_dent.d_reclen = DIRBLKSIZ;
- error = rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- newentrysize, ndp->ni_offset, UIO_SYSSPACE, ndp->ni_cred,
- (int *)0);
+ ndp->ni_count = newentrysize;
+ ndp->ni_resid = newentrysize;
+ error = writeip(dp, &ndp->ni_uio, ndp->ni_cred);
if (DIRBLKSIZ > dp->i_fs->fs_fsize)
panic("wdir: blksize"); /* XXX - should grow w/balloc */
else
if (DIRBLKSIZ > dp->i_fs->fs_fsize)
panic("wdir: blksize"); /* XXX - should grow w/balloc */
else
- * Remove a directory entry after a call to namei, using the
- * parameters which it left in the u. area. The u. entry
+ * Remove a directory entry after a call to namei, using
+ * the parameters which it left in nameidata. The entry
* ni_offset contains the offset into the directory of the
* entry to be eliminated. The ni_count field contains the
* size of the previous record in the directory. If this
* ni_offset contains the offset into the directory of the
* entry to be eliminated. The ni_count field contains the
* size of the previous record in the directory. If this
* First entry in block: set d_ino to zero.
*/
ndp->ni_dent.d_ino = 0;
* First entry in block: set d_ino to zero.
*/
ndp->ni_dent.d_ino = 0;
- error = rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- (int)DIRSIZ(&ndp->ni_dent), ndp->ni_offset, UIO_SYSSPACE,
- ndp->ni_cred, (int *)0);
+ ndp->ni_count = ndp->ni_resid = DIRSIZ(&ndp->ni_dent);
+ error = writeip(dp, &ndp->ni_uio, ndp->ni_cred);
} else {
/*
* Collapse new free space into previous entry.
} else {
/*
* Collapse new free space into previous entry.
{
ndp->ni_dent.d_ino = ip->i_number;
{
ndp->ni_dent.d_ino = ip->i_number;
- return (rdwri(UIO_WRITE, dp, (caddr_t)&ndp->ni_dent,
- (int)DIRSIZ(&ndp->ni_dent), ndp->ni_offset, UIO_SYSSPACE,
- ndp->ni_cred, (int *)0));
+ ndp->ni_count = ndp->ni_resid = DIRSIZ(&ndp->ni_dent);
+ return (writeip(dp, &ndp->ni_uio, ndp->ni_cred));