diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-10-01 16:16:25 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 08:56:20 +0200 |
commit | 0497b345e7d067109e0dd9bf9f4978a6847ee13b (patch) | |
tree | 8c181a200c9e883a9c85169dff887bfb9109ee5e /block/blktrace.c | |
parent | ef9e3facdf1fe1228721a7c295a76d1b7a0e57ec (diff) | |
download | kernel_samsung_tuna-0497b345e7d067109e0dd9bf9f4978a6847ee13b.zip kernel_samsung_tuna-0497b345e7d067109e0dd9bf9f4978a6847ee13b.tar.gz kernel_samsung_tuna-0497b345e7d067109e0dd9bf9f4978a6847ee13b.tar.bz2 |
blktrace: use BLKTRACE_BDEV_SIZE as the name size for setup structure
Define as 32, which is is what BDEVNAME_SIZE is/was as well. This keeps
the user interface the same and gets rid of the difference between
kernel and user api here.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blktrace.c')
-rw-r--r-- | block/blktrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 9e0212c..85049a7 100644 --- a/block/blktrace.c +++ b/block/blktrace.c @@ -369,7 +369,8 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, if (!buts->buf_size || !buts->buf_nr) return -EINVAL; - strcpy(buts->name, name); + strncpy(buts->name, name, BLKTRACE_BDEV_SIZE); + buts->name[BLKTRACE_BDEV_SIZE - 1] = '\0'; /* * some device names have larger paths - convert the slashes |