tree-wide: set WRITE_STRING_FILE_DISABLE_BUFFER flag when we write files under /proc or /sys

This commit is contained in:
Yu Watanabe
2018-11-06 21:24:03 +09:00
parent 76cdddfb9d
commit 57512c893e
14 changed files with 39 additions and 37 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ static int toggle_utf8(const char *name, int fd, bool utf8) {
static int toggle_utf8_sysfs(bool utf8) {
int r;
r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0);
r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER);
if (r < 0)
return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));