summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)Author
2014-02-13everywhere: always use O_CLOEXEC where it makes senseLennart Poettering
2014-02-13everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
2014-02-13rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering
The "sd_" prefix is supposed to be used on exported symbols only, and not in the middle of names. Let's drop it from the cleanup macros hence, to make things simpler. The bus cleanup macros don't carry the "sd_" either, so this brings the APIs a bit nearer.
2014-02-05Update some message formatsZbigniew Jędrzejewski-Szmek
Use PID_FMT/USEC_FMT/... in more places. Also update logind error messages to print the full path to a file that failed. This should make debugging easier for people who do not know off the top of their head where logind stores it state.
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2014-01-22udev: static_node - do not exit rule after first static_node itemKay Sievers
The nodes usually do not exist, so handle the next item instead of skipping the entire rule.
2014-01-11udev/net_id: Introduce predictable network names for Linux on System zHendrik Brueckner
Use the bus-ID to create predicatable devices names for network interfaces on Linux on System z instances. The bus-ID identifies a device in the s390 channel subsystem. Network interfaces of device type Ethernet are named as: enccw0.0.1234 (13 characters) up to enccwff.7.ffff (14 characters) CTC network devices of device type SLIP, use a different prefix as follows: slccw0.0.1234 (13 characters) See also Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=870859 [tomegun: typical problem of netdevs switching names between reboots.]
2014-01-08No need to canonicalize fixed pathsZbigniew Jędrzejewski-Szmek
2014-01-04udev: net_id - handle virtio busesTom Gundersen
This was already supported in path_id, so should be uncontroversial.
2013-12-29udev: LOG_PRIORITY -> LOG_LEVELKay Sievers
2013-12-26systemctl: allow globbing in commands which take multiple unit namesZbigniew Jędrzejewski-Szmek
2013-12-24log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering
including it in the log strings
2013-12-24util: unify SO_PEERCRED/SO_PEERSEC invocationsLennart Poettering
Introduce new call getpeercred() which internally just uses SO_PEERCRED but checks if the returned data is actually useful due to namespace quirks.
2013-12-22shared: switch our hash table implementation over to SipHashLennart Poettering
SipHash appears to be the new gold standard for hashing smaller strings for hashtables these days, so let's make use of it.
2013-12-18udevadm: modernizationZbigniew Jędrzejewski-Szmek
2013-12-18udevadm,scsi_id: add short options to help strings and to the man pageZbigniew Jędrzejewski-Szmek
Also clean things up a bit here and there.
2013-12-18scsi_id: cleanupZbigniew Jędrzejewski-Szmek
Remove -i option which would case exit(1) to happen. Remove some unused code. Convert to bool where appropriate. Simplify things a bit. Always free everything. https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-17_noreturn_ --> noreturn for C11 compatShawn Landden
also define noreturn w/o <stdnoreturn.h>
2013-12-17udev link-config: add asserts to silence scan-buildThomas Hindoe Paaboel Andersen
2013-12-15Fix a few signed/unsigned format string issuesZbigniew Jędrzejewski-Szmek
Since numbers involved are all small, behaviour was correct already. https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-15Fix a few resource leaks in error pathsZbigniew Jędrzejewski-Szmek
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-14udev-builtin-path: fix printf specifiersZbigniew Jędrzejewski-Szmek
2013-12-14Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen
Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there.
2013-12-03trivial coding style clean upsThomas Hindoe Paaboel Andersen
- Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
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