Module Name:    src
Committed By:   mrg
Date:           Tue Aug 24 05:29:27 UTC 2021

Modified Files:
        src/libexec/httpd: bozohttpd.c main.c

Log Message:
remove unused parameters, and clean up incompatible options.

from <hen...@gulbra.net>


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.27 -r1.28 src/libexec/httpd/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.133 src/libexec/httpd/bozohttpd.c:1.134
--- src/libexec/httpd/bozohttpd.c:1.133	Sat Aug 21 11:55:24 2021
+++ src/libexec/httpd/bozohttpd.c	Tue Aug 24 05:29:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.133 2021/08/21 11:55:24 andvar Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.134 2021/08/24 05:29:27 mrg Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -241,7 +241,7 @@ bozo_set_pref(bozohttpd_t *httpd, bozopr
 }
 
 static void
-bozo_clear_prefs(bozohttpd_t *httpd, bozoprefs_t *prefs)
+bozo_clear_prefs(bozoprefs_t *prefs)
 {
 	size_t	i;
 
@@ -2722,7 +2722,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 void
 bozo_cleanup(bozohttpd_t *httpd, bozoprefs_t *prefs)
 {
-	bozo_clear_prefs(httpd, prefs);
+	bozo_clear_prefs(prefs);
 
 	free(httpd->virthostname);
 	free(httpd->errorbuf);

Index: src/libexec/httpd/main.c
diff -u src/libexec/httpd/main.c:1.27 src/libexec/httpd/main.c:1.28
--- src/libexec/httpd/main.c:1.27	Sat Feb 27 12:36:46 2021
+++ src/libexec/httpd/main.c	Tue Aug 24 05:29:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.27 2021/02/27 12:36:46 mrg Exp $	*/
+/*	$NetBSD: main.c,v 1.28 2021/08/24 05:29:27 mrg Exp $	*/
 
 /*	$eterna: main.c,v 1.6 2011/11/18 09:21:15 mrg Exp $	*/
 /* from: eterna: bozohttpd.c,v 1.159 2009/05/23 02:14:30 mrg Exp 	*/
@@ -102,7 +102,9 @@ usage(bozohttpd_t *httpd, char *progname
 		bozowarn(httpd, "   -P pidfile\t\tpid file path");
 	if (have_user)
 		bozowarn(httpd, "   -p dir\t\t\"public_html\" directory name");
-
+	if (have_dirindex)
+		bozowarn(httpd, "   -R readme\t\tput readme file in footer "
+				"of directory index");
 	if (have_core) {
 		bozowarn(httpd, "   -S version\t\tset server version string");
 		bozowarn(httpd, "   -s\t\t\talways log to stderr");
@@ -113,20 +115,17 @@ usage(bozohttpd_t *httpd, char *progname
 	}
 	if (have_user)
 		bozowarn(httpd, "   -u\t\t\tenable ~user/public_html support");
-
 	if (have_core) {
 		bozowarn(httpd, "   -V\t\t\tUnknown virtual hosts go to "
 				"`slashdir'");
 		bozowarn(httpd, "   -v virtualroot\tenable virtual host "
 				"support in this directory");
 	}
-
 	if (have_dirindex)
 		bozowarn(httpd, "   -X\t\t\tdirectory index support");
 	if (have_core)
 		bozowarn(httpd, "   -x index\t\tdefault \"index.html\" "
 				"file name");
-
 	if (have_ssl) {
 		bozowarn(httpd, "   -Z cert privkey\tspecify path to server "
 				"certificate and private key file\n"
@@ -303,6 +302,9 @@ main(int argc, char **argv)
 			break;
 
 		case 'R':
+			if (!have_dirindex)
+				goto no_dirindex_support;
+
 			bozo_set_pref(&httpd, &prefs, "directory index readme",
 				      optarg);
 			break;

Reply via email to