1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
Commit Graph

52 Commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen
dd114e116b bootctl: fix an error check 2015-05-23 13:03:30 +02:00
Thomas Hindoe Paaboel Andersen
717442507b bootctl: ferror must be called before FILE is closed
Otherwise it will not show any error stored
2015-05-22 23:46:36 +02:00
Zbigniew Jędrzejewski-Szmek
551710cf2e bootctl: try to catch all errors
Do not print garbage on non-EFI installations.
2015-05-19 23:41:38 -04:00
Zbigniew Jędrzejewski-Szmek
d3226d7796 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
2015-05-19 23:41:38 -04:00
Kay Sievers
b40c3dfa32 boot: function parameters are separated by comma 2015-05-12 17:58:59 +02:00
Koen Kooi
0d8d368907 boot/util: add ticks_read() stub 2015-04-11 11:54:45 +02:00
Koen Kooi
8403daa284 boot/util: use x86 ASM only on x86 platforms. 2015-04-11 11:48:39 +02:00
Ronny Chevalier
39505e3c3b remove duplicated includes 2015-04-08 02:42:50 +02:00
Lennart Poettering
c687863750 util: rework rm_rf() logic
- Move to its own file rm-rf.c

- Change parameters into a single flags parameter

- Remove "honour sticky" logic, it's unused these days
2015-04-06 10:57:53 +02:00
David Herrmann
e0d065d405 bootctl: drop redundant parse_argv()
We already call parse_argv() from main(), don't call it here again.
2015-03-19 14:11:54 +01:00
Zbigniew Jędrzejewski-Szmek
7c5925a448 efi: widen operand to avoid overflow
CID #1287141.
2015-03-13 23:42:16 -04:00
Kay Sievers
4db7e6d781 boot: efi - add config option to disable the command line editor 2015-03-11 23:33:53 +01:00
Zbigniew Jędrzejewski-Szmek
56c70b32af boot/efi: do not assign variable twice
If the highlighted line did not move outside of the visible
region, it should not be necessary to update idx_last.

CID #1287137, #1287138.
2015-03-09 16:45:27 -04:00
Kay Sievers
9d3dec15ae boot: efi - ignore .conf snippets starting with "auto-" 2015-03-01 13:16:10 +01:00
Kay Sievers
ea1851b60c boot: efi - remove a couple of Loader* variables 2015-03-01 13:16:10 +01:00
Zbigniew Jędrzejewski-Szmek
1a1db450e5 bootctl: avoid NULL pointer dereference 2015-02-27 17:31:43 -05:00
Marcel Holtmann
2bdbf32183 boot: efi - fix missing include
src/boot/efi/splash.c:312:9: warning: implicit declaration of function ‘graphics_mode’ [-Wimplicit-function-declaration]
         err = graphics_mode(TRUE);
         ^
2015-02-27 03:43:31 +01:00
Kay Sievers
7361099e42 boot: efi - remove custom splash support 2015-02-26 19:51:08 +01:00
Kay Sievers
2f8d336478 boot: efi - split graphics and splash handling 2015-02-26 19:45:08 +01:00
Kay Sievers
37fa369066 boot: efi - support embedded splash image 2015-02-26 18:58:30 +01:00
Kay Sievers
20b1538df6 boot: efi - print generic error message if we fail to execute an image 2015-02-26 01:15:18 +01:00
Kay Sievers
a19b0678be boot: efi - remove default boot splash handling 2015-02-26 01:03:29 +01:00
Thomas Hindoe Paaboel Andersen
3a4efbff2e bootctl: check that partition uuid is valid
It probably is but check anyway to make coverity happy.

CID#1271354
2015-02-25 23:32:50 +01:00
Thomas Hindoe Paaboel Andersen
7cb0f263ad bootctl: fix mem leaks
CID#1271347/1271348
2015-02-25 00:00:32 +01:00
Thomas Hindoe Paaboel Andersen
2eec67acbb remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
2015-02-23 23:53:42 +01:00
Kay Sievers
11d63aea3a build-sys: update gitignore 2015-02-20 15:42:32 +01:00
Thomas Hindoe Paaboel Andersen
04155c6713 systemd-boot: fix alignment of version in table 2015-02-18 22:19:17 +01:00
Tom Gundersen
e7dd673d1e gummiboot/sd-boot/systemd-boot: rename galore
What used to be gummiboot, was renamed sd-boot when it was merged into
systemd. Let's try to be a bit more consistent with the rest of systemd
and rename it again as follows:

The EFI bootloader is now called 'systemd-bootx64.efi', and its sources are in
'src/boot/efi/'. The drop-in directory where bootctl will find EFI loaders
is now /usr/lib/systemd/boot/efi/.
2015-02-18 15:23:23 +01:00
Kay Sievers
0974a682d1 bootctl: add sd-boot support 2015-02-17 14:36:59 +01:00
Thomas Hindoe Paaboel Andersen
c1ff5570f4 Add missing includes in header files
This fixes various issues found by globally reordering the include
sections of all .c files.
2015-02-12 20:44:32 +01:00
Zbigniew Jędrzejewski-Szmek
601185b43d Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.

When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.

Also, simplify things here and there.
2014-08-03 21:46:07 -04:00
Lennart Poettering
39883f622f make gcc shut up
If -flto is used then gcc will generate a lot more warnings than before,
among them a number of use-without-initialization warnings. Most of them
without are false positives, but let's make them go away, because it
doesn't really matter.
2014-02-19 17:53:50 +01:00
Greg KH
29804cc1e0 use memzero(foo, length); for all memset(foo, 0, length); calls
In trying to track down a stupid linker bug, I noticed a bunch of
memset() calls that should be using memzero() to make it more "obvious"
that the options are correct (i.e. 0 is not the length, but the data to
set).  So fix up all current calls to memset(foo, 0, length) to
memzero(foo, length).
2014-01-31 11:55:01 +01:00
Stefan Beller
b8265d4f8e boot-efi: Remove superfluous assignment
2 lines after the changed line we assign err to efi_get_variable(...)
unconditionally, so it makes no sense to initialize it to some value.
2013-12-31 17:53:30 +01:00
Thomas Hindoe Paaboel Andersen
b226deba78 bootctl: remove unused options from getopt_long 2013-11-09 14:11:56 +01:00
Lennart Poettering
eb9da376d7 clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts.
2013-11-06 18:28:39 +01:00
Thomas Hindoe Paaboel Andersen
82de16f92c bootctl: typo fix in help message 2013-11-06 00:29:49 +01:00
Kay Sievers
c51d84dc09 support acpi firmware performance data (FPDT)
Prefer firmware-provided performance data over loader-exported ones; if
ACPI data is available, always use it, otherwise try to read the loader
data.

The firmware-provided variables start at the time the first EFI image
is executed and end when the operating system exits the boot services;
the (loader) time calculated in systemd-analyze increases.
2013-09-24 15:43:41 +02:00
Koen Kooi
8b3227c90d bootctl: fix help text
It currently says 'time settings', change that to 'boot settings'.
2013-03-29 15:47:43 +01:00
Kay Sievers
0014c5221e bootctl: ESP --> Partition 2013-03-28 11:42:32 +01:00
Kay Sievers
33696ef458 bootctl: Binary: --> File: 2013-03-28 03:43:29 +01:00
Kay Sievers
3483fab948 bootctl: rename status output header 2013-03-27 13:55:09 +01:00
Kay Sievers
0876dc1c26 bootctl: print Options only when found 2013-03-10 23:18:50 +01:00
Kay Sievers
bc6f2e7c62 bootctl: print secure boot flags 2013-03-10 22:48:27 +01:00
Kay Sievers
71bf4f6f6c bootctl: show "n/a" for empty boot option labels 2013-02-17 22:28:21 +01:00
Thomas Hindoe Paaboel Andersen
090be86534 use streq instead of strcmp 2013-02-13 18:14:20 +01:00
Kay Sievers
b05105f0a8 bootctl: always show slashes not backslashes 2013-02-13 17:49:48 +01:00
Kay Sievers
4d34c4951a efi: unify BootXXXX reading 2013-02-13 17:35:20 +01:00
Lennart Poettering
2a2473d89e boot: add stub Makefile symlink 2013-02-13 02:19:03 +01:00
Lennart Poettering
9cde64ff26 efi: various cleanups 2013-02-13 00:12:58 +01:00