Merged from src/sbin/fdisk/fdisk.c revision 1.77.

This commit is contained in:
Yoshihiro Takahashi 2005-05-01 04:14:01 +00:00
parent fb4c2dbf41
commit cbf1a58f6c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145745

View File

@ -833,7 +833,7 @@ open_disk(int flag)
return -3;
for (i = 0; i < NDOSPART; i++) {
snprintf(buf, sizeof(buf), "%ss%d", disk, i + 1);
fdw = open(buf, O_RDONLY);
fdw = open(buf, rwmode);
if (fdw == -1)
continue;
break;
@ -852,7 +852,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;