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:
@@ -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
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user