summaryrefslogtreecommitdiff
path: root/btt/plat.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-04-19 19:15:27 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-04-19 19:15:27 +0200
commit014b0ea19762341e217d463308710c3662d50e9c (patch)
treead4cf6beb6c3dfe3f5b0a0b207747646cf9fa835 /btt/plat.c
parenta2b1f3550a0bd4ab9e351bd2881fab1f1340bf1e (diff)
parent6abaea7a340536c6afa5944e3fa63831729dfed3 (diff)
downloadblktrace-014b0ea19762341e217d463308710c3662d50e9c.tar.gz
blktrace-014b0ea19762341e217d463308710c3662d50e9c.tar.bz2
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
Diffstat (limited to 'btt/plat.c')
-rw-r--r--btt/plat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/btt/plat.c b/btt/plat.c
index 7a9bb2a..e7b7dde 100644
--- a/btt/plat.c
+++ b/btt/plat.c
@@ -27,7 +27,7 @@ struct plat_info {
double first_ts, last_ts, tl;
};
-void *plat_alloc(char *str)
+void *plat_alloc(struct d_info *dip, char *post)
{
char *oname;
struct plat_info *pp;
@@ -38,8 +38,8 @@ void *plat_alloc(char *str)
pp->nl = 0;
pp->first_ts = pp->last_ts = pp->tl = -1.0;
- oname = malloc(strlen(str) + 32);
- sprintf(oname, "%s.dat", str);
+ oname = malloc(strlen(dip->dip_name) + strlen(post) + 32);
+ sprintf(oname, "%s%s_plat.dat", dip->dip_name, post);
if ((pp->fp = my_fopen(oname, "w")) == NULL) {
perror(oname);
return NULL;