chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemd-python: refuse path and flags together in __init__
[elogind.git]
/
src
/
udev
/
udevadm-monitor.c
diff --git
a/src/udev/udevadm-monitor.c
b/src/udev/udevadm-monitor.c
index 5997dd8e18ae70185575ac4ae445056a77eab299..a390ee6c347c989d7f494ced6be13d58b8ce84ec 100644
(file)
--- a/
src/udev/udevadm-monitor.c
+++ b/
src/udev/udevadm-monitor.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2004-2010 Kay Sievers <kay
.sievers
@vrfy.org>
+ * Copyright (C) 2004-2010 Kay Sievers <kay@vrfy.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-116,7
+116,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
char subsys[UTIL_NAME_SIZE];
char *devtype;
char subsys[UTIL_NAME_SIZE];
char *devtype;
-
util_
strscpy(subsys, sizeof(subsys), optarg);
+ strscpy(subsys, sizeof(subsys), optarg);
devtype = strchr(subsys, '/');
if (devtype != NULL) {
devtype[0] = '\0';
devtype = strchr(subsys, '/');
if (devtype != NULL) {
devtype[0] = '\0';
@@
-162,7
+162,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
fd_ep = epoll_create1(EPOLL_CLOEXEC);
if (fd_ep < 0) {
fd_ep = epoll_create1(EPOLL_CLOEXEC);
if (fd_ep < 0) {
-
err(udev,
"error creating epoll fd: %m\n");
+
log_error(
"error creating epoll fd: %m\n");
goto out;
}
goto out;
}
@@
-204,7
+204,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
ep_udev.events = EPOLLIN;
ep_udev.data.fd = fd_udev;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_udev, &ep_udev) < 0) {
ep_udev.events = EPOLLIN;
ep_udev.data.fd = fd_udev;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_udev, &ep_udev) < 0) {
-
err(udev,
"fail to add fd to epoll: %m\n");
+
log_error(
"fail to add fd to epoll: %m\n");
goto out;
}
goto out;
}
@@
-240,7
+240,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
ep_kernel.events = EPOLLIN;
ep_kernel.data.fd = fd_kernel;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_kernel, &ep_kernel) < 0) {
ep_kernel.events = EPOLLIN;
ep_kernel.data.fd = fd_kernel;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_kernel, &ep_kernel) < 0) {
-
err(udev,
"fail to add fd to epoll: %m\n");
+
log_error(
"fail to add fd to epoll: %m\n");
goto out;
}
goto out;
}
@@
-253,7
+253,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
struct epoll_event ev[4];
int i;
struct epoll_event ev[4];
int i;
- fdcount = epoll_wait(fd_ep, ev,
ARRAY_SIZE
(ev), -1);
+ fdcount = epoll_wait(fd_ep, ev,
ELEMENTSOF
(ev), -1);
if (fdcount < 0) {
if (errno != EINTR)
fprintf(stderr, "error receiving uevent message: %m\n");
if (fdcount < 0) {
if (errno != EINTR)
fprintf(stderr, "error receiving uevent message: %m\n");