diff options
author | Kay Sievers <kay@vrfy.org> | 2012-11-04 16:06:27 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-11-04 16:06:27 +0100 |
commit | c1e5704657315b436c0409e8172c1fcb76adccad (patch) | |
tree | b278fa58a4c70cd4955c46a8e08d08446a6f1228 /src/shared | |
parent | d2e83c23f5f0cdd3b6ec05c5c40209708721e704 (diff) |
shared: add is_efiboot()
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/util.c | 4 | ||||
-rw-r--r-- | src/shared/util.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 2a8afae0ec..99836953bf 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -77,6 +77,10 @@ char **saved_argv = NULL; static volatile unsigned cached_columns = 0; static volatile unsigned cached_lines = 0; +bool is_efiboot(void) { + return access("/sys/firmware/efi", F_OK) >= 0; +} + size_t page_size(void) { static __thread size_t pgsz = 0; long r; diff --git a/src/shared/util.h b/src/shared/util.h index e387b1268a..99972cc637 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -90,6 +90,8 @@ union dirent_storage { #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" #define ANSI_HIGHLIGHT_OFF "\x1B[0m" +bool is_efiboot(void); + usec_t now(clockid_t clock); dual_timestamp* dual_timestamp_get(dual_timestamp *ts); |