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:
parent
b598979dc9
commit
ca4cc47388
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145690
@ -717,7 +717,7 @@ open_disk(int flag)
|
|||||||
return -3;
|
return -3;
|
||||||
for (p = 1; p < 5; p++) {
|
for (p = 1; p < 5; p++) {
|
||||||
asprintf(&s, "%ss%d", disk, p);
|
asprintf(&s, "%ss%d", disk, p);
|
||||||
fdw = open(s, O_RDONLY);
|
fdw = open(s, rwmode);
|
||||||
free(s);
|
free(s);
|
||||||
if (fdw == -1)
|
if (fdw == -1)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user