Use a platform-specific routine for long option usage

Related to https://github.com/htop-dev/htop/pull/564
This commit is contained in:
Nathan Scott
2021-03-22 14:49:07 +11:00
parent d56d23d91a
commit 253ff23f9e
9 changed files with 51 additions and 36 deletions

View File

@ -846,6 +846,20 @@ void Platform_getBattery(double* percent, ACPresence* isOnAC) {
Platform_Battery_cacheTime = now;
}
void Platform_longOptionsUsage(const char* name)
{
#ifdef HAVE_LIBCAP
printf(
" --drop-capabilities[=none|basic|strict] Drop Linux capabilities when running as root\n"
" none - do not drop any capabilities\n"
" basic (default) - drop all capabilities not needed by %s\n"
" strict - drop all capabilities except those needed for\n"
" core functionality\n", name);
#else
(void) name;
#endif
}
bool Platform_getLongOption(int opt, int argc, char** argv) {
#ifndef HAVE_LIBCAP
(void) argc;