mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 11:10:09 +01:00
systemd: merge branch systemd into master
This commit is contained in:
commit
e1dbe35acd
2 changed files with 5 additions and 12 deletions
|
|
@ -148,10 +148,6 @@ clockid_t clock_boottime_or_monotonic(void);
|
|||
|
||||
usec_t usec_shift_clock(usec_t, clockid_t from, clockid_t to);
|
||||
|
||||
#define xstrftime(buf, fmt, tm) \
|
||||
assert_message_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0, \
|
||||
"xstrftime: " #buf "[] must be big enough")
|
||||
|
||||
int get_timezone(char **timezone);
|
||||
|
||||
time_t mktime_or_timegm(struct tm *tm, bool utc);
|
||||
|
|
|
|||
|
|
@ -182,15 +182,12 @@ int block_get_whole_disk(dev_t d, dev_t *ret) {
|
|||
}
|
||||
|
||||
bool kexec_loaded(void) {
|
||||
bool loaded = false;
|
||||
char *s;
|
||||
_cleanup_free_ char *s = NULL;
|
||||
|
||||
if (read_one_line_file("/sys/kernel/kexec_loaded", &s) >= 0) {
|
||||
if (s[0] == '1')
|
||||
loaded = true;
|
||||
free(s);
|
||||
}
|
||||
return loaded;
|
||||
if (read_one_line_file("/sys/kernel/kexec_loaded", &s) < 0)
|
||||
return false;
|
||||
|
||||
return s[0] == '1';
|
||||
}
|
||||
|
||||
int prot_from_flags(int flags) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue