summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-12 19:55:41 +0000
committerRoland McGrath <roland@gnu.org>2002-05-12 19:55:41 +0000
commitaa46af68880038694a2efc7bf0fa8949abb6c4a1 (patch)
treed328581d4194824c2967f2e96aaaa4c50a00f61a /trans
parenteeadfc14732ac822b086bfd21cd274a92c62c238 (diff)
2002-05-12 Roland McGrath <roland@frob.com>
* fakeroot.c (netfs_attempt_lookup): Treat EOPNOTSUPP like EACCES. When all modes fail, try opening the node with zero openmodes.
Diffstat (limited to 'trans')
-rw-r--r--trans/fakeroot.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 51536b34..93435f5d 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -336,23 +336,30 @@ netfs_attempt_lookup (struct iouser *user, struct node *dir,
flags = O_RDWR|O_EXEC;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
- if (file == MACH_PORT_NULL && (errno == EACCES
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
|| errno == EROFS || errno == EISDIR))
{
flags = O_RDWR;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
- if (file == MACH_PORT_NULL && (errno == EACCES
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
|| errno == EROFS || errno == EISDIR))
{
flags = O_READ|O_EXEC;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
- if (file == MACH_PORT_NULL && errno == EACCES)
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
+ || errno == EISDIR))
{
flags = O_READ;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
+ || errno == EISDIR))
+ {
+ flags = 0;
+ file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
+ }
*np = 0;
if (file == MACH_PORT_NULL)
err = errno;