commit | aedfec59eed37d1ff7ce09b303b668234e9a7f8e | [log] [tgz] |
---|---|---|
author | Sage Weil <sage@newdream.net> | Thu May 12 20:57:03 2011 -0700 |
committer | Sage Weil <sage@newdream.net> | Tue May 24 11:52:03 2011 -0700 |
tree | 92e3e6e638acd63b07aab244cdd30826277001be | |
parent | 916d4d672779de8e42346fff338617c7b841e8e5 [diff] [blame] |
rbd: use snprintf for disk->disk_name Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 0d80967..d833d02 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c
@@ -1721,7 +1721,8 @@ if (!disk) goto out; - sprintf(disk->disk_name, DRV_NAME "%d", rbd_dev->id); + snprintf(disk->disk_name, sizeof(disk->disk_name), DRV_NAME "%d", + rbd_dev->id); disk->major = rbd_dev->major; disk->first_minor = 0; disk->fops = &rbd_bd_ops;