]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: move the main loop body out to a new function
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 2 Oct 2016 19:32:38 +0000 (21:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 8 Oct 2016 18:48:41 +0000 (14:48 -0400)
commitb006762524c76e8a3ef8d965bb2bf42c894196e4
treee906847aa5d9ac3728d48b3c48d6b24c0df70419
parent98afd6af3a2022bd03543a6dea79120f689967b0
nspawn: move the main loop body out to a new function

The new function has 416 lines by itself!

"return log_error_errno" is used to nicely reduce the volume of error
handling code.

A few minor issues are fixed on the way:
- positive value was used as error value (EIO), causing systemd-nspawn
  to return success, even though it shouldn't.
- In two places random values were used as error status, when the
  actual value was in an unusual place (etc_password_lock, notify_socket).

Those are the only functional changes.

There is another potential issue, which is marked with a comment, and left
unresolved: the container can also return 133 by itself, causing a spurious
reboot.
src/nspawn/nspawn.c