1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

[PATCH] update the man pages and correct Usage: hints

Add UDEV_LOG to the man udev man page. Remove mention of specific
variables from the udevd/udevsend man page as we changed to pass
the whole environment.

Correct printed Usage: of udevtest and udevinfo.

Init the config in udevtest earlier to accept input with and without
the sysfs mount point.
This commit is contained in:
kay.sievers@vrfy.org 2004-11-28 13:41:15 +01:00 committed by Greg KH
parent 16ac31aaee
commit a0294b7625
5 changed files with 35 additions and 38 deletions

View File

@ -4,22 +4,24 @@ udev \- Linux configurable dynamic device naming support
.SH SYNOPSIS
.BI udev " hotplug-subsystem"
.P
The environment must provide the following variables:
The following variables are read from the environment:
.TP
.B ACTION
.IR add " or " remove
signifies the connection or disconnection of a device.
.TP
signifies the addition or the removal of a device.
.P
.B DEVPATH
The sysfs devpath of the device without the mountpoint but a leading slash.
.P
Additional optional environment variables:
.TP
.B SUBSYSTEM
The subsystem the device belongs to. Alternatively the subsystem may
be passed as the first argument.
.P
.B UDEV_CONFIG_FILE
Overrides the default location of the
.B udev
config file.
.TP
.P
.B UDEV_NO_DEVD
The default behavior of
.B udev
@ -34,7 +36,6 @@ provides a dynamic device directory containing only the files for actually
present devices. It creates or removes device node files usually located in
the /dev directory, or it renames network interfaces.
.br
.P
As part of the
.B hotplug
@ -373,9 +374,12 @@ The name of a program must end with
suffix, to be recognized.
.br
In addition to the hotplug environment variables,
.B UDEV_LOG
is set if udev is configured to use the syslog facility. Executed programs may
want to follow that setting.
.B DEVNAME
is exported to make the name of the created node, or the name the network
device is renamed to, available to the executed program. The programs in every
device is renamed to, available to the executed program. The programs in every
directory are sorted in lexical order, while the directories are searched in
the following order:
.sp

29
udevd.8
View File

@ -3,19 +3,6 @@
udevd, udevdsend \- udev event serializer daemon and udev event sender
.SH SYNOPSIS
.BI udevsend " hotplug-subsystem"
.sp
The environment must provide the following variables:
.TP
.B ACTION
.IR add " or " remove
signifies the connection or disconnection of a device.
.TP
.B DEVPATH
The sysfs devpath of the device without the mountpoint but a leading slash.
.TP
.B SEQNUM
The sequence number of the event provided by the kernel.
If unset, the event bypasses the queue and will be executed immediately.
.SH "DESCRIPTION"
.B udevd
allows the serialization of
@ -24,15 +11,19 @@ events. The events generated by the kernel may arrive in random order
in userspace, that makes it neccessary to reorder them.
.br
.B udevd
takes care of the kernel supplied sequence number and arranges the events for
execution in the correct order. Missing sequences delay the execution of the
following events until a timeout is reached.
takes care of the kernel supplied
.B SEQNUM
sequence number and arranges the events for execution in the correct order.
Missing sequences delay the execution of the following events until a timeout
is reached. Events without any sequence number are bypassing the queue and
will be executed immediately.
.br
For each event a
.BR udev (8)
instance is executed in the background. All further events for the same device
are delayed until the execution is finished. This way there will never be more
than one instance running for a single device at the same time.
instance is executed in the background with the complete environment received
by the hotplug event. All further events for the same device are delayed until
the execution is finished. This way there will never be more than one instance
running for a single device at the same time.
.br
.B udevd
receives the events from

View File

@ -439,7 +439,7 @@ exit:
}
help:
printf("Usage: [-anpqrdVh]\n"
printf("Usage: udevinfo [-anpqrdVh]\n"
" -q TYPE query database for the specified value:\n"
" 'name' name of device node\n"
" 'symlink' pointing to node\n"

View File

@ -2,7 +2,8 @@
.SH NAME
udevtest \- simulates a udev run to test the configured rules
.SH SYNOPSIS
.BI udevtest " sysfs_device_path"
.B udevtest
.IR "sysfs_device_path " [ subsystem ]
.SH "DESCRIPTION"
.B udevtest
simulates a

View File

@ -55,19 +55,23 @@ int main(int argc, char *argv[], char *envp[])
char *devpath;
char path[SYSFS_PATH_MAX];
char temp[NAME_SIZE];
char *subsystem = "";
struct udevice udev;
char *subsystem = NULL;
info("version %s", UDEV_VERSION);
if (argv[1] == NULL) {
info("udevinfo expects the DEVPATH of the sysfs device as a argument");
if (argc < 2 || argc > 3) {
info("Usage: udevtest <devpath> [subsystem]");
return 1;
}
/* initialize our configuration */
udev_init_config();
/* remove sysfs_path if given */
if (strncmp(argv[1], sysfs_path, strlen(sysfs_path)) == 0)
devpath = argv[1] + strlen(sysfs_path);
if (strncmp(argv[1], sysfs_path, strlen(sysfs_path)) == 0) {
devpath = &argv[1][strlen(sysfs_path)] ;
}
else
if (argv[1][0] != '/') {
/* prepend '/' if missing */
@ -86,13 +90,10 @@ int main(int argc, char *argv[], char *envp[])
return 2;
}
/* initialize our configuration */
udev_init_config();
/* initialize the naming deamon */
namedev_init();
if (argv[2] != NULL)
if (argc == 3)
subsystem = argv[2];
/* fill in values and test_run flag*/