Age | Commit message (Collapse) | Author |
|
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).
|
|
The nodes usually do not exist, so handle the next item instead of
skipping the entire rule.
|
|
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.]
|
|
|
|
This was already supported in path_id, so should be uncontroversial.
|
|
|
|
|
|
including it in the log strings
|
|
Introduce new call getpeercred() which internally just uses SO_PEERCRED
but checks if the returned data is actually useful due to namespace
quirks.
|
|
SipHash appears to be the new gold standard for hashing smaller strings
for hashtables these days, so let's make use of it.
|
|
|
|
Also clean things up a bit here and there.
|
|
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
|
|
also define noreturn w/o <stdnoreturn.h>
|
|
|
|
Since numbers involved are all small, behaviour was correct already.
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
|
|
|
|
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.
|
|
- 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()
{
}
|
|
This reverts commit da66338e17f4df04d9d7cc22ec971b416d57761e.
It is superseeded by 70f75a523b16ad495a7791d595ee3eececf75953
|
|
Also for log_error() except where a specific error is specified
e.g. errno ? strerror(errno) : "Some user specified message"
|
|
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
|
|
Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning
which scan/key code it tried to set.
|
|
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.
|
|
|
|
|
|
|
|
"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.
|
|
|
|
This prevents enable_name_policy() from invariably returning false when
it matches a zero length string at the end of /proc/cmdline.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
Should fix linking with old toolchain.
|
|
Move this to src/share/net-util.c, so it can be used elsewhere.
|
|
|
|
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
|
|
|
|
|
|
|
|
Also reinstate print to kmsg when renaming netif.
|
|
|
|
|
|
|
|
|
|
|