Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd remove unused parameters, and clean up incompa...



details:   https://anonhg.NetBSD.org/src/rev/aad0ae81bae0
branches:  trunk
changeset: 985425:aad0ae81bae0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Aug 24 05:29:27 2021 +0000

description:
remove unused parameters, and clean up incompatible options.

from <henrik%gulbra.net@localhost>

diffstat:

 libexec/httpd/bozohttpd.c |   6 +++---
 libexec/httpd/main.c      |  12 +++++++-----
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (78 lines):

diff -r a706d3dab75e -r aad0ae81bae0 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Tue Aug 24 03:10:11 2021 +0000
+++ b/libexec/httpd/bozohttpd.c Tue Aug 24 05:29:27 2021 +0000
@@ -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 @@
 }
 
 static void
-bozo_clear_prefs(bozohttpd_t *httpd, bozoprefs_t *prefs)
+bozo_clear_prefs(bozoprefs_t *prefs)
 {
        size_t  i;
 
@@ -2722,7 +2722,7 @@
 void
 bozo_cleanup(bozohttpd_t *httpd, bozoprefs_t *prefs)
 {
-       bozo_clear_prefs(httpd, prefs);
+       bozo_clear_prefs(prefs);
 
        free(httpd->virthostname);
        free(httpd->errorbuf);
diff -r a706d3dab75e -r aad0ae81bae0 libexec/httpd/main.c
--- a/libexec/httpd/main.c      Tue Aug 24 03:10:11 2021 +0000
+++ b/libexec/httpd/main.c      Tue Aug 24 05:29:27 2021 +0000
@@ -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 @@
                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 @@
        }
        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 @@
                        break;
 
                case 'R':
+                       if (!have_dirindex)
+                               goto no_dirindex_support;
+
                        bozo_set_pref(&httpd, &prefs, "directory index readme",
                                      optarg);
                        break;



Home | Main Index | Thread Index | Old Index