mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Use NDOSPART macro instead of a magic number.
This commit is contained in:
parent
cbf1a58f6c
commit
61456bbd76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145747
@ -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