summaryrefslogtreecommitdiffstats
path: root/sys/dev/scd
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-09 20:29:04 +0000
committerphk <phk@FreeBSD.org>1999-05-09 20:29:04 +0000
commitc1234a50af14b11cf376cc6734b0b74a843ba1aa (patch)
tree9b7137f8dcfd376c73b662b44cb2de4d2c2f1e71 /sys/dev/scd
parentee315610d19582e9fe6739b0a20ed2f107f32019 (diff)
downloadFreeBSD-src-c1234a50af14b11cf376cc6734b0b74a843ba1aa.zip
FreeBSD-src-c1234a50af14b11cf376cc6734b0b74a843ba1aa.tar.gz
don't confuse units and devices.
Diffstat (limited to 'sys/dev/scd')
-rw-r--r--sys/dev/scd/scd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 15251c7..519b28c 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.43 1999/05/06 18:54:19 peter Exp $ */
+/* $Id: scd.c,v 1.44 1999/05/07 07:03:29 phk Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -154,7 +154,7 @@ static int waitfor_status_bits(int unit, int bits_set, int bits_clear);
static int send_cmd(u_int unit, u_char cmd, u_int nargs, ...);
static void init_drive(unsigned unit);
static int spin_up(unsigned unit);
-static int read_toc(dev_t dev);
+static int read_toc(unsigned unit);
static int get_result(u_int unit, int result_len, u_char *result);
static void print_error(int unit, int errcode);
@@ -270,7 +270,7 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p)
if (!(cd->flags & SCDTOC)) {
int loop_count = 3;
- while (loop_count-- > 0 && (rc = read_toc(dev)) != 0) {
+ while (loop_count-- > 0 && (rc = read_toc(unit)) != 0) {
if (rc == ERR_NOT_SPINNING) {
rc = spin_up(unit);
if (rc) {
@@ -1191,9 +1191,8 @@ get_tl(struct sony_toc *toc, int size)
}
static int
-read_toc(dev_t dev)
+read_toc(unsigned unit)
{
- unsigned unit;
struct scd_data *cd;
unsigned part = 0; /* For now ... */
struct sony_toc toc;
@@ -1201,7 +1200,6 @@ read_toc(dev_t dev)
int rc, i, j;
u_long first, last;
- unit = scd_unit(dev);
cd = scd_data + unit;
rc = send_cmd(unit, CMD_GET_TOC, 1, part+1);
OpenPOWER on IntegriCloud