diff options
author | Nathan Scott <nathans@redhat.com> | 2021-03-22 14:49:07 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-03-22 17:16:40 +1100 |
commit | 253ff23f9e3a26c9575758fd1849b457c5d4d635 (patch) | |
tree | b756365fd3c197fc568b9ff68653bda0d2b0e0f3 /linux/Platform.c | |
parent | d56d23d91adf3fad512e5311fcdd0ca129e820c7 (diff) |
Use a platform-specific routine for long option usage
Related to https://github.com/htop-dev/htop/pull/564
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index a6885254..13c0ddb2 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -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; |