Age | Commit message (Collapse) | Author |
|
core: add support for usb functionfs v3
|
|
By using these parameters functionfs service can specify ffs descriptors
and strings which should be written to ep0.
|
|
For handling functionfs endpoints additional socket type is added.
|
|
Adding additional keys prevents this gpio-keys powerswitch from working,
e.g. this wouldn't poweroff:
button@23 {
label = "power-switch";
linux,code = <116>;
gpios = <&gpio 23 1>;
};
button@25 {
label = "KEY_A";
linux,code = <30>;
gpios = <&gpio 25 1>;
};
Changing ATTRS{keys}=="116" to ATTRS{keys}=="*116*" makes the
power-switch and the A key both work properly.
(David: rephrase and merge-commits)
|
|
sd-network: random API cleanups
|
|
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic
constant '10'. This is completely bogus, so fix it to follow our coding
standards:
- Prefix exported symbols by SD_LLDP_*
- Define a separate event-enum for event types
- Translate internal state to external event-types
|
|
Don't export constant that are only used internally.
|
|
Prefix all exported constants by SD_PPPOE_* to avoid namespacing
conflicts.
|
|
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing
conflicts.
|
|
Prefix all exported constants with SD_IPV4ACD to prevent namespacing
conflicts.
|
|
Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing
conflicts.
|
|
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any
namespacing conflicts.
|
|
Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing
conflicts.
|
|
mount: use libmount to monitor mountinfo & utab
|
|
A bunch of "Client -> Child" fixes and one barrier-enumerator fix.
(David: rebased on master)
|
|
(David: Note, this is just a cleanup and doesn't fix any bugs)
|
|
Introduce two new helpers that send/receive a single fd via a unix
transport. Also make nspawn use them instead of hard-coding it.
Based on a patch by Krzesimir Nowak.
|
|
Some additional files related to single socket may appear in the
filesystem and they should be opened and passed to related service.
This commit adds optional list of file descriptors, which are
dynamically discovered and opened.
|
|
mount: propagate error codes correctly
|
|
sd-ipv4ll: do not assert_return when seed == 0
|
|
Make sure to propagate error codes from mount-loops correctly. Right now,
we return the return-code of the first mount that did _something_. This is
not what we want. Make sure we return an error if _any_ mount fails (and
then make sure to return the first error to not hide proper errors due to
consequential errors like -ENOTDIR).
Reported by cee1 <fykcee1@gmail.com>.
|
|
sysv-generator: follow symlinks in /etc/rc.d/init.d
|
|
When Group is set in the unit, the runtime directories are owned by
this group and not the default group of the user (same for cgroup paths
and standard outputs)
Fix #1231
|
|
|
|
systemd-mailing-devs/1442692671-10134-1-git-send-email-dev@benjarobin.fr
systemd-notify: Always pass a valid pid to sd_pid_notify
|
|
When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:
- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
called on baremetal: it is only allowed in containers or in user
session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.
I used the following to test it:
| $ sudo rkt --debug --insecure-skip-verify run \
| --mds-register=false --local docker://busybox \
| --exec=/bin/chroot -- /proc/1/root \
| systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42
Fixes https://github.com/systemd/systemd/issues/1290
|
|
ipv4ll use an unsigned instead of an uint8_t array. Hence, use an
unsigned seed instead of declaring an array and then dereferencing it
later.
|
|
Now that seed is an unsigned and not an array, we do not need to assert
on it.
|
|
sd-ipv4acd: split out as separate library from sd-ipv4ll
|
|
core: extend KillUnit() to return error when no unit was killed
|
|
|
|
|
|
load-fragment: resolve specifiers in RuntimeDirectory
|
|
If the option --pid was used, take the pid from this option, unless take
the parend pid. Using 0 as pid (ucred of systemd-notify) will result 99% of the
time in a failure with this error: "Cannot find unit for notify message of PID"
Shouldn't we use always the ppid, since the MAINPID is something else ?
Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
|
|
|
|
These programs should be run manually, typically two instances on a
veth pair to check conflict detection.
Both test programs take the ifname as input, the ACD also takes the
IP address to check, whereas LL (optionally) takes the seed, which
determines the sequence of IP addresses to try.
|
|
This splits the Address Conflict Detection out of the Link Local
library so that we can reuse it for DHCP and static addresses in
the future.
Implements RFC5227.
|
|
Use stop() and start() to drop some pulicate code.
|
|
Firstly, no longer distinguish between STOP and INIT states.
Secondly, do not trigger STOP events when calls to sd_ipv4ll_*() fail. The
caller is the one who would receive the event and will already know that the
call to sd_ipv4ll_*() has failed, so it is redundant.
STOP events will now only be triggered by calling sd_ipv4ll_stop() explicitly
or by some internal error in the library triggered by receiving a packet or
an expiring timeout (i.e., any error that would otherwise not be reported
back to the consumer of the library).
Lastly, follow CODING_STYLE and always return NULL on unref. Protect from
objects being destroyed in callbacks accordingly.
|
|
This requires the caller to stop and restart the statemachine if they want to
change the MAC address.
|
|
Simplify timeout handling.
|
|
Most packets are filtered out by the BPF, so only check for the parts that may
actually differ.
|
|
|
|
|
|
Simplify the code a bit, no functional change.
|
|
We currently process every ARP packet, but we should only care about the ones
relating to our IP address.
Also rename ipv4ll helpers to apr-utils.[ch], and rework the helpers a bit.
|
|
networkd: add support for accept ra
|
|
|
|
The size of the allocated array for received file descriptors was
incorrectly calculated. This did not matter when a single file
descriptor was received, but for more descriptors the allocation was
insufficient.
|
|
cgroup: add support for net_cls controllers
|