os: utils.c ignore '-reset' and '-noreset' command line arguments

Certain display managers (for example SDDM) starts X server with
-noreset flag and it is not user configurable. This patch add code to
ignore -noreset and -reset command line arguments to prevent X server
crash due to unknown arguments.

Signed-off-by: Tautvis <gtautvis@gmail.com>
This commit is contained in:
Tautvis 2025-11-22 01:45:46 +02:00 committed by Enrico Weigelt
parent 77830f2284
commit e00b4b55c8

View File

@ -600,6 +600,12 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
else if (strcmp(argv[i],"-noreset") == 0){
ErrorF("Argument -noreset is removed in XLibre (for more context: https://github.com/orgs/X11Libre/discussions/424 )\n");
}
else if(strcmp(argv[i],"-reset") == 0){
ErrorF("Argument -reset is removed in XLibre (for more context: https://github.com/orgs/X11Libre/discussions/424 )\n");
}
else if (strcmp(argv[i], "-p") == 0) {
if (++i < argc)
defaultScreenSaverInterval = ((CARD32) atoi(argv[i])) *