Use NDOSPART macro instead of a magic number.
This commit is contained in:
parent
27eb420eea
commit
fa2fcbedc1
@ -715,8 +715,8 @@ open_disk(int flag)
|
||||
fd = open(disk, O_RDONLY);
|
||||
if (fd == -1)
|
||||
return -3;
|
||||
for (p = 1; p < 5; p++) {
|
||||
asprintf(&s, "%ss%d", disk, p);
|
||||
for (p = 0; p < NDOSPART; p++) {
|
||||
asprintf(&s, "%ss%d", disk, p + 1);
|
||||
fdw = open(s, rwmode);
|
||||
free(s);
|
||||
if (fdw == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user