Skip to content

Commit

Permalink
tools/accounting/procacct: fix minor errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhang jiao authored and Andrew Morton committed Jan 13, 2025
1 parent 658eb5a commit d5cf6b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/accounting/procacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d5cf6b0

Please sign in to comment.