chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d2e83c2
)
shared: add is_efiboot()
author
Kay Sievers
<kay@vrfy.org>
Sun, 4 Nov 2012 15:06:27 +0000
(16:06 +0100)
committer
Kay Sievers
<kay@vrfy.org>
Sun, 4 Nov 2012 15:06:27 +0000
(16:06 +0100)
src/shared/util.c
patch
|
blob
|
history
src/shared/util.h
patch
|
blob
|
history
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 2a8afae0ecebb122d9ab07feaa80f330252b9dbe..99836953bfafd8853ba3d217476b5cd42139b9f2 100644
(file)
--- 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 e387b1268ad2975a8e967ea1bba99b885e6dfc67..99972cc637205d516ace021094f526a00663020e 100644
(file)
--- 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);