-/* $OpenBSD: acd.c,v 1.21 1997/02/23 13:08:49 niklas Exp $ */
+/* $OpenBSD: acd.c,v 1.22 1997/02/23 18:48:13 niklas Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
_lto2b(len, atapi_cmd.length);
error = atapi_exec_cmd(acd->ad_link, &atapi_cmd, sizeof(atapi_cmd),
- data, len, B_READ, flags);
+ data, len, B_READ, flags);
if (!error) {
switch(page) {
case ATAPI_CAP_PAGE: {
struct atapi_cappage *fix = &data->page_cap;
+
/*
* Fix cappage entries in place.
*/
fix->max_speed = _2btos((u_int8_t *)&fix->max_speed);
- fix->max_vol_levels = _2btos((u_int8_t *)&fix->max_vol_levels);
+ fix->max_vol_levels =
+ _2btos((u_int8_t *)&fix->max_vol_levels);
fix->buf_size = _2btos((u_int8_t *)&fix->buf_size);
fix->cur_speed = _2btos((u_int8_t *)&fix->cur_speed);
- } break;
+ break;
+ }
}
}
_lto2b(len, atapi_cmd.length);
return atapi_exec_cmd(acd->ad_link, &atapi_cmd, sizeof(atapi_cmd),
- data, len, B_WRITE, 0);
+ data, len, B_WRITE, 0);
}
int
_lto2b(nblks, atapi_cmd.length);
return atapi_exec_cmd(acd->ad_link, &atapi_cmd, sizeof(atapi_cmd),
- NULL, 0, 0, 0);
+ NULL, 0, 0, 0);
}
/*
_lto4b(nblks, atapi_cmd.length);
return atapi_exec_cmd(acd->ad_link, &atapi_cmd, sizeof(atapi_cmd),
- NULL, 0, 0, 0);
+ NULL, 0, 0, 0);
}
int
for (i = 0; i <= ntracks; i++) {
lba = (u_int32_t*)toc->tab[i].addr.addr;
*lba = msf2lba(toc->tab[i].addr.addr[1],
- toc->tab[i].addr.addr[2],
- toc->tab[i].addr.addr[3]);
+ toc->tab[i].addr.addr[2], toc->tab[i].addr.addr[3]);
}
return 0;
}
atapi_cmd.end_f = endf;
return atapi_exec_cmd(acd->ad_link, (struct atapi_generic *)&atapi_cmd,
- sizeof(atapi_cmd), NULL, 0, 0, 0);
+ sizeof(atapi_cmd), NULL, 0, 0, 0);
}
/*
_lto2b(len, atapi_cmd.length);
return atapi_exec_cmd(acd->ad_link, (struct atapi_generic *)&atapi_cmd,
- sizeof(struct atapi_read_subchannel),
- (u_char *)data, len, B_READ, 0);
+ sizeof(struct atapi_read_subchannel), (u_char *)data, len, B_READ,
+ 0);
}
/*
_lto2b(len, atapi_cmd.length);
return atapi_exec_cmd(acd->ad_link, (struct atapi_generic *)&atapi_cmd,
- sizeof(struct atapi_read_toc), data,
- len, B_READ, 0);
+ sizeof(struct atapi_read_toc), data, len, B_READ, 0);
}
/*
struct acd_softc *acd;
int flags;
{
-
/*
* give a number of sectors so that sec * trks * cyls
* is <= disk_size
acdsize(dev)
dev_t dev;
{
-
/* CD-ROMs are read-only. */
return -1;
}
void acdminphys(bp)
struct buf *bp;
{
-
minphys(bp);
}
caddr_t va;
size_t size;
{
-
/* Not implemented. */
return ENXIO;
}