mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Reduce permission to avoid to spin up disks in Windows
This commit is contained in:
parent
99a5a78570
commit
6602bebd5b
1 changed files with 1 additions and 1 deletions
|
|
@ -2977,7 +2977,7 @@ static int devup(uint64_t device, const char* name, const char* wfile)
|
|||
snprintf(file, sizeof(file), "/dev/pd%" PRIu64, device);
|
||||
|
||||
/* open the volume */
|
||||
h = CreateFileW(convert(conv_buf, wfile), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH, 0);
|
||||
h = CreateFileW(convert(conv_buf, wfile), 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
DWORD error = GetLastError();
|
||||
windows_errno(error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue