From ce577dface90ab091bb5e5de9d3fb8e98ae041c9 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 18 Feb 2014 14:59:11 +0100 Subject: [PATCH] wakeup_hdd: -fix warning -add mode to open Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f1c7e9002e44d2330224be37e2fc322b86daf575 Author: Jacek Jendrzej Date: 2014-02-18 (Tue, 18 Feb 2014) --- src/system/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index df8fc7228..c4a80b7f5 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -82,7 +82,7 @@ void wakeup_hdd(const char *hdd_dir) if(!check_dir(hdd_dir) && hdd_get_standby(hdd_dir)){ std::string wakeup_file = hdd_dir; wakeup_file += "/.wakeup"; - int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC); + int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR); if (fd >= 0) { unsigned char buf[512]; memset(buf, 0xFF, sizeof(buf));