wakeup_hdd: -fix warning -add mode to open

Origin commit data
------------------
Branch: ni/coolstream
Commit: f1c7e9002e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2014-02-18 (Tue, 18 Feb 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2014-02-18 14:59:11 +01:00
parent 371e881540
commit be4bf0d96b

View File

@@ -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));