chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dhcp: Add DHCP discover sending
[elogind.git]
/
src
/
udev
/
udevadm-monitor.c
diff --git
a/src/udev/udevadm-monitor.c
b/src/udev/udevadm-monitor.c
index 6a202f04ca7ce65cf5fff3777374c1d8119c04cd..4d6af49b963a32577022618a5a12d833faef5716 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
@@
-66,7
+66,7
@@
static void print_device(struct udev_device *device, const char *source, int pro
static int adm_monitor(struct udev *udev, int argc, char *argv[])
{
static int adm_monitor(struct udev *udev, int argc, char *argv[])
{
- struct sigaction act;
+ struct sigaction act
= {}
;
sigset_t mask;
int option;
bool prop = false;
sigset_t mask;
int option;
bool prop = false;
@@
-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';
@@
-149,9
+149,7
@@
static int adm_monitor(struct udev *udev, int argc, char *argv[])
}
/* set signal handlers */
}
/* set signal handlers */
- memset(&act, 0x00, sizeof(struct sigaction));
act.sa_handler = sig_handler;
act.sa_handler = sig_handler;
- sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
@@
-253,7
+251,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");