summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-30 00:27:52 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-30 00:27:52 +0000
commit674d79863886ad8c88e3bb59d8508a7a9ea2891d (patch)
tree4a9765760a8b974fe6aaa1f8e07bc116bf46acb9
parentc40cdc177d5868ff2ca7fa36d37cd3dda2053d4d (diff)
Formerly fsys-getroot.c.~12~
-rw-r--r--libtrivfs/fsys-getroot.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libtrivfs/fsys-getroot.c b/libtrivfs/fsys-getroot.c
index a497da39..d44aeca4 100644
--- a/libtrivfs/fsys-getroot.c
+++ b/libtrivfs/fsys-getroot.c
@@ -52,10 +52,9 @@ trivfs_S_fsys_getroot (struct trivfs_control *cntl,
if (!cntl)
return EOPNOTSUPP;
- if (((flags & O_READ) && !trivfs_support_read)
- || ((flags & O_WRITE) && !trivfs_support_write)
- || ((flags & O_EXEC) && !trivfs_support_exec))
- return EACCES;
+ if ((flags & (O_READ|O_WRITE|O_EXEC) & trivfs_allow_open)
+ != (flags & (O_READ|O_WRITE|O_EXEC)))
+ return EOPNOTSUPP;
/* O_CREAT and O_EXCL are not meaningful here; O_NOLINK and O_NOTRANS
will only be useful when trivfs supports translators (which it doesn't
@@ -85,8 +84,6 @@ trivfs_S_fsys_getroot (struct trivfs_control *cntl,
}
}
- /* At this point we are commited to the open, now or in the
- future. */
cred = ports_allocate_port (sizeof (struct trivfs_protid),
cntl->protidtypes);
cred->isroot = 0;
@@ -147,9 +144,12 @@ trivfs_S_fsys_getroot (struct trivfs_control *cntl,
#if 0
void
trivfs_complete_open (struct trivfs_control *cntl,
- int multi)
+ int multi,
+ error_t err)
{
struct pending_open *pendo, *nxt;
+
+#error CHECK ERR HERE.
if (!multi)
{