diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-02-08 19:34:59 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-02-08 19:34:59 +0000 |
commit | 257d010a579af45655ee93934b3fdfa5ca249b88 (patch) | |
tree | f2b9a9c9816b327ebca9e2cb048df63285f4973f /libdiskfs | |
parent | d7b72d54bd814414f127b4af4f4e7ab81a30f03b (diff) |
Formerly dir-init.c.~3~
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/dir-init.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c index 4c1f6a44..83def220 100644 --- a/libdiskfs/dir-init.c +++ b/libdiskfs/dir-init.c @@ -20,9 +20,10 @@ /* Locked node DP is a new directory; add whatever links are necessary to give it structure; its parent is the (locked) node PDP. This routine may not call diskfs_lookup on PDP. The new directory - must be clear within the meaning of diskfs_dirempty. */ + must be clear within the meaning of diskfs_dirempty. + CRED identifies the user making the call. */ error_t -diskfs_init_dir (struct node *dp, struct node *pdp) +diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred) { struct dirstat *ds = alloca (diskfs_dirstat_size); struct node *foo; @@ -39,16 +40,16 @@ diskfs_init_dir (struct node *dp, struct node *pdp) err = diskfs_direnter (dp, ".", dp, ds, cred); if (err) { - np->dn_stat.st_nlink--; - np->dn_set_ctime = 1; + dp->dn_stat.st_nlink--; + dp->dn_set_ctime = 1; return err; } pdp->dn_stat.st_nlink++; /* for `..' */ pdp->dn_set_ctime = 1; - err = diskfs_lookup (np, "..", CREATE, &foo, ds, cred); + err = diskfs_lookup (dp, "..", CREATE, &foo, ds, cred); assert (err == ENOENT); - err = diskfs_direnter (np, "..", pdp, ds, cred); + err = diskfs_direnter (dp, "..", pdp, ds, cred); if (err) { pdp->dn_stat.st_nlink--; |