tree-wide: use UTMPX_FILE rather than _PATH_UTMPX

Apparently _PATH_UTMPX is a glibc'ism. UTMPX_FILE is the same thing and
what everyone else uses. Since they are otherwise equivalent, let's just
switch.
This commit is contained in:
Lennart Poettering
2024-09-06 13:54:19 +02:00
parent 98dc726902
commit 51da613bc4
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
return 0;
}
if (utmpxname(_PATH_UTMPX) < 0)
if (utmpxname(UTMPX_FILE) < 0)
return -errno;
utmpx = utxent_start();
@@ -91,7 +91,7 @@ static int write_entry_utmp(const struct utmpx *store) {
* each entry type resp. user; i.e. basically a key/value
* table. */
if (utmpxname(_PATH_UTMPX) < 0)
if (utmpxname(UTMPX_FILE) < 0)
return -errno;
utmpx = utxent_start();
+1 -1
View File
@@ -51,7 +51,7 @@ static int wall_utmp(
/* libc's setutxent() unfortunately doesn't inform us about success, i.e. whether /var/run/utmp
* exists. Hence we have to check manually first. */
if (access(_PATH_UTMPX, F_OK) < 0) {
if (access(UTMPX_FILE, F_OK) < 0) {
if (errno == ENOENT)
return -ENOPROTOOPT;