projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 83/02/20 23:36:57 by sam
[unix-history]
/
usr
/
src
/
sys
/
kern
/
vfs_lookup.c
diff --git
a/usr/src/sys/kern/vfs_lookup.c
b/usr/src/sys/kern/vfs_lookup.c
index
9bb98ae
..
96e7e79
100644
(file)
--- a/
usr/src/sys/kern/vfs_lookup.c
+++ b/
usr/src/sys/kern/vfs_lookup.c
@@
-1,4
+1,4
@@
-/* vfs_lookup.c 4.3
3 82/12/21
*/
+/* vfs_lookup.c 4.3
5 83/02/10
*/
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-159,7
+159,7
@@
dirloop2:
* e.g. like "/." or ".".
*/
if (u.u_dent.d_name[0] == 0) {
* e.g. like "/." or ".".
*/
if (u.u_dent.d_name[0] == 0) {
- if (flag) {
+ if (flag
|| lockparent
) {
u.u_error = ENOENT;
goto bad;
}
u.u_error = ENOENT;
goto bad;
}
@@
-537,7
+537,7
@@
direnter(ip)
{
register struct direct *ep, *nep;
struct buf *bp;
{
register struct direct *ep, *nep;
struct buf *bp;
- int loc, freespace;
+ int loc, freespace
, error = 0
;
u_int dsize;
int newentrysize;
char *dirbuf;
u_int dsize;
int newentrysize;
char *dirbuf;
@@
-555,10
+555,10
@@
direnter(ip)
if (u.u_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
u.u_dent.d_reclen = DIRBLKSIZ;
if (u.u_offset&(DIRBLKSIZ-1))
panic("wdir: newblk");
u.u_dent.d_reclen = DIRBLKSIZ;
-
(void)
rdwri(UIO_WRITE, u.u_pdir, (caddr_t)&u.u_dent,
+
error =
rdwri(UIO_WRITE, u.u_pdir, (caddr_t)&u.u_dent,
newentrysize, u.u_offset, 1, (int *)0);
iput(u.u_pdir);
newentrysize, u.u_offset, 1, (int *)0);
iput(u.u_pdir);
- return;
+ return
(error)
;
}
/*
}
/*
@@
-580,12
+580,12
@@
direnter(ip)
/*
* Get the block containing the space for the new directory
/*
* Get the block containing the space for the new directory
- * entry.
+ * entry.
Should return error by result instead of u.u_error.
*/
bp = blkatoff(u.u_pdir, u.u_offset, (char **)&dirbuf);
if (bp == 0) {
iput(u.u_pdir);
*/
bp = blkatoff(u.u_pdir, u.u_offset, (char **)&dirbuf);
if (bp == 0) {
iput(u.u_pdir);
- return;
+ return
(u.u_error)
;
}
/*
}
/*
@@
-631,6
+631,7
@@
direnter(ip)
bwrite(bp);
u.u_pdir->i_flag |= IUPD|ICHG;
iput(u.u_pdir);
bwrite(bp);
u.u_pdir->i_flag |= IUPD|ICHG;
iput(u.u_pdir);
+ return (error);
}
/*
}
/*