diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-29 22:38:51 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-29 22:38:51 +0000 |
commit | 9edc81588ce929771b8fe051aafafc18ebffe5c7 (patch) | |
tree | b8a230c2faf05840c641133652e89fb6492197bd /sys/arch/hppa/stand | |
parent | fa9aad0980c22bb74000661a9c32b63659b92f44 (diff) |
some cleanup and redo ct as lf (just different dev type). saves some memory
Diffstat (limited to 'sys/arch/hppa/stand')
-rw-r--r-- | sys/arch/hppa/stand/libsa/ct.c | 26 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/dev_hppa.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/dk.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/lf.c | 4 |
4 files changed, 7 insertions, 31 deletions
diff --git a/sys/arch/hppa/stand/libsa/ct.c b/sys/arch/hppa/stand/libsa/ct.c index c1096b61d58..2f1d6b9f34b 100644 --- a/sys/arch/hppa/stand/libsa/ct.c +++ b/sys/arch/hppa/stand/libsa/ct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct.c,v 1.7 2003/04/16 07:20:50 mickey Exp $ */ +/* $OpenBSD: ct.c,v 1.8 2003/04/29 22:38:50 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -62,33 +62,13 @@ #include "dev_hppa.h" -struct pz_device ctdev; -iodcio_t ctiodc; /* cartridge tape IODC entry point */ -int ctcode[IODC_MAXSIZE/sizeof(int)]; - int ctopen(struct open_file *f, ...) { struct hppa_dev *dp = f->f_devdata; - int ret; - - if (ctiodc == 0) { - - if ((ret = (*pdc)(PDC_IODC, PDC_IODC_READ, pdcbuf, ctdev.pz_hpa, - IODC_IO, ctcode, IODC_MAXSIZE)) < 0) { - printf("ct: device ENTRY_IO Read ret'd %d\n", ret); - return (EIO); - } else - ctdev.pz_iodc_io = ctiodc = (iodcio_t) ctcode; - } - - dp->pz_dev = &ctdev; - if (ctiodc != NULL) - if ((ret = (*ctiodc)(ctdev.pz_hpa, IODC_IO_READ, ctdev.pz_spa, - ctdev.pz_layers, pdcbuf, 0, - dp->buf, 0, 0)) < 0) - printf("ct: device rewind ret'd %d\n", ret); + if (!(dp->pz_dev = pdc_findev(-1, PCL_SEQU))) + return (ENXIO); return (0); } diff --git a/sys/arch/hppa/stand/libsa/dev_hppa.h b/sys/arch/hppa/stand/libsa/dev_hppa.h index bcad04fb294..2f9c87b7ebc 100644 --- a/sys/arch/hppa/stand/libsa/dev_hppa.h +++ b/sys/arch/hppa/stand/libsa/dev_hppa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa.h,v 1.5 2003/01/14 11:40:18 mickey Exp $ */ +/* $OpenBSD: dev_hppa.h,v 1.6 2003/04/29 22:38:50 mickey Exp $ */ #define IOPGSHIFT 11 @@ -38,7 +38,5 @@ struct hppa_dev { extern pdcio_t pdc; extern int pdcbuf[]; /* PDC returns, pdc.c */ -extern struct pz_device ctdev; /* cartridge tape (boot) device path */ int iodc_rw(char *, u_int, u_int, int func, struct pz_device *); - diff --git a/sys/arch/hppa/stand/libsa/dk.c b/sys/arch/hppa/stand/libsa/dk.c index e846f99d80a..b65951d48d9 100644 --- a/sys/arch/hppa/stand/libsa/dk.c +++ b/sys/arch/hppa/stand/libsa/dk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dk.c,v 1.9 2003/04/16 07:20:50 mickey Exp $ */ +/* $OpenBSD: dk.c,v 1.10 2003/04/29 22:38:50 mickey Exp $ */ /* * Copyright 1996 1995 by Open Software Foundation, Inc. @@ -32,8 +32,6 @@ #include "dev_hppa.h" -iodcio_t dkiodc; /* boot IODC entry point */ - const char * dk_disklabel(dp, label) struct hppa_dev *dp; diff --git a/sys/arch/hppa/stand/libsa/lf.c b/sys/arch/hppa/stand/libsa/lf.c index ab22616606d..856a20e3ebe 100644 --- a/sys/arch/hppa/stand/libsa/lf.c +++ b/sys/arch/hppa/stand/libsa/lf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lf.c,v 1.5 2003/04/16 07:20:50 mickey Exp $ */ +/* $OpenBSD: lf.c,v 1.6 2003/04/29 22:38:50 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -40,7 +40,7 @@ int lfopen(struct open_file *f, ...) { - struct hppa_dev *dp = f->f_devdata;; + struct hppa_dev *dp = f->f_devdata; if (!(dp->pz_dev = pdc_findev(-1, PCL_NET_MASK|PCL_SEQU))) return ENXIO; |