]> Git Repo - qemu.git/commit
block/rbd: don't copy strings in qemu_rbd_next_tok()
authorJeff Cody <[email protected]>
Fri, 24 Feb 2017 15:30:33 +0000 (10:30 -0500)
committerJeff Cody <[email protected]>
Tue, 28 Feb 2017 16:32:06 +0000 (11:32 -0500)
commit7830f909981361a3d694f4899d5cd7b159841d9e
tree2a546418ac7c1a883ea0554165fe6d5052cd5ba7
parentc8c0a1a784cdf70ecea50e93213137c6c89337a7
block/rbd: don't copy strings in qemu_rbd_next_tok()

This patch is prep work for parsing options for .bdrv_parse_filename,
and using QDict options.

The function qemu_rbd_next_tok() searched for various key/value pairs,
and copied them into buffers.  This will soon be an unnecessary extra
step, so we will now return found strings by reference only, and
offload the responsibility for safely handling/coping these strings to
the caller.

This also cleans up error handling some, as the callers now rely on
the Error object to determine if there is a parse error.

Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
block/rbd.c
This page took 0.025932 seconds and 4 git commands to generate.