mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-04 19:17:34 +00:00
dm: virtio-blk: fix parameter err
Fix the truncate issue for virtio block parameter. Tracked-On: #8162 Signed-off-by: Conghui <conghui.chen@intel.com>
This commit is contained in:
parent
5c5749c1ff
commit
3263b5a707
@ -506,7 +506,11 @@ virtio_blk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
|||||||
if (strcmp("iothread", opt) == 0) {
|
if (strcmp("iothread", opt) == 0) {
|
||||||
use_iothread = true;
|
use_iothread = true;
|
||||||
} else {
|
} else {
|
||||||
opts_tmp = opts_start;
|
/* The string pointed by opts_start is truncated by strsep,
|
||||||
|
* so use opts instead of opts_start which point to the original
|
||||||
|
* parameter string.
|
||||||
|
* */
|
||||||
|
opts_tmp = opts;
|
||||||
}
|
}
|
||||||
bctxt = blockif_open(opts_tmp, bident);
|
bctxt = blockif_open(opts_tmp, bident);
|
||||||
if (bctxt == NULL) {
|
if (bctxt == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user