* [PATCH v2] tools/accounting/procacct: Fix minor errors
@ 2024-12-03 2:05 zhangjiao2
2024-12-03 21:16 ` Dr. Thomas Orgis
0 siblings, 1 reply; 2+ messages in thread
From: zhangjiao2 @ 2024-12-03 2:05 UTC (permalink / raw)
To: thomas.orgis; +Cc: akpm, linux-kernel, ismael, zhang jiao
From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
The logfile option was documented but not working.
Add it and optimized the while loop.
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Reviewed-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
---
v1->v2:
Add logfile option.
tools/accounting/procacct.c | 5 ++---
1 file 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;
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-03 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 2:05 [PATCH v2] tools/accounting/procacct: Fix minor errors zhangjiao2
2024-12-03 21:16 ` Dr. Thomas Orgis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox