[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241203020550.3145-1-zhangjiao2@cmss.chinamobile.com>
Date: Tue, 3 Dec 2024 10:05:50 +0800
From: zhangjiao2 <zhangjiao2@...s.chinamobile.com>
To: thomas.orgis@...-hamburg.de
Cc: akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
ismael@...ev.co.uk,
zhang jiao <zhangjiao2@...s.chinamobile.com>
Subject: [PATCH v2] tools/accounting/procacct: Fix minor errors
From: zhang jiao <zhangjiao2@...s.chinamobile.com>
The logfile option was documented but not working.
Add it and optimized the while loop.
Signed-off-by: zhang jiao <zhangjiao2@...s.chinamobile.com>
Reviewed-by: Dr. Thomas Orgis <thomas.orgis@...-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
Powered by blists - more mailing lists