summaryrefslogtreecommitdiffstats
path: root/Documentation/accounting/getdelays.c
diff options
context:
space:
mode:
authorMarcus Meissner <meissner@suse.de>2009-01-15 13:51:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-15 16:39:37 -0800
commit65a67bd2644bef225ee318dde76016a4697218fa (patch)
tree4e3e40af9836c22b1c3c32a5a4667d7489b0acdc /Documentation/accounting/getdelays.c
parentb098161b4d0231f7dc5306111d576c0bfe0c8eba (diff)
downloadop-kernel-dev-65a67bd2644bef225ee318dde76016a4697218fa.zip
op-kernel-dev-65a67bd2644bef225ee318dde76016a4697218fa.tar.gz
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>
Diffstat (limited to 'Documentation/accounting/getdelays.c')
-rw-r--r--Documentation/accounting/getdelays.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index cc49400..7ea2311 100644
--- a/Documentation/accounting/getdelays.c
+++ b/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;
OpenPOWER on IntegriCloud