From 4e64ca6e48b1c88d42becaa8441d747d39fee200 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 12 Oct 1996 02:42:18 +0000 Subject: (diskfs_S_dir_lookup): Temporarily add O_EXLOCK and O_SHLOCK to the set of retained flags, until they get added to O_HURD. Turn off OPENONLY_STATE_MODES bits in the flags we pass to diskfs_make_peropen, not everything *but* them! --- libdiskfs/dir-lookup.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index fa4db753..fb5b768e 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -61,8 +61,9 @@ diskfs_S_dir_lookup (struct protid *dircred, if (!dircred) return EOPNOTSUPP; - flags &= O_HURD; - + /* XXX - EXLOCK & SHLOCK are temporary until they get added to O_HURD. */ + flags &= O_HURD | O_EXLOCK | O_SHLOCK; + create = (flags & O_CREAT); excl = (flags & O_EXCL); @@ -399,13 +400,13 @@ diskfs_S_dir_lookup (struct protid *dircred, if ((flags & O_NOATIME) && (diskfs_isowner (np, dircred) == EPERM)) flags &= ~O_NOATIME; - error = diskfs_create_protid (diskfs_make_peropen (np, - (flags - & OPENONLY_STATE_MODES), - dircred->po->dotdotport), - dircred->uids, dircred->nuids, - dircred->gids, dircred->ngids, - &newpi); + error = + diskfs_create_protid (diskfs_make_peropen (np, + (flags &~OPENONLY_STATE_MODES), + dircred->po->dotdotport), + dircred->uids, dircred->nuids, + dircred->gids, dircred->ngids, + &newpi); if (! error) { -- cgit v1.2.3