• M
    block/nbd: Add nbd_has_filename_options_conflict() · 48c38e0b
    Max Reitz 提交于
    Right now, we have four possible options that conflict with specifying
    an NBD filename, and a future patch will add another one ("address").
    This future option is a nested QDict that is flattened at this point,
    requiring us to test each option whether its key has an "address."
    prefix. Therefore, we will then need to iterate through all options
    (including the "export" option which was not covered so far).
    
    Adding this iteration logic now will simplify adding the new option
    later. A nice side effect is that the user will not receive a long list
    of five options which are not supposed to be specified with a filename,
    but we can actually print the problematic option.
    Reviewed-by: NKevin Wolf <kwolf@redhat.com>
    Signed-off-by: NMax Reitz <mreitz@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    48c38e0b
nbd.c 15.8 KB