diff options
author | zhang jiao <zhangjiao2@cmss.chinamobile.com> | 2024-12-03 10:05:50 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-12 20:20:59 -0800 |
commit | d5cf6b0d170fe57da66bc0456bfae4c6aa106860 (patch) | |
tree | 96fdfb4bd5525d0e47809502593a64402a17b08e | |
parent | 658eb5ab916ddc92f294dbce8e3d449470be9f86 (diff) |
tools/accounting/procacct: fix minor errors
The logfile option was documented but not working. Add it and optimized
the while loop.
Link: https://lkml.kernel.org/r/20241203020550.3145-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Reviewed-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | tools/accounting/procacct.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/accounting/procacct.c b/tools/accounting/procacct.c index 90c4a37f53d9..e8dee05a6264 100644 --- a/tools/accounting/procacct.c +++ b/tools/accounting/procacct.c @@ -274,12 +274,11 @@ int main(int argc, char *argv[]) int maskset = 0; char *logfile = NULL; int cfd = 0; - int forking = 0; struct msgtemplate msg; - while (!forking) { - c = getopt(argc, argv, "m:vr:"); + while (1) { + c = getopt(argc, argv, "m:vr:w:"); if (c < 0) break; |