/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2012 Lennart Poettering
-***/
#include <errno.h>
#include <fcntl.h>
#include "alloc-util.h"
#include "fd-util.h"
#include "logind-button.h"
+#include "missing_input.h"
#include "string-util.h"
#include "util.h"
r = button_suitable(b);
if (r < 0)
return log_warning_errno(r, "Failed to determine whether input device is relevant to us: %m");
- if (r == 0) {
- log_debug("Device %s does not expose keys or switches relevant to us, ignoring.", p);
- return -EADDRNOTAVAIL;
- }
+ if (r == 0)
+ return log_debug_errno(SYNTHETIC_ERRNO(EADDRNOTAVAIL),
+ "Device %s does not expose keys or switches relevant to us, ignoring.",
+ p);
if (ioctl(b->fd, EVIOCGNAME(sizeof(name)), name) < 0) {
r = log_error_errno(errno, "Failed to get input name: %m");