os: move -nolock help message printing to serverlock.h

Reduce #ifdef cluttering in os/utils.c a little bit my moving the (built-time-)
conditional printing of the help message into serverlock.c

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1320>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-27 17:14:47 +01:00 committed by Marge Bot
parent 749046e5e9
commit 96c99b8318
3 changed files with 7 additions and 3 deletions

View File

@ -239,10 +239,15 @@ void DisableServerLock(void) {
nolock = TRUE;
}
void LockServerUseMsg(void) {
ErrorF("-nolock disable the locking mechanism\n");
}
#else /* LOCK_SERVER */
void LockServer(void) {}
void UnlockServer(void) {}
void DisableServerLock(void) {}
void LockServerUseMsg(void) {}
#endif /* LOCK_SERVER */

View File

@ -8,5 +8,6 @@
void LockServer(void);
void UnlockServer(void);
void DisableServerLock(void);
void LockServerUseMsg(void);
#endif /* _XSERVER_SERVERLOCK_H */

View File

@ -371,9 +371,7 @@ UseMsg(void)
#ifdef RLIMIT_STACK
ErrorF("-ls int limit stack space to N Kb\n");
#endif
#ifdef LOCK_SERVER
ErrorF("-nolock disable the locking mechanism\n");
#endif
LockServerUseMsg();
ErrorF("-maxclients n set maximum number of clients (power of two)\n");
ErrorF("-nolisten string don't listen on protocol\n");
ErrorF("-listen string listen on protocol\n");