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
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-05-19 23:41:38 -04:00
parent 7f4e6a1ceb
commit d3226d7796
3 changed files with 305 additions and 561 deletions
+283 -561
View File
File diff suppressed because it is too large Load Diff