Read a whole sector instead of GV_HDR_LEN, since a sector might be

bigger (i.e. on CD-ROMs).
This commit is contained in:
Lukas Ertl 2004-09-13 17:27:58 +00:00
parent f4fca2d8d3
commit ea29a30466
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ gv_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_unlock();
/* Check if the provided slice is a valid vinum drive. */
vhdr = g_read_data(cp, GV_HDR_OFFSET, GV_HDR_LEN, &error);
vhdr = g_read_data(cp, GV_HDR_OFFSET, pp->sectorsize, &error);
if (vhdr == NULL || error != 0) {
g_topology_lock();
g_access(cp, -1, 0, 0);

View File

@ -372,7 +372,7 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
/* Now check if the provided slice is a valid vinum drive. */
do {
vhdr = g_read_data(cp, GV_HDR_OFFSET, GV_HDR_LEN, &error);
vhdr = g_read_data(cp, GV_HDR_OFFSET, pp->sectorsize, &error);
if (vhdr == NULL || error != 0)
break;
if (vhdr->magic != GV_MAGIC) {