# HG changeset patch # User Jan Beulich # Date 1331725244 0 # Node ID 20c8a7db63d160e95fcf5c8e2f9d31923d336316 # Parent e8660d8cf4be332e53cf6e2765f21804e3bfe28e tapdisk2: initialize 'name' parameter of BLKTAP2_IOCTL_CREATE_DEVICE This keeps the kernel driver from printing garbage. Signed-off-by: Jan Beulich Acked-by: Ian Jackson Committed-by: Ian Jackson --- a/tools/blktap2/drivers/tapdisk-control.c +++ b/tools/blktap2/drivers/tapdisk-control.c @@ -462,6 +462,7 @@ tapdisk_control_open_image(struct tapdis params.capacity = image.size; params.sector_size = image.secsize; + strncpy(params.name, vbd->name, BLKTAP2_MAX_MESSAGE_LEN); err = ioctl(vbd->ring.fd, BLKTAP2_IOCTL_CREATE_DEVICE, ¶ms); if (err && errno != EEXIST) {