mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
exit less
start cleanup of calls to exit scatter into library code. ugen_ callers handle error returns correctly; rmtsys already deals with errors; and rx_pthread can already deal with errors in the case that's fixed Reviewed-on: http://gerrit.openafs.org/667 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
50313a72a9
commit
fe68604f11
@ -91,8 +91,7 @@ server_entry(void *argp)
|
||||
void (*server_proc) (void *) = (void (*)(void *))argp;
|
||||
server_proc(NULL);
|
||||
dpf(("rx_pthread.c: server_entry: Server proc returned unexpectedly\n"));
|
||||
exit(1);
|
||||
return NULL;
|
||||
return (void *) -1; /* reused as return value, see pthread(3) */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -256,8 +256,8 @@ pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data, afs_int32 follow)
|
||||
/* assuming relative path name */
|
||||
if (getcwd(pathname, 256) == NULL) {
|
||||
free(inbuffer);
|
||||
printf("getwd failed; exiting\n");
|
||||
exit(1);
|
||||
printf("getwd failed\n");
|
||||
return -1;
|
||||
}
|
||||
strcpy(pathname + strlen(pathname), "/");
|
||||
strcat(pathname, path);
|
||||
|
@ -94,7 +94,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
|
||||
"%s: can't find cell %s's hosts in %s/%s\n",
|
||||
funcName, cellName, AFSDIR_SERVER_ETC_DIRPATH,
|
||||
AFSDIR_CELLSERVDB_FILE);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
} else { /* not -localauth */
|
||||
tdir = afsconf_Open(confDir);
|
||||
@ -111,7 +111,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
|
||||
fprintf(stderr,
|
||||
"%s: can't get local cellname, check %s/%s\n",
|
||||
funcName, confDir, AFSDIR_THISCELL_FILE);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
cellName = cellstr;
|
||||
}
|
||||
@ -122,7 +122,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
|
||||
fprintf(stderr,
|
||||
"%s: can't find cell %s's hosts in %s/%s\n",
|
||||
funcName, cellName, confDir, AFSDIR_CELLSERVDB_FILE);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
if (noAuthFlag) /* -noauth */
|
||||
scIndex = 0;
|
||||
@ -159,7 +159,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
|
||||
default:
|
||||
fprintf(stderr, "%s: unsupported security index %d\n",
|
||||
funcName, scIndex);
|
||||
exit(1);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
|
||||
fprintf(stderr,
|
||||
"%s: info.numServers=%d (> maxservers=%d)\n",
|
||||
funcName, info.numServers, maxservers);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
for (i = 0; i < info.numServers; i++) {
|
||||
serverconns[i] =
|
||||
|
Loading…
Reference in New Issue
Block a user