Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110556
b: refs/heads/master
c: 0497b34
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Oct 9, 2008
1 parent ea3df2a commit ace3a1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef9e3facdf1fe1228721a7c295a76d1b7a0e57ec
refs/heads/master: 0497b345e7d067109e0dd9bf9f4978a6847ee13b
3 changes: 2 additions & 1 deletion trunk/block/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions trunk/include/linux/blktrace_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,13 @@ enum {
Blktrace_stopped,
};

#define BLKTRACE_BDEV_SIZE 32

/*
* User setup structure passed with BLKTRACESTART
*/
struct blk_user_trace_setup {
#ifdef __KERNEL__
char name[BDEVNAME_SIZE]; /* output */
#else
char name[32]; /* output */
#endif
char name[BLKTRACE_BDEV_SIZE]; /* output */
__u16 act_mask; /* input */
__u32 buf_size; /* input */
__u32 buf_nr; /* input */
Expand Down

0 comments on commit ace3a1a

Please sign in to comment.