Procházet zdrojové kódy

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 před 16 roky
rodič
revize
65a67bd264
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  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;
 		}
 	}
+	if (!maskset && !tid && !containerset) {
+		usage();
+		goto err;
+	}
 
 	do {
 		int i;