mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Set size field correctly, it is number of sectors on the device, not
number of 512 bytes sectors. Recognize size == -1 as meaning "auto".
This commit is contained in:
parent
7501cdc8e5
commit
9cee00cf10
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126230
@ -85,6 +85,8 @@ printstatus(struct fdc_status *fdcsp, int terse)
|
||||
fputs(msgbuf, stderr);
|
||||
}
|
||||
|
||||
static struct fd_type fd_types_auto[1];
|
||||
|
||||
static struct fd_type fd_types_288m[] =
|
||||
{
|
||||
#if 0
|
||||
@ -321,8 +323,7 @@ parse_fmt(const char *s, enum fd_drivetype type,
|
||||
free(s1);
|
||||
}
|
||||
|
||||
out->size = out->tracks * out->heads * out->sectrac *
|
||||
(128 << out->secsize) / 512;
|
||||
out->size = out->tracks * out->heads * out->sectrac;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -398,6 +399,9 @@ get_fmt(int size, enum fd_drivetype type)
|
||||
break;
|
||||
}
|
||||
|
||||
if (size == -1)
|
||||
return fd_types_auto;
|
||||
|
||||
for (i = 0; i < n; i++, fdtp++)
|
||||
if (fdtp->size / 2 == size)
|
||||
return (fdtp);
|
||||
|
Loading…
Reference in New Issue
Block a user