diff options
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index e3afe97280b1..b33083e67f8c 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #include <xen/grant_table.h> | 21 | #include <xen/grant_table.h> |
22 | #include "common.h" | 22 | #include "common.h" |
23 | 23 | ||
24 | /* Enlarge the array size in order to fully show blkback name. */ | ||
25 | #define BLKBACK_NAME_LEN (20) | ||
26 | |||
24 | struct backend_info { | 27 | struct backend_info { |
25 | struct xenbus_device *dev; | 28 | struct xenbus_device *dev; |
26 | struct xen_blkif *blkif; | 29 | struct xen_blkif *blkif; |
@@ -70,7 +73,7 @@ static int blkback_name(struct xen_blkif *blkif, char *buf) | |||
70 | else | 73 | else |
71 | devname = devpath; | 74 | devname = devpath; |
72 | 75 | ||
73 | snprintf(buf, TASK_COMM_LEN, "blkback.%d.%s", blkif->domid, devname); | 76 | snprintf(buf, BLKBACK_NAME_LEN, "blkback.%d.%s", blkif->domid, devname); |
74 | kfree(devpath); | 77 | kfree(devpath); |
75 | 78 | ||
76 | return 0; | 79 | return 0; |
@@ -79,7 +82,7 @@ static int blkback_name(struct xen_blkif *blkif, char *buf) | |||
79 | static void xen_update_blkif_status(struct xen_blkif *blkif) | 82 | static void xen_update_blkif_status(struct xen_blkif *blkif) |
80 | { | 83 | { |
81 | int err; | 84 | int err; |
82 | char name[TASK_COMM_LEN]; | 85 | char name[BLKBACK_NAME_LEN]; |
83 | 86 | ||
84 | /* Not ready to connect? */ | 87 | /* Not ready to connect? */ |
85 | if (!blkif->irq || !blkif->vbd.bdev) | 88 | if (!blkif->irq || !blkif->vbd.bdev) |