mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
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: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b51bfa7055
commit
91268c715c
@ -30,11 +30,6 @@ AC_DEFUN([LIBVIRT_CHECK_UDEV],[
|
||||
fi
|
||||
|
||||
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_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $UDEV_CFLAGS"
|
||||
|
@ -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
|
||||
udevTranslatePCIIds(unsigned int vendor,
|
||||
unsigned int product,
|
||||
@ -1872,10 +1835,6 @@ nodeStateInitialize(bool privileged,
|
||||
_("failed to create udev context"));
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user