From 68cc01c47300dfe6154221a1e50d2636b9d99ec5 Mon Sep 17 00:00:00 2001 From: Marcel Alexandru Nitan Date: Tue, 31 Jan 2023 20:59:42 +0200 Subject: [PATCH] util: fix sysfs_write --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 86f4b97..a7bc911 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -60,7 +60,7 @@ void sysfs_write(char *path, char *content) std::cout << "Write: " << content << " -> " << path << std::endl; int fd; fd = open(path, O_WRONLY); - write(fd, content, 1); + write(fd, content, strlen(content)); close(fd); }