• M
    virbpf: Set errno instead of reporting errors · 9fe6c1dc
    Michal Privoznik 提交于
    The virbpf module wraps syscalls to BPF. However, if the kernel
    headers used at the compile time don't have support for BPF the
    module offers stubs which return a negative one to signal error
    to the caller. But there is a slight discrepancy between real
    functions and these stubs. While the former set errno and return
    -1 the latter report an error (without setting the errno) and
    return -1. This is not optimal because the caller might see stale
    errno and overwrite the error message with a less accurate one.
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
    9fe6c1dc
POTFILES.in 12.2 KB