Browse Source

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>
Marcus Meissner 16 years ago
parent
commit
65a67bd264
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Documentation/accounting/getdelays.c

+ 4 - 0
Documentation/accounting/getdelays.c

@@ -392,6 +392,10 @@ int main(int argc, char *argv[])
 			goto err;
 			goto err;
 		}
 		}
 	}
 	}
+	if (!maskset && !tid && !containerset) {
+		usage();
+		goto err;
+	}
 
 
 	do {
 	do {
 		int i;
 		int i;