Update commands to use paths from <minix/paths.h> instead of

hard-coding them (some)
This commit is contained in:
Ben Gras
2005-08-26 12:14:54 +00:00
parent 4caadca5e0
commit efdae0743d
9 changed files with 32 additions and 18 deletions

View File

@@ -25,6 +25,7 @@
#include <utmp.h>
#include <time.h>
#include <stdio.h>
#include <minix/paths.h>
static char *Version = "@(#) WRITE 1.6 (10/24/92)";
@@ -68,7 +69,7 @@ char *finduser()
if (verbose) fprintf(stderr, "Trying to write to %s\n",
userptr->pw_gecos);
if ((utmpfd = open("/etc/utmp", O_RDONLY)) < 0) {
if ((utmpfd = open(_PATH_UTMP, O_RDONLY)) < 0) {
fprintf(stderr, "Cannot open utmp file\n");
return(NULL);
}