summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)Author
2013-11-28Revert "link-config: match length for kernel commandline option"Tom Gundersen
This reverts commit da66338e17f4df04d9d7cc22ec971b416d57761e. It is superseeded by 70f75a523b16ad495a7791d595ee3eececf75953
2013-11-26tree-wide usage of %m specifier instead of strerror(errno)Daniel Buch
Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
2013-11-25conf-parser: distinguish between multiple sections with the same nameTom Gundersen
Pass on the line on which a section was decleared to the parsers, so they can distinguish between multiple sections (if they chose to). Currently no parsers take advantage of this, but a follow-up patch will do that to distinguish [Address] Address=192.168.0.1/24 Label=one [Address] Address=192.168.0.2/24 Label=two from [Address] Address=192.168.0.1/24 Label=one Address=192.168.0.2/24 Label=two
2013-11-25udev-builtin-keyboard: More useful error messageMartin Pitt
Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning which scan/key code it tried to set.
2013-11-25udev: net_setup_link - don't use Description as AliasTom Gundersen
Use Description only internally, and allow Alias to be set as a separate option. For instance SNMP uses ifalias for a specific purpose, so let's not write to it by default.
2013-11-18Remove duplicate includesKarel Zak
2013-11-13udev: declare some symbols staticKay Sievers
2013-11-12udev: declare some symbols staticKay Sievers
2013-11-08Remove dead code and unexport some callsLennart Poettering
"make check-api-unused" informs us about code that is not used anymore or that is exported but only used internally. Fix these all over the place.
2013-11-08link-config: Fix typo in log_warningDave Reisner
2013-11-08link-config: match length for kernel commandline optionDave Reisner
This prevents enable_name_policy() from invariably returning false when it matches a zero length string at the end of /proc/cmdline.
2013-11-08clients: fix some signal handler issuesLennart Poettering
2013-11-07net-util: call ioctl() only if necessaryMichal Sekletar
In case when update of current values is not necessary we still might end up calling ioctl(), because need_update variable is not explicitly initialized.
2013-11-07udevadm-settle: add missing braceZbigniew Jędrzejewski-Szmek
2013-11-07udevadm-trigger: add parameters checkingYang Zhiyong
2013-11-07udevadm-settle: add parameters checkingYang Zhiyong
2013-11-06util: unify reading of /proc/cmdlineLennart Poettering
Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
2013-11-05net-util: don't use libudevTom Gundersen
Should fix linking with old toolchain.
2013-11-04net-config: start split out matching and parsing logicTom Gundersen
Move this to src/share/net-util.c, so it can be used elsewhere.
2013-11-04udev: udevd - rules can be NULL when reloadingKay Sievers
2013-11-04udev-builtin-keyboard: Fix large scan codes on 32 bit architecturesMartin Pitt
Use strtoul(), as scan codes are always positive. On 32 bit architectures strtol gives wrong results: strtol("fffffff0", &endptr, 16) returns 2147483647 instead of 4294967280. https://launchpad.net/bugs/1247676
2013-10-30link-config: support --enable-split-usrDave Reisner
2013-10-30udev: rules - move parsing error to log_error()Kay Sievers
2013-10-30udev: config-link - one less log_infoTom Gundersen
2013-10-30udev: link-config - less verbose loggingTom Gundersen
Also reinstate print to kmsg when renaming netif.
2013-10-30udev: link-config - let udevd set the ifnameTom Gundersen
2013-10-30udev: ata_id: log faling ioctls as "debug"Kay Sievers
2013-10-30udev: do not allow to change the DEVPATH of a deviceKay Sievers
2013-10-29udev: link-config - reset ctx on exitTom Gundersen
2013-10-29udev-event: use rtnl to set ifnameTom Gundersen
2013-10-29rtnl: move set_link_properties to rtnl-utilsTom Gundersen
2013-10-29udev: link-config - split connection to sockets from loading of configsTom Gundersen
We want to load the config in _init, but not connect to the sockets before we are forked.
2013-10-29rtnl: introduce default timeoutTom Gundersen
We set it to 10 secs (as we are only communicating with the kernel, it seems we should be able to bail out sooner than sd-bus, which uses 25). When passing timout 0, the default is used, use this in link-config.
2013-10-29udev: link-config - use safe_atou instead of strtoulTom Gundersen
2013-10-29udev: link-config - use zero instead of memsetTom Gundersen
2013-10-29udev: link-config - use proper return valuesTom Gundersen
Not sure if -ENOENT is the correct return value for when no persistent network name is set, but couldn't think of anything better.
2013-10-29udev: link-config - use new0 instead of callocTom Gundersen
2013-10-29udev: link-config - use _cleanup_ macro locallyTom Gundersen
2013-10-29path_check_timestamp: only keep the most recent timestampTom Gundersen
There is no point in keeping one timestamp for each directory, as we only ever care about the most recent one.
2013-10-29udev: link-config - add proper parsingTom Gundersen
2013-10-29udev: builtin - rename net_link to net_setup_linkTom Gundersen
Also add shell completions.
2013-10-29network: move configuration to /etc/systemd/networkTom Gundersen
This is private configuraiton, so let's not pollute the namespace (and hence make Debian happy :) ).
2013-10-28udev: link-config - add mac address policyTom Gundersen
This introduces a new key MACAddressPolicy. The possible policies are 'persistent' and 'random'. 'persistent' will do nothing if the current address is the hardware address, but if the hardware does not have an address (or another address is set for whatever reason), we will generate an address which will be random, but persistent between boots (based on machineid and persistent netif name). 'random' will do nothing if the kernel already set a random address, otherwise it will generate a random one and use that instead. This patch sets MACAddressPolicy=persistent in the default .link file.
2013-10-28udev: link-config - move naming policy from udev rulesTom Gundersen
This introduces a new key NamePolicy, which takes an ordered list of naming policies. The first successful one is applide. If all fail the value of Name (if any) is used. The possible policies are 'onboard', 'slot', 'path' and 'mac'. This patch introduces a default link file, which replaces the equivalent udev rule.
2013-10-27udev: link-config - sanity check the ifname and mac addressTom Gundersen
2013-10-27udev: link-config: add rtnl supportTom Gundersen
This adds support for setting the mac address, name and mtu. Example: [Link] MTU=1450 MACAddress=98:76:54:32:10:ab Name=wireless0
2013-10-26udev: link-config: add ethtool supportTom Gundersen
This adds support for setting the link speed, duplex and WakeOnLan settings. Example: [Link] SpeedMBytes=100 Duplex=half WakeOnLan=magic
2013-10-26udev: add network link configuration toolTom Gundersen
This tool applies hardware specific settings to network devices before they are announced via libudev. Settings that will probably eventually be supported are MTU, Speed, DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware', 'synthetic' or 'random'), Name and NamePolicy (replacing our current interface naming logic). This patch only introduces support for Description, as a proof of concept. Some of these settings may later be overriden by a network management daemon/script. However, these tools should always listen and wait on libudev before touching a device (listening on netlink is not enough). This is no different from how things used to be, as we always supported changing the network interface name from udev rules, which does not work if someone has already started using it. The tool is configured by .link files in /etc/net/links/ (with the usual overriding logic in /run and /lib). The first (in lexicographical order) matching .link file is applied to a given device, and all others are ignored. The .link files contain a [Match] section with (currently) the keys MACAddress, Driver, Type (see DEVTYPE in udevadm info) and Path (this matches on the stable device path as exposed as ID_PATH, and not the unstable DEVPATH). A .link file matches a given device if all of the specified keys do. Currently the keys are treated as plain strings, but some limited globbing may later be added to the keys where it makes sense. Example: /etc/net/links/50-wireless.link [Match] MACAddress=98:f2:e4:42:c6:92 Path=pci-0000:02:00.0-bcma-0 Type=wlan [Link] Description=The wireless link
2013-10-26udev-builtin: path_id - add support for bcma busTom Gundersen
This matches the bcma support in the network device naming. Eventually wa want to make sure ID_PATH is equivalent to ID_NET_NAME_PATH, so we never need to match on the latter.
2013-10-26udev: move udev_rules_check_timestamp to sharedTom Gundersen
I want to use this from a bulitin in a subsequent patch.