From a43ae301c9a3cbfa2c2b6894c060aa117c909c23 Mon Sep 17 00:00:00 2001 From: Nishi Date: Sat, 24 Aug 2024 08:54:20 +0000 Subject: [PATCH] fix git-svn-id: file:///raid/svn-personal/repoview/trunk@72 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f --- Makefile | 2 +- check.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index faeeb3b..ed680e2 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PLATFORM = generic FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) EXTOBJS="`./objs`" EXTLIBS="`./libs`" EXTCFLAGS="" -.PHONY: all clean format ./CGI +.PHONY: all clean format install ./CGI all: ./CGI diff --git a/check.c b/check.c index e499263..c349f36 100644 --- a/check.c +++ b/check.c @@ -2,6 +2,7 @@ #include "config.h" +#include #include int check_db(void) { @@ -128,23 +129,26 @@ int check_avatar(void) { return st; } -int main() { - int st; - st = check_db(); - if(st != 0) goto fail; - st = check_auth(); - if(st != 0) goto fail; - st = check_theme(); - if(st != 0) goto fail; - st = check_files(); - if(st != 0) goto fail; - st = check_mypage(); - if(st != 0) goto fail; - st = check_avatar(); - if(st != 0) goto fail; - printf("Config validation successful.\n"); - return 0; +int main(int argc, char** argv) { + if(argc == 1){ + int st; + st = check_db(); + if(st != 0) goto fail; + st = check_auth(); + if(st != 0) goto fail; + st = check_theme(); + if(st != 0) goto fail; + st = check_files(); + if(st != 0) goto fail; + st = check_mypage(); + if(st != 0) goto fail; + st = check_avatar(); + if(st != 0) goto fail; + printf("Config validation successful.\n"); + return 0; fail: - fprintf(stderr, "Config validation failure.\n"); - return st; + fprintf(stderr, "Config validation failure.\n"); + return st; + } + return 0; } -- 2.45.2