diff options
Diffstat (limited to 'tapset/ioblock.stp')
-rw-r--r-- | tapset/ioblock.stp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp index 746460cc..484b61f3 100644 --- a/tapset/ioblock.stp +++ b/tapset/ioblock.stp @@ -62,11 +62,12 @@ probe ioblock.end /* Return the block device name */ function bio_devname:string(bio:long) %{ - char b[BDEVNAME_SIZE]; + char b[BDEVNAME_SIZE] = ""; struct bio *bp; bp = (struct bio *) ((unsigned long) THIS->bio); - bdevname(bp->bi_bdev,b); + if (bp->bi_bdev) + bdevname(bp->bi_bdev,b); sprintf(THIS->__retvalue,"%s",b); %} |