summaryrefslogtreecommitdiffstats
path: root/src/udev (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering2014-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
* udev: net-config - allow interface names to be set from the hwdbTom Gundersen2014-02-192-0/+5
|
* udev: make sure we always return a valid error code in trie_store()Lennart Poettering2014-02-191-6/+5
|
* make gcc shut upLennart Poettering2014-02-191-1/+1
| | | | | | | If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
* net-match: fix Driver= matchTom Gundersen2014-02-181-1/+1
| | | | It should match on the driver of the parent device.
* Remove unused variable and two function stubsZbigniew Jędrzejewski-Szmek2014-02-181-2/+0
|
* doc: update punctuationJan Engelhardt2014-02-181-2/+2
| | | | Resolve spotted issues related to missing or extraneous commas, dashes.
* everywhere: always use O_CLOEXEC where it makes senseLennart Poettering2014-02-139-12/+11
|
* everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering2014-02-135-9/+9
|
* rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering2014-02-131-1/+1
| | | | | | | | | 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.
* Update some message formatsZbigniew Jędrzejewski-Szmek2014-02-061-9/+9
| | | | | | | | 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.
* use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH2014-01-318-26/+26
| | | | | | | | 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).
* udev: static_node - do not exit rule after first static_node itemKay Sievers2014-01-221-11/+10
| | | | | The nodes usually do not exist, so handle the next item instead of skipping the entire rule.
* udev/net_id: Introduce predictable network names for Linux on System zHendrik Brueckner2014-01-111-2/+62
| | | | | | | | | | | | | | | | | 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.]
* No need to canonicalize fixed pathsZbigniew Jędrzejewski-Szmek2014-01-092-40/+20
|
* udev: net_id - handle virtio busesTom Gundersen2014-01-041-0/+37
| | | | This was already supported in path_id, so should be uncontroversial.
* udev: LOG_PRIORITY -> LOG_LEVELKay Sievers2013-12-291-1/+1
|
* systemctl: allow globbing in commands which take multiple unit namesZbigniew Jędrzejewski-Szmek2013-12-261-1/+1
|
* log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2013-12-2424-415/+415
| | | | including it in the log strings
* util: unify SO_PEERCRED/SO_PEERSEC invocationsLennart Poettering2013-12-241-5/+5
| | | | | | Introduce new call getpeercred() which internally just uses SO_PEERCRED but checks if the returned data is actually useful due to namespace quirks.
* shared: switch our hash table implementation over to SipHashLennart Poettering2013-12-221-17/+21
| | | | | SipHash appears to be the new gold standard for hashing smaller strings for hashtables these days, so let's make use of it.
* udevadm: modernizationZbigniew Jędrzejewski-Szmek2013-12-196-107/+72
|
* udevadm,scsi_id: add short options to help strings and to the man pageZbigniew Jędrzejewski-Szmek2013-12-199-220/+198
| | | | Also clean things up a bit here and there.
* scsi_id: cleanupZbigniew Jędrzejewski-Szmek2013-12-192-79/+71
| | | | | | | | | | 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
* _noreturn_ --> noreturn for C11 compatShawn Landden2013-12-171-1/+1
| | | | also define noreturn w/o <stdnoreturn.h>
* udev link-config: add asserts to silence scan-buildThomas Hindoe Paaboel Andersen2013-12-171-0/+3
|
* Fix a few signed/unsigned format string issuesZbigniew Jędrzejewski-Szmek2013-12-151-14/+7
| | | | | | Since numbers involved are all small, behaviour was correct already. https://bugzilla.redhat.com/show_bug.cgi?id=1043304
* Fix a few resource leaks in error pathsZbigniew Jędrzejewski-Szmek2013-12-151-1/+1
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1043304
* udev-builtin-path: fix printf specifiersZbigniew Jędrzejewski-Szmek2013-12-151-2/+2
|
* Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen2013-12-146-0/+6
| | | | | | | | | | | 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.
* trivial coding style clean upsThomas Hindoe Paaboel Andersen2013-12-034-4/+4
| | | | | | | | | | | | | | - 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() { }
* Revert "link-config: match length for kernel commandline option"Tom Gundersen2013-11-281-1/+1
| | | | | | This reverts commit da66338e17f4df04d9d7cc22ec971b416d57761e. It is superseeded by 70f75a523b16ad495a7791d595ee3eececf75953
* tree-wide usage of %m specifier instead of strerror(errno)Daniel Buch2013-11-264-10/+8
| | | | | | Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
* conf-parser: distinguish between multiple sections with the same nameTom Gundersen2013-11-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* udev-builtin-keyboard: More useful error messageMartin Pitt2013-11-251-1/+1
| | | | | Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning which scan/key code it tried to set.
* udev: net_setup_link - don't use Description as AliasTom Gundersen2013-11-253-10/+5
| | | | | | 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.
* Remove duplicate includesKarel Zak2013-11-192-5/+0
|
* udev: declare some symbols staticKay Sievers2013-11-132-11/+1
|
* udev: declare some symbols staticKay Sievers2013-11-121-1/+1
|
* Remove dead code and unexport some callsLennart Poettering2013-11-081-1/+1
| | | | | | "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.
* link-config: Fix typo in log_warningDave Reisner2013-11-081-2/+1
|
* link-config: match length for kernel commandline optionDave Reisner2013-11-081-1/+1
| | | | | This prevents enable_name_policy() from invariably returning false when it matches a zero length string at the end of /proc/cmdline.
* clients: fix some signal handler issuesLennart Poettering2013-11-081-3/+1
|
* net-util: call ioctl() only if necessaryMichal Sekletar2013-11-071-2/+2
| | | | | 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.
* udevadm-settle: add missing braceZbigniew Jędrzejewski-Szmek2013-11-071-0/+1
|
* udevadm-trigger: add parameters checkingYang Zhiyong2013-11-071-2/+15
|
* udevadm-settle: add parameters checkingYang Zhiyong2013-11-071-8/+16
|
* util: unify reading of /proc/cmdlineLennart Poettering2013-11-062-8/+11
| | | | | | 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.
* net-util: don't use libudevTom Gundersen2013-11-051-2/+7
| | | | Should fix linking with old toolchain.
* net-config: start split out matching and parsing logicTom Gundersen2013-11-044-176/+28
| | | | Move this to src/share/net-util.c, so it can be used elsewhere.