chiark / gitweb /
bootctl: modernization
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Mar 2015 02:29:31 +0000 (22:29 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:44:01 +0000 (07:44 +0100)
commit5806784b5c7618d2a0407effe013b8734ce6917d
tree9868ffb4185934b6ec7a0cf0fe4782865e3f9216
parent1ba5c0f37a5a01c48e850061e537993c2d7595f8
bootctl: modernization

Use strjoina to avoid error handling, and openat to simplify things.

Some fixes on the way:
- ferror does not set errno, so the return value was wrong in some cases
- errors are propagated in more cases
- EFI/systemd was created, but EFI/systemd-boot was deleted
- something is always printed on error
- when checking the version, comparison was done against "systemd-bo" for some reason
- return value was converted from negative to EXIT_SUCCESS/EXIT_FAILURE twice,
  resulting in EXIT_SUCCESS all the time
src/shared/util.c
src/shared/util.h