1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
systemd-stable/src
Lennart Poettering 151b9b9662 api: in constructor function calls, always put the returned object pointer 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.
2014-02-20 00:03:10 +01:00
..
ac-power
activate acticate: rename --environment to --setenv 2013-12-30 00:17:15 -05:00
analyze analyze: fix plot issues when using gummiboot 2014-01-31 07:12:43 +01:00
ask-password clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
backlight make gcc shut up 2014-02-19 17:53:50 +01:00
binfmt log: log_error() and friends add a newline after each line anyway, so avoid including it in the log strings 2013-12-24 16:39:37 +01:00
boot make gcc shut up 2014-02-19 17:53:50 +01:00
bootchart everywhere: always use O_CLOEXEC where it makes sense 2014-02-13 14:59:56 +01:00
bus-driverd api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
bus-proxyd api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
cgls clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
cgroups-agent cgroups-agent: down-grade log level 2013-11-25 17:40:53 +01:00
cgtop make gcc shut up 2014-02-19 17:53:50 +01:00
compat-libs build-sys: merge libsystemd-journal into libsystemd 2014-02-19 18:12:58 +01:00
core api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
cryptsetup Extract looping over /proc/cmdline into a shared function 2014-02-17 02:26:22 -05:00
dbus1-generator dbus1-generator: use XDG_RUNTIME_DIR instead of /run/user/%lu/ 2014-01-26 18:09:24 +01:00
delta delta: ensure that d_type will be set on every fs 2014-01-09 16:43:00 +01:00
detect-virt clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
efi-boot-generator efi-boot-generator: don't mount /boot eagerly 2013-11-21 12:36:05 +01:00
fsck Extract looping over /proc/cmdline into a shared function 2014-02-17 02:26:22 -05:00
fstab-generator Extract looping over /proc/cmdline into a shared function 2014-02-17 02:26:22 -05:00
getty-generator s390/getty-generator: initialize essential system terminals/consoles 2014-01-31 18:16:36 +01:00
gpt-auto-generator gpt-auto-generator: use EBADSLT code when unable to detect partition type 2014-01-11 16:50:09 -05:00
gudev
hostname make gcc shut up 2014-02-19 17:53:50 +01:00
initctl trivial coding style clean ups 2013-12-03 22:27:45 +01:00
journal api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
kernel-install kernel-install: fix help output 2013-12-09 23:19:16 -05:00
libsystemd api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
libsystemd-dhcp api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
libudev everywhere: make use of new0() and macro() macros, and stop using perror() 2014-02-13 14:45:51 +01:00
locale api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
login api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
machine api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
machine-id-setup clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
modules-load load-modules: properly return a failing error code if some module fails to load 2014-02-18 21:23:16 +01:00
network api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
notify clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
nspawn api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
nss-myhostname Remove duplicate includes 2013-11-18 20:28:55 -05:00
python-systemd util: use alloca0() intead of alloca() + memzero() 2014-01-31 17:48:36 +01:00
quotacheck Extract looping over /proc/cmdline into a shared function 2014-02-17 02:26:22 -05:00
random-seed random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
rc-local-generator rc-local: use access(X_OK) to check if files are executable 2013-10-29 19:34:59 +01:00
readahead util: use alloca0() intead of alloca() + memzero() 2014-01-31 17:48:36 +01:00
remount-fs Introduce _cleanup_endmntent_ 2013-10-03 22:13:55 -04:00
reply-password Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
rfkill rfkill: Avoid error when state restore is disabled 2013-12-06 16:44:38 +01:00
run api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
shared util: simplify get_ctty() 2014-02-19 17:53:50 +01:00
shutdownd Update some message formats 2014-02-05 19:00:36 -05:00
sleep sleep.c: fix typo 2014-01-07 21:54:28 -05:00
socket-proxy api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sysctl Remove unused variables 2014-01-05 09:16:15 -05:00
system-update-generator Standarize on one spelling of symlink error message 2013-04-24 00:25:04 -04:00
systemctl api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
systemd api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
test make gcc shut up 2014-02-19 17:53:50 +01:00
timedate timedatectl: fix minor memory leak 2014-02-19 17:53:50 +01:00
tmpfiles tmpfiles: simplification 2014-02-19 17:53:50 +01:00
tty-ask-password-agent make gcc shut up 2014-02-19 17:53:50 +01:00
udev api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
update-utmp utmp: make sure we don't write the utmp reboot record twice on each boot 2014-01-30 14:18:46 +01:00
vconsole move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
.gitignore Add test coverage and generate report with lcov 2013-07-13 21:56:33 -04:00
Makefile