From d44b6385d7fd3a063c3416c1a870c15d8da01a90 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 18 Aug 2026 19:44:45 +0300 Subject: [PATCH] Don't complain about MAXPLAYERS with unknown command line param Unix command line handling treated an unknown command line parameter as a maximum number of allowed concurrent players. This emitted a complaint about expected MAXPLAYERS, and as it can be now set in sysconf, remove this - most likely unused - functionality. --- doc/fixes5-0-1.txt | 1 + sys/unix/unixmain.c | 18 ++---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/doc/fixes5-0-1.txt b/doc/fixes5-0-1.txt index 2feee9be0..8a827c5d2 100644 --- a/doc/fixes5-0-1.txt +++ b/doc/fixes5-0-1.txt @@ -260,6 +260,7 @@ X11: toggle off perm_invent if user closes the perm inventory window X11: fix menu group accelerators X11: implement all text attributes for menus X11: fix crash when loading a nonexistent font +Unix: don't complain about MAXPLAYERS with unknown command line param General New Features diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 6cad795d8..c712b08e6 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -454,22 +454,8 @@ process_options(int argc, char *argv[]) } } - if (argc > 1) { - int mxplyrs = atoi(argv[1]); - boolean mx_ok = (mxplyrs > 0); -#ifdef SYSCF - config_error_add("%s%s%s", - mx_ok ? "MAXPLAYERS are set in sysconf file" - : "Expected MAXPLAYERS, found \"", - mx_ok ? "" : argv[1], mx_ok ? "" : "\""); -#else - /* XXX This is deprecated in favor of SYSCF with MAXPLAYERS */ - if (mx_ok) - gl.locknum = mxplyrs; - else - config_error_add("Invalid MAXPLAYERS \"%s\"", argv[1]); -#endif - } + if (argc > 1) + config_error_add("Unknown option: %.60s", origarg); #ifdef MAX_NR_OF_PLAYERS /* limit to compile-time limit */ if (!gl.locknum || gl.locknum > MAX_NR_OF_PLAYERS)