summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)AuthorFilesLines
2018-11-20Split out pretty-print.c and move pager.c and main-func.h to shared/Zbigniew Jędrzejewski-Szmek2-2/+2
This is high-level functionality, and fits better in shared/ (which is for our executables), than in basic/ (which is also for libraries).
2018-11-20libudev-list: move libudev-list related definitions to libudev-list-internal.hYu Watanabe11-15/+21
This also rename libudev-private.h to libudev-util.h, and cleanups several unnecessary headers from udev.h and libudev-util.h
2018-11-20udev: move definition of READ_END and WRITE_END from libudev-private.h to udev.hYu Watanabe1-1/+4
2018-11-19Merge pull request #10698 from yuwata/udevd-replace-udev-deviceLennart Poettering1-356/+450
udevd: replace udev_device by sd_device
2018-11-18basic/missing: drop _ETHTOOL_LINK_MODE_MAXZbigniew Jędrzejewski-Szmek1-1/+1
It was only used in one place, where we don't actually need it, and it is too easy to forget to update it when adding new items to the table. Let's just drop it.
2018-11-18udev: use an "inline" array instead of allocating for advertise modeZbigniew Jędrzejewski-Szmek3-23/+12
The code is a bit shorter and we don't allocate the uint32_t[127] array.
2018-11-18ethtool: drop NetDevAdvertiseYu Watanabe4-52/+81
Fixes #10807.
2018-11-17udevd: replace udev_device in struct event by sd_deviceYu Watanabe1-66/+130
2018-11-17udevd: update several log messagesYu Watanabe1-50/+49
2018-11-17udevd: decrease indentationYu Watanabe1-10/+6
2018-11-17udevd: rename event sources in struct eventYu Watanabe1-6/+7
2018-11-17udevd: capitalize log messages in on_sigchld()Yu Watanabe1-9/+13
2018-11-17udevd: also use sd_device_monitor_start() in worker_main()Yu Watanabe1-67/+53
2018-11-17udevd: use sd_device_monitor_start() in manager_new()Yu Watanabe1-16/+9
2018-11-17udevd: replace udev_monitor by sd_device_monitorYu Watanabe1-51/+62
2018-11-17udevd: use safe_fork() to spawn worker processYu Watanabe1-27/+20
2018-11-17udevd: make worker_process_device() take sd_device instead of udev_deviceYu Watanabe1-8/+17
2018-11-17udevd: make worker_lock_block_device() take sd_device instead of udev_deviceYu Watanabe1-16/+38
Also adds many debug logs.
2018-11-17udevd: split worker_spawn() and manager_free() in small piecesYu Watanabe1-171/+187
2018-11-16udevd: use event_source_disable()Yu Watanabe1-17/+14
2018-11-16udevd: use event_reset_time() to update kill_workers_eventYu Watanabe1-44/+4
2018-11-15udev-rules: fix possible assertionYu Watanabe1-1/+2
On 'remove' action, event->dev_db_clone is NULL. So, `IMPORT{db}` rule on 'remove' action triggers assertion. This fixes the issue.
2018-11-14Merge pull request #10753 from keszybz/pager-no-interruptLennart Poettering1-1/+0
Add mode in journalctl where ^C is handled by the pager
2018-11-14Move LONG_LINE_MAX definition to fileio.hZbigniew Jędrzejewski-Szmek1-1/+0
All users of the macro (except for one, in serialize.c), use the macro in connection with read_line(), so they must include fileio.h. Let's not play libc games and require multiple header file to be included for the most common use of a function. The removal of def.h includes is not exact. I mostly went over the commits that switch over to use read_line() and add def.h at the same time and reverted the addition of def.h in those files.
2018-11-14Merge pull request #10759 from keszybz/udevd-more-configurationLennart Poettering6-60/+28
Udevd more configuration options
2018-11-13udev: downgrade message when we fail to set inotify watch upZbigniew Jędrzejewski-Szmek2-2/+5
My logs are full of: systemd-udevd[6586]: seq 13515 queued, 'add' 'block' systemd-udevd[6586]: seq 13516 queued, 'change' 'block' systemd-udevd[6586]: seq 13517 queued, 'change' 'block' systemd-udevd[6586]: seq 13518 queued, 'remove' 'bdi' systemd-udevd[6586]: seq 13519 queued, 'remove' 'block' systemd-udevd[9865]: seq 13514 processed systemd-udevd[9865]: seq 13515 running systemd-udevd[9865]: GROUP 6 /usr/lib/udev/rules.d/50-udev-default.rules:59 systemd-udevd[9865]: IMPORT builtin 'blkid' /usr/lib/udev/rules.d/60-persistent-storage.rules:95 systemd-udevd[9865]: IMPORT builtin 'blkid' fails: No such file or directory systemd-udevd[9865]: loop4: Failed to add device '/dev/loop4' to watch: No such file or directory (the last line is at error level). If we are too slow to set up a watch and the device is already gone by the time we try, this is not an error.
2018-11-13udev: also allow resolve_names= to be specified in udev.confZbigniew Jędrzejewski-Szmek2-1/+2
2018-11-13udev: move ResolveNameTiming definition and parsers to udev-util.hZbigniew Jędrzejewski-Szmek2-20/+1
Follow-up for c4d44cba4d9bd9d92c86e06f21d5936cca1b8c16. No functional change, but the parser is moved to libsystemd-shared.so.
2018-11-13udevd: allow more parameters to be set through udev.confZbigniew Jędrzejewski-Szmek2-2/+5
Rebooting to set change the kernel command line to set some udev parameters is inconvenient. Let's allow setting more stuff in the config file. Also drop quotes from around "info" in udev.conf. We need to accept them for compatibility, but there is no reason to use them.
2018-11-13udev: do not pass timeout_warn_usec around, calculate it on demandZbigniew Jędrzejewski-Szmek5-39/+22
It was always set to one third of timeout_usec, so let's simplify things by calculating it using a helper function right before it is used. Before 9d9264ba39f797d20100c8acfda3df895ab5aaa2, udevd.c would avoid setting timeout_warn_usec to 0, using 1 instead. This wasn't necessary, because when timeout_warn_usec is finally used in spawn_wait(), it is ignored if timeout_usec is 0 or timeout_warn_usec is 0. So there was no need to handle this case specially.
2018-11-12Always rename an interface to its name specified in config if no NamePolicy= ↵Mathieu Trudel-Lapierre1-11/+2
is specified This is for issue #9006
2018-11-12udev: use structured initializer at one more placeYu Watanabe1-8/+6
2018-11-12udev: drop redundant initializations for file descriptorsYu Watanabe1-50/+24
As udev_ctrl_new_from_fd() or udev_monitor_new_from_netlink_fd() creates fd if negative fd is passed.
2018-11-12udev: handle sd_is_socket() failureYu Watanabe1-2/+2
2018-11-12udev: drop util_log_priority() and use log_level_from_string()Yu Watanabe2-10/+8
The function util_log_priority() is almost same as log_level_from_string(). The difference between them is only that util_log_priority() accepts such that '3 hogehoge'.
2018-11-12udev: use parse_sec() to parse --event-timeout optionYu Watanabe1-11/+7
2018-11-12udev: include error cause of parsing --children-max option in log messageYu Watanabe1-1/+1
2018-11-12udev: introduce enum ResolveNameTiming for --resolve-names argumentYu Watanabe4-32/+47
2018-11-12udevd: use parse_sec() to parse --exec-delay optionYu Watanabe3-11/+11
2018-11-12udevd: explicitly set default value of global variablesYu Watanabe1-2/+2
2018-11-12Merge pull request #10734 from yuwata/network-use-structured-initializersLennart Poettering2-7/+9
network: several cleanups
2018-11-12tree-wide: use CONFIG_PARSER_PROTOTYPE() macroYu Watanabe2-7/+9
2018-11-12udevd: do not treat negative value as valid ifindexYu Watanabe1-8/+3
Also, some conditions in is_devpath_busy() are similified.
2018-11-10sd-device: drop priority and description from ↵Yu Watanabe2-4/+7
sd_device_monitor_attach_event() and sd_device_monitor_start() Now we have sd_device_monitor_get_event_soruce(). So, it is not necessary to include these parameters in the functions for sd_device_monitor.
2018-11-07udevadm-test: replace udev_device by sd_deviceYu Watanabe1-11/+13
2018-11-07udev-event: make udev_event_new() take sd_device instead of udev_deviceYu Watanabe5-25/+24
2018-11-07udev-rules: replace udev_device by sd_device in udev_rules_apply_to_event()Yu Watanabe1-73/+83
2018-11-07udev-rules: replace two udev_list_entry_foreach() by corresponding ↵Yu Watanabe1-11/+8
FOREACH_DEVICE_*() macros
2018-11-07udev-rules: use structured initializerYu Watanabe1-3/+6
2018-11-07udev-rules: drop unused member file_list in struct udev_rulesYu Watanabe1-2/+0