tree-wide: port various places to read_boolean_file()

This commit is contained in:
Lennart Poettering
2026-05-11 12:04:02 +02:00
parent db8046535b
commit 4f63cff1f4
3 changed files with 6 additions and 27 deletions
+1 -9
View File
@@ -869,16 +869,8 @@ int vt_disallocate(const char *tty_path) {
}
static int vt_default_utf8(void) {
_cleanup_free_ char *b = NULL;
int r;
/* Read the default VT UTF8 setting from the kernel */
r = read_one_line_file("/sys/module/vt/parameters/default_utf8", &b);
if (r < 0)
return r;
return parse_boolean(b);
return read_boolean_file("/sys/module/vt/parameters/default_utf8");
}
static int vt_reset_keyboard(int fd) {