> @@ -4717,10 +4699,14 @@ static void monitor_find_completion_by_table(Monitor > *mon, > break; > case 'B': > /* block device name completion */ > - mbs.mon = mon; > - mbs.input = str; > readline_set_completion_index(mon->rs, strlen(str)); > - bdrv_iterate(block_completion_it, &mbs); > + for (bs = bdrv_next(NULL); bs; bs = bdrv_next(bs)) { > + name = bdrv_get_device_name(bs); > + if (str[0] == '\0' || > + !strncmp(name, str, strlen(str))) { > + readline_add_completion(mon->rs, name); > + } > + } > break; > case 's': > case 'S': > -- > 1.9.3 > Reviewed-by: Benoît Canet <benoit.ca...@nodalink.com>
- [Qemu-devel] [PATCH v2 13/23] virtio-blk: Rename VirtIOB... Markus Armbruster
- [Qemu-devel] [PATCH v2 12/23] virtio-blk: Drop redundant... Markus Armbruster
- [Qemu-devel] [PATCH v2 01/23] block: Split bdrv_new_root... Markus Armbruster
- Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv... Max Reitz
- Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv... Benoît Canet
- Re: [Qemu-devel] [PATCH v2 01/23] block: Split ... Markus Armbruster
- [Qemu-devel] [PATCH v2 06/23] block: Make BlockBackend o... Markus Armbruster
- [Qemu-devel] [PATCH v2 07/23] block: Eliminate bdrv_iter... Markus Armbruster
- Re: [Qemu-devel] [PATCH v2 07/23] block: Eliminate ... Benoît Canet
- [Qemu-devel] [PATCH v2 10/23] block: Eliminate DriveInfo... Markus Armbruster
- Re: [Qemu-devel] [PATCH v2 10/23] block: Eliminate ... Fam Zheng
- Re: [Qemu-devel] [PATCH v2 10/23] block: Elimin... Markus Armbruster
- [Qemu-devel] [PATCH v2 16/23] pc87312: Drop unused membe... Markus Armbruster
- [Qemu-devel] [PATCH v2 05/23] block: Code motion to get ... Markus Armbruster
- Re: [Qemu-devel] [PATCH v2 05/23] block: Code motio... Fam Zheng
- Re: [Qemu-devel] [PATCH v2 05/23] block: Code m... Markus Armbruster
- Re: [Qemu-devel] [PATCH v2 05/23] block: Code motio... Benoît Canet
- [Qemu-devel] [PATCH v2 19/23] blockdev: Drop DriveInfo m... Markus Armbruster