diff options
author | wollman <wollman@FreeBSD.org> | 1994-09-06 20:04:39 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-09-06 20:04:39 +0000 |
commit | 765cf6dfb0662daa19b312767021807d1a67fa31 (patch) | |
tree | 9b3d6c2e6e8180ba28820f5da68fe2d0709b3c2a /usr.sbin/config/main.c | |
parent | ec8e5a16d94e9173904104cb0b5b35edf2ccc564 (diff) | |
download | FreeBSD-src-765cf6dfb0662daa19b312767021807d1a67fa31.zip FreeBSD-src-765cf6dfb0662daa19b312767021807d1a67fa31.tar.gz |
Revert back to old config behavior if compiled with -DCONFIG_DONT_CLOBBER.
Diffstat (limited to 'usr.sbin/config/main.c')
-rw-r--r-- | usr.sbin/config/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index ae7692e..a54797f3 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -90,8 +90,12 @@ usage: fputs("usage: config [-gp] sysname\n", stderr); perror(PREFIX); exit(2); } +#ifndef CONFIG_DONT_CLOBBER + if (stat(p = path((char *)NULL), &buf)) { +#else /* CONFIG_DONT_CLOBBER */ p = path((char *)NULL); if (stat(p, &buf)) { +#endif /* CONFIG_DONT_CLOBBER */ if (mkdir(p, 0777)) { perror(p); exit(2); @@ -100,6 +104,7 @@ usage: fputs("usage: config [-gp] sysname\n", stderr); else if ((buf.st_mode & S_IFMT) != S_IFDIR) { fprintf(stderr, "config: %s isn't a directory.\n", p); exit(2); +#ifdef CONFIG_DONT_CLOBBER } else { char tmp[strlen(p) + 8]; @@ -117,6 +122,7 @@ usage: fputs("usage: config [-gp] sysname\n", stderr); perror(p); exit(2); } +#endif /* CONFIG_DONT_CLOBBER */ } loadaddress = -1; |