• M
    block: Make bdrv_open() return a BDS · 5b363937
    Max Reitz 提交于
    There are no callers to bdrv_open() or bdrv_open_inherit() left that
    pass a pointer to a non-NULL BDS pointer as the first argument of these
    functions, so we can finally drop that parameter and just make them
    return the new BDS.
    
    Generally, the following pattern is applied:
    
        bs = NULL;
        ret = bdrv_open(&bs, ..., &local_err);
        if (ret < 0) {
            error_propagate(errp, local_err);
            ...
        }
    
    by
    
        bs = bdrv_open(..., errp);
        if (!bs) {
            ret = -EINVAL;
            ...
        }
    
    Of course, there are only a few instances where the pattern is really
    pure.
    Signed-off-by: NMax Reitz <mreitz@redhat.com>
    Reviewed-by: NKevin Wolf <kwolf@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    5b363937
vvfat.c 86.7 KB