From: Eric Sandeen <sandeen@redhat.com>
To: linux-btrace@vger.kernel.org
Subject: [PATCH] blkparse: exit with error if no tracefiles found
Date: Wed, 13 May 2009 22:16:29 +0000 [thread overview]
Message-ID: <4A0B46BD.4030202@redhat.com> (raw)
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;
+ }
}
/*
next reply other threads:[~2009-05-13 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 22:16 Eric Sandeen [this message]
2010-04-19 17:13 ` [PATCH] blkparse: exit with error if no tracefiles found Eric Sandeen
2010-04-19 17:14 ` Jens Axboe
2010-04-19 17:27 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A0B46BD.4030202@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-btrace@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.