[libvirt] [PATCH] util: remove error log from stub versions of virNetlinkEventServiceStart|Stop

These two functions are called from main() on all platforms, and always return success on platforms that don't support libnl. They still log an error message, though, which doesn't make sense - they should just be NOPs on those platforms. --- src/util/virnetlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index a249e94..34d56ef 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -615,7 +615,6 @@ int virNetlinkCommand(struct nl_msg *nl_msg ATTRIBUTE_UNUSED, */ int virNetlinkEventServiceStop(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; } @@ -625,7 +624,6 @@ int virNetlinkEventServiceStop(void) */ int virNetlinkEventServiceStart(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; } -- 1.7.10

On Thu, May 03, 2012 at 11:58:02AM -0400, Laine Stump wrote:
These two functions are called from main() on all platforms, and always return success on platforms that don't support libnl. They still log an error message, though, which doesn't make sense - they should just be NOPs on those platforms. --- src/util/virnetlink.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index a249e94..34d56ef 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -615,7 +615,6 @@ int virNetlinkCommand(struct nl_msg *nl_msg ATTRIBUTE_UNUSED, */ int virNetlinkEventServiceStop(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; }
@@ -625,7 +624,6 @@ int virNetlinkEventServiceStop(void) */ int virNetlinkEventServiceStart(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; }
ACK, though perhaps change them to VIR_DEBUG just to reminder us that they are intentionally no-op. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 2012年05月03日 23:58, Laine Stump wrote:
These two functions are called from main() on all platforms, and always return success on platforms that don't support libnl. They still log an error message, though, which doesn't make sense - they should just be NOPs on those platforms. --- src/util/virnetlink.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index a249e94..34d56ef 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -615,7 +615,6 @@ int virNetlinkCommand(struct nl_msg *nl_msg ATTRIBUTE_UNUSED, */ int virNetlinkEventServiceStop(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; }
@@ -625,7 +624,6 @@ int virNetlinkEventServiceStop(void) */ int virNetlinkEventServiceStart(void) { - netlinkError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); return 0; }
ACK, seems there are similiar problems in many places. e.g. nodeGetFreeMemory. Osier
participants (3)
-
Daniel P. Berrange
-
Laine Stump
-
Osier Yang