From: Marcus Meissner Date: Thu, 15 Jan 2009 21:51:00 +0000 (-0800) Subject: Documentation/accounting/getdelays.c: fix endless loop X-Git-Tag: v2.6.29-rc2~45 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=65a67bd2644bef225ee318dde76016a4697218fa;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index cc49400b4af..7ea231172c8 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;