Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
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.
|
|
It should match on the driver of the parent device.
|
|
|
|
Resolve spotted issues related to missing or extraneous commas, dashes.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|