linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blkparse: exit with error if no tracefiles found
@ 2009-05-13 22:16 Eric Sandeen
  2010-04-19 17:13 ` Eric Sandeen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Sandeen @ 2009-05-13 22:16 UTC (permalink / raw)
  To: linux-btrace

If no tracefiles are found, exit with non-0 status

Resolves Red Hat Bugzilla #500118

Reported-by: Milos Malik <mmalik@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---


diff --git a/blkparse.c b/blkparse.c
index eec4952..db6a418 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2518,6 +2518,12 @@ static int do_file(void)
 
 		for (cpu = 0; setup_file(pdi, cpu); cpu++)
 			;
+
+		if (!cpu) {
+			fprintf(stderr,"No input files found for %s\n",
+				pdi->name);
+			return 1;
+		}
 	}
 
 	/*


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-19 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-13 22:16 [PATCH] blkparse: exit with error if no tracefiles found Eric Sandeen
2010-04-19 17:13 ` Eric Sandeen
2010-04-19 17:14 ` Jens Axboe
2010-04-19 17:27 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).