Skip to contentSkip to conversation

blkparse: exit with error if no tracefiles found

PATCH In review Eric Sandeen 2 participants 4 messages May 13, 2009 – Apr 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blkparse: exit with error if no tracefiles found

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

Resolves Red Hat Bugzilla #500118

---

blkparse.c +6 -0
index eec4952..db6a418 100644
@@ -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;
+		}
 	}
 
 	/*
#1 lore raw
Quoted 7 lines · Eric Sandeen

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

Resolves Red Hat Bugzilla #500118

---

Re-ping on this?

Thanks,
-Eric

Quoted 20 lines
blkparse.c +6 -0
index eec4952..db6a418 100644
@@ -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;
+		}
 	}
 
 	/*
#3 lore raw
In reply to Eric Sandeen
Quoted 4 lines · Jens Axboe
Quoted 3 lines · Eric Sandeen
Quoted 2 lines · Eric Sandeen

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

Quoted 9 lines
Quoted 6 lines
Quoted 5 lines

Resolves Red Hat Bugzilla #500118

---

Re-ping on this?

Wow, that's old. Applied, sorry about that :-)

No problem. I mean, _I_ never forget _anything_ - but I forgive you :)

Thanks!
-Eric