summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/main.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-10-10 17:36:11 +0000
committerpeter <peter@FreeBSD.org>1999-10-10 17:36:11 +0000
commitb7ec6580100588b92f69bae020a3b2bbaace18fb (patch)
treebb10d6445ddc5eea5cabc6ce7646ef39d6fcfbaf /usr.sbin/config/main.c
parentfb060568cc5a18c0787a1cf16b8f628b07e3ef0b (diff)
downloadFreeBSD-src-b7ec6580100588b92f69bae020a3b2bbaace18fb.zip
FreeBSD-src-b7ec6580100588b92f69bae020a3b2bbaace18fb.tar.gz
Further cleanup. Also remove the following unused or defunct tokens:
and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
Diffstat (limited to 'usr.sbin/config/main.c')
-rw-r--r--usr.sbin/config/main.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index 450b307..7c74a7f 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -321,30 +321,30 @@ configfile()
char *p;
int i;
- fi = fopen(PREFIX,"r");
- if(!fi)
+ fi = fopen(PREFIX, "r");
+ if (!fi)
err(2, "%s", PREFIX);
- fo = fopen(p=path("config.c.new"),"w");
- if(!fo)
+ fo = fopen(p=path("config.c.new"), "w");
+ if (!fo)
err(2, "%s", p);
- fprintf(fo,"#include \"opt_config.h\"\n");
- fprintf(fo,"#ifdef INCLUDE_CONFIG_FILE \n");
- fprintf(fo,"static const char config[] = \"\\\n");
- fprintf(fo,"START CONFIG FILE %s\\n\\\n___",PREFIX);
+ fprintf(fo, "#include \"opt_config.h\"\n");
+ fprintf(fo, "#ifdef INCLUDE_CONFIG_FILE \n");
+ fprintf(fo, "static const char config[] = \"\\\n");
+ fprintf(fo, "START CONFIG FILE %s\\n\\\n___", PREFIX);
while (EOF != (i=getc(fi))) {
- if(i == '\n') {
- fprintf(fo,"\\n\\\n___");
- } else if(i == '\"') {
- fprintf(fo,"\\\"");
- } else if(i == '\\') {
- fprintf(fo,"\\\\");
+ if (i == '\n') {
+ fprintf(fo, "\\n\\\n___");
+ } else if (i == '\"') {
+ fprintf(fo, "\\\"");
+ } else if (i == '\\') {
+ fprintf(fo, "\\\\");
} else {
- putc(i,fo);
+ putc(i, fo);
}
}
- fprintf(fo,"\\n\\\nEND CONFIG FILE %s\\n\\\n",PREFIX);
- fprintf(fo,"\";\n");
- fprintf(fo,"\n#endif /* INCLUDE_CONFIG_FILE */\n");
+ fprintf(fo, "\\n\\\nEND CONFIG FILE %s\\n\\\n", PREFIX);
+ fprintf(fo, "\";\n");
+ fprintf(fo, "\n#endif /* INCLUDE_CONFIG_FILE */\n");
fclose(fi);
fclose(fo);
moveifchanged(path("config.c.new"), path("config.c"));
@@ -404,13 +404,4 @@ moveifchanged(const char *from_name, const char *to_name)
if (unlink(from_name) < 0)
err(EX_OSERR, "unlink(%s)", from_name);
}
-
-#ifdef DIAG
- if (changed)
- printf("CHANGED! rename (%s, %s)\n", from_name, to_name);
- else
- printf("SAME! unlink (%s)\n", from_name);
-#endif
-
- return;
}
OpenPOWER on IntegriCloud