Commit 65a67bd2644bef225ee318dde76016a4697218fa

Authored by Marcus Meissner
Committed by Linus Torvalds
1 parent b098161b4d

Documentation/accounting/getdelays.c: fix endless loop

When no option is passed to getdelays it just hangs, waiting
for a reply which will never come.

This patch prints usage() when no output marker is specified.

Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

Documentation/accounting/getdelays.c
... ... @@ -392,6 +392,10 @@
392 392 goto err;
393 393 }
394 394 }
  395 + if (!maskset && !tid && !containerset) {
  396 + usage();
  397 + goto err;
  398 + }
395 399  
396 400 do {
397 401 int i;