• D
    Introduce virReportError macro for general error reporting · 7e94acd4
    Daniel P. Berrange 提交于
    Nearly every source file does something like
    
      #define VIR_FROM_THIS VIR_FROM_FOO
      #define virFooReportErorr(code, ...) \
         virReportErrorHelper(VIR_FROM_THIS, code,  __FILE__,    \
                              __FUNCTION__, __LINE__, \
                              __VA_ARGS__)
    
    This creates needless duplication and inconsistent error
    reporting function names in each file. It is trivial to
    just have virterror_internal.h provide a virReportError
    macro that is equivalent
    
    * src/util/virterror_internal.h: Define virReportError(code, ...)
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    7e94acd4
cfg.mk 29.9 KB