summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-07 20:00:30 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-07 20:00:30 +0000
commitfd5a973890a84907571cbc25f6b2a5b342924570 (patch)
tree76d1e23867fce67dfef03ae410f3ebbbdb4547ea
parent19d0f00234b0884a31c8bd4b806c6d512baae9be (diff)
*** empty log message ***
-rw-r--r--nfsd/ChangeLog4
-rw-r--r--nfsd/main.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/nfsd/ChangeLog b/nfsd/ChangeLog
index 977a77de..08f6dbb5 100644
--- a/nfsd/ChangeLog
+++ b/nfsd/ChangeLog
@@ -1,5 +1,9 @@
Wed Aug 7 11:39:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+ * main.c (index_file): New var.
+ (index_file_name): Initialize from index_file.
+ (main): Don't initialize index_file_name here.
+
* ops.c (op_null, op_getattr, op_setattr, op_lookup, op_readlink,
count_read_buffersize, op_read, op_write, op_create, op_remove,
op_rename, op_link, op_symlink, op_mkdir, op_rmdir,
diff --git a/nfsd/main.c b/nfsd/main.c
index 4dcd816f..b4b8464a 100644
--- a/nfsd/main.c
+++ b/nfsd/main.c
@@ -27,13 +27,9 @@
int main_udp_socket, pmap_udp_socket;
struct sockaddr_in main_address, pmap_address;
-char *index_file_name;
-
-#ifdef makefiles_not_broken
-#define STATEDIR # LOCALSTATEDIR
-#else
-#define STATEDIR "/var"
-#endif
+#define INDEX_FILE_NAME(dir) # dir "/state/misc/nfsd.index"
+static char index_file[] = INDEX_FILE_NAME (LOCALSTATEDIR);
+char *index_file_name = index_file;
int
main (int argc, char **argv)
@@ -53,8 +49,6 @@ main (int argc, char **argv)
if (!nthreads)
nthreads = 4;
- asprintf (&index_file_name, "%s/state/misc/nfsd.index", STATEDIR);
-
authserver = getauth ();
maptime_map (0, 0, &mapped_time);