提交 91268c71 编写于 作者: P Pavel Hrdina

node_device_udev: remove deprecated logging function

The function was deprecated in udev 219 and all the supported OSes
don't have older version of udev or systemd.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 b51bfa70
...@@ -30,11 +30,6 @@ AC_DEFUN([LIBVIRT_CHECK_UDEV],[ ...@@ -30,11 +30,6 @@ AC_DEFUN([LIBVIRT_CHECK_UDEV],[
fi fi
if test "$with_udev" = "yes" ; then if test "$with_udev" = "yes" ; then
PKG_CHECK_EXISTS([libudev >= 218], [with_udev_logging=no], [with_udev_logging=yes])
if test "$with_udev_logging" = "yes" ; then
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1, [whether libudev logging can be used])
fi
old_CFLAGS="$CFLAGS" old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS" old_LIBS="$LIBS"
CFLAGS="$CFLAGS $UDEV_CFLAGS" CFLAGS="$CFLAGS $UDEV_CFLAGS"
......
...@@ -318,43 +318,6 @@ udevGenerateDeviceName(struct udev_device *device, ...@@ -318,43 +318,6 @@ udevGenerateDeviceName(struct udev_device *device,
} }
#if HAVE_UDEV_LOGGING
typedef void
(*udevLogFunctionPtr)(struct udev *udev,
int priority,
const char *file,
int line,
const char *fn,
const char *format,
va_list args);
static void
ATTRIBUTE_FMT_PRINTF(6, 0)
udevLogFunction(struct udev *udev ATTRIBUTE_UNUSED,
int priority,
const char *file,
int line,
const char *fn,
const char *fmt,
va_list args)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
char *format = NULL;
virBufferAdd(&buf, fmt, -1);
virBufferTrim(&buf, "\n", -1);
format = virBufferContentAndReset(&buf);
virLogVMessage(&virLogSelf,
virLogPriorityFromSyslog(priority),
file, line, fn, NULL, format ? format : fmt, args);
VIR_FREE(format);
}
#endif
static int static int
udevTranslatePCIIds(unsigned int vendor, udevTranslatePCIIds(unsigned int vendor,
unsigned int product, unsigned int product,
...@@ -1872,10 +1835,6 @@ nodeStateInitialize(bool privileged, ...@@ -1872,10 +1835,6 @@ nodeStateInitialize(bool privileged,
_("failed to create udev context")); _("failed to create udev context"));
goto cleanup; goto cleanup;
} }
#if HAVE_UDEV_LOGGING
/* cast to get rid of missing-format-attribute warning */
udev_set_log_fn(udev, (udevLogFunctionPtr) udevLogFunction);
#endif
virObjectLock(priv); virObjectLock(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册