mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
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>
This commit is contained in:
parent
e1698e9117
commit
38c333f928
@ -274,12 +274,11 @@ int main(int argc, char *argv[])
|
|||||||
int maskset = 0;
|
int maskset = 0;
|
||||||
char *logfile = NULL;
|
char *logfile = NULL;
|
||||||
int cfd = 0;
|
int cfd = 0;
|
||||||
int forking = 0;
|
|
||||||
|
|
||||||
struct msgtemplate msg;
|
struct msgtemplate msg;
|
||||||
|
|
||||||
while (!forking) {
|
while (1) {
|
||||||
c = getopt(argc, argv, "m:vr:");
|
c = getopt(argc, argv, "m:vr:w:");
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user