From d76ce01919eccc1505161ea5b331ab7c913ce2b6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Sep 1994 03:30:54 +0000 Subject: Formerly dir-lookup.c.~7~ --- libdiskfs/dir-lookup.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libdiskfs/dir-lookup.c') diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 0eaba6c3..e764cc3c 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -37,7 +37,7 @@ diskfs_S_dir_lookup (struct protid *dircred, int nsymlink = 0; char *nextname; int nextnamelen; - int error = 0; + error_t error = 0; char *pathbuf = 0; int pathbuflen = 0; int newnamelen; @@ -224,10 +224,11 @@ diskfs_S_dir_lookup (struct protid *dircred, lastcomp ? flags : flags & ~O_NOLINK, retry, retryname, returned_port); - /* If we got MACH_SEND_INVALID_DEST, then the server is dead. - Zero out the old control port and try everything again. */ + /* If we got MACH_SEND_INVALID_DEST or MIG_SERVER_DIED, then + the server is dead. Zero out the old control port and try + everything again. */ - if (error == MACH_SEND_INVALID_DEST) + if (error == MACH_SEND_INVALID_DEST || error == MIG_SERVER_DIED) { mutex_lock (&np->translator.lock); @@ -348,10 +349,10 @@ diskfs_S_dir_lookup (struct protid *dircred, if (pathbuf[0] == '/') { - /* Punt to the caller */ + /* Punt to the caller. */ *retry = FS_RETRY_MAGICAL; *returned_port = MACH_PORT_NULL; - strcpy (retryname, pathbuf + nextnamelen); + strcpy (retryname, pathbuf); goto out; } -- cgit v1.2.3