chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45a7b66
)
[PATCH] trivial cleanups and change some comments
author
kay.sievers@vrfy.org
<kay.sievers@vrfy.org>
Mon, 29 Nov 2004 01:15:55 +0000
(
02:15
+0100)
committer
Greg KH
<gregkh@suse.de>
Wed, 27 Apr 2005 06:00:29 +0000
(23:00 -0700)
udev.c
patch
|
blob
|
history
udev.h
patch
|
blob
|
history
diff --git
a/udev.c
b/udev.c
index 847cc5dade49bdf177082e5f8a4ae88110e70c9d..ca79bb4ec0e37812770ceaea2b76acf901d9e438 100644
(file)
--- a/
udev.c
+++ b/
udev.c
@@
-111,17
+111,22
@@
int main(int argc, char *argv[], char *envp[])
act.sa_handler = (void (*) (int))sig_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = (void (*) (int))sig_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = 0;
- /* alarm must not restart syscalls*/
sigaction(SIGALRM, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
sigaction(SIGALRM, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
- /* trigger timeout to
interrupt blocking syscall
s */
+ /* trigger timeout to
prevent hanging processe
s */
alarm(ALARM_TIMEOUT);
alarm(ALARM_TIMEOUT);
+ action = getenv("ACTION");
+ devpath = getenv("DEVPATH");
+ subsystem = getenv("SUBSYSTEM");
+ /* older kernels passed the SUBSYSTEM only as argument */
+ if (!subsystem && argc == 2)
+ subsystem = argv[1];
udev_init_device(&udev, devpath, subsystem);
udev_init_device(&udev, devpath, subsystem);
- if (strstr(argv[0], "udevstart") || (arg
v[1] != NULL
&& strstr(argv[1], "udevstart"))) {
+ if (strstr(argv[0], "udevstart") || (arg
c == 2
&& strstr(argv[1], "udevstart"))) {
dbg("udevstart");
/* disable all logging, as it's much too slow on some facilities */
dbg("udevstart");
/* disable all logging, as it's much too slow on some facilities */
diff --git
a/udev.h
b/udev.h
index 2c5270a4c34bd28cee6c8c064d69dc0e9d2e1901..0703b884cfd85b5c75392fa0afbff5d306963913 100644
(file)
--- a/
udev.h
+++ b/
udev.h
@@
-50,14
+50,17
@@
struct udevice {
char devpath[DEVPATH_SIZE];
char subsystem[SUBSYSTEM_SIZE];
struct udevice {
char devpath[DEVPATH_SIZE];
char subsystem[SUBSYSTEM_SIZE];
+
char name[NAME_SIZE];
char name[NAME_SIZE];
+ char symlink[NAME_SIZE];
char owner[OWNER_SIZE];
char group[GROUP_SIZE];
char owner[OWNER_SIZE];
char group[GROUP_SIZE];
+ mode_t mode;
char type;
int major;
int minor;
char type;
int major;
int minor;
- mode_t mode;
- char
symlink
[NAME_SIZE];
+
+ char
devname
[NAME_SIZE];
int partitions;
int ignore_remove;
int config_line;
int partitions;
int ignore_remove;
int config_line;
@@
-67,7
+70,6
@@
struct udevice {
char program_result[NAME_SIZE];
char kernel_number[NAME_SIZE];
char kernel_name[NAME_SIZE];
char program_result[NAME_SIZE];
char kernel_number[NAME_SIZE];
char kernel_name[NAME_SIZE];
- char devname[NAME_SIZE];
int test_run;
};
int test_run;
};