If we resort to opening a slice instead of the base device, do so with

the correct mode for our arguments.
This commit is contained in:
phk 2005-04-29 21:24:27 +00:00
parent a868861268
commit 691e072f68

View File

@ -717,7 +717,7 @@ open_disk(int flag)
return -3;
for (p = 1; p < 5; p++) {
asprintf(&s, "%ss%d", disk, p);
fdw = open(s, O_RDONLY);
fdw = open(s, rwmode);
free(s);
if (fdw == -1)
continue;