1
0
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:
Yoshihiro Takahashi 2005-05-01 05:01:55 +00:00
parent cbf1a58f6c
commit 61456bbd76
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145747

View File

@ -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)