summaryrefslogtreecommitdiff
path: root/btt/seek.c
diff options
context:
space:
mode:
authorAlan D. Brunelle <alan.brunelle@hp.com>2009-01-23 09:48:21 -0500
committerAlan D. Brunelle <alan.brunelle@hp.com>2009-01-23 09:48:21 -0500
commit99bb5ebc255618e4af913d2e5f1bf268af552bdf (patch)
tree583ae4e2f228cdad0098560c21baf592d25dc259 /btt/seek.c
parent69dd57c2986bb025d7de12ab6eb52d5cd130d453 (diff)
downloadblktrace-99bb5ebc255618e4af913d2e5f1bf268af552bdf.tar.gz
blktrace-99bb5ebc255618e4af913d2e5f1bf268af552bdf.tar.bz2
Fix btt to handle large numbers of output files
Simply bump resource limits if file opens fail, and retry. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Diffstat (limited to 'btt/seek.c')
-rw-r--r--btt/seek.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/btt/seek.c b/btt/seek.c
index 69400c8..444013c 100644
--- a/btt/seek.c
+++ b/btt/seek.c
@@ -53,7 +53,7 @@ static FILE *seek_open(char *str, char rw)
oname = malloc(strlen(seek_name) + strlen(str) + 32);
sprintf(oname, "%s_%s_%c.dat", seek_name, str, rw);
- if ((fp = fopen(oname, "w")) == NULL)
+ if ((fp = my_fopen(oname, "w")) == NULL)
perror(oname);
else
add_file(&seek_files, fp, oname);
@@ -187,7 +187,7 @@ void *seeki_init(char *str)
oname = malloc(strlen(sps_name) + strlen(str) + 32);
sprintf(oname, "%s_%s.dat", sps_name, str);
- if ((sip->sps_fp = fopen(oname, "w")) == NULL)
+ if ((sip->sps_fp = my_fopen(oname, "w")) == NULL)
perror(oname);
else
add_file(&seek_files, sip->sps_fp, oname);