X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Freducecap.c;h=e4994d2cd54a41e8bc8dabe8afd290bd0809a489;hb=ec4370f7ebd7fb0ce7f002f5bf2c74f03acd3ec1;hp=932cc06d207960cdac265b3e72ce90d2ca60cdd2;hpb=2822ba293eb308225c50d346930c47bf98d9927b;p=util-vserver.git diff --git a/src/reducecap.c b/src/reducecap.c index 932cc06..e4994d2 100644 --- a/src/reducecap.c +++ b/src/reducecap.c @@ -1,4 +1,4 @@ -// $Id: reducecap.c,v 1.18 2005/03/24 12:44:17 ensc Exp $ +// $Id: reducecap.c 2279 2006-01-22 19:31:53Z ensc $ // Copyright (C) 2003 Enrico Scholz // based on reducecap.cc by Jacques Gelinas @@ -143,6 +143,10 @@ int wrapper_exit_code = 255; static void showHelp(int fd, char const *cmd, int res) { +#if !defined(VC_ENABLE_API_COMPAT) && !defined(VC_ENABLE_API_LEGACY) + WRITE_MSG(1, "ERROR: tools were built without legacy API support; reducecap will not work!\n\n"); +#endif + WRITE_MSG(fd, "Usage:\n "); WRITE_STR(fd, cmd); WRITE_MSG(fd, @@ -206,6 +210,8 @@ show(pid_t pid) printReducecap(&user); } +#if defined(VC_ENABLE_API_COMPAT) || defined(VC_ENABLE_API_LEGACY) + static uint32_t getCap(char const *cap) { @@ -220,6 +226,8 @@ getCap(char const *cap) return (1<