diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-04-20 20:01:03 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-04-20 20:01:03 +0000 |
commit | d75250dec44eacb7fd22702b937dace59a15f6e3 (patch) | |
tree | 11e59d3c1699756fd4256aee7865312f31370417 /sys/arch/hppa/stand/libsa/lf.c | |
parent | 1a174e5c0ce1d285280fd9a8d61249165127cfb3 (diff) |
fix different alignment problems
correct PDC/IODC call formats
factor some more code out to the dev_hppa.c routines
basically boot on many more machine by now
Diffstat (limited to 'sys/arch/hppa/stand/libsa/lf.c')
-rw-r--r-- | sys/arch/hppa/stand/libsa/lf.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/arch/hppa/stand/libsa/lf.c b/sys/arch/hppa/stand/libsa/lf.c index f773e1178be..5440e4dbee6 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.2 1998/09/29 07:17:46 mickey Exp $ */ +/* $OpenBSD: lf.c,v 1.3 1999/04/20 20:01:02 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -45,26 +45,11 @@ lfopen(f, va_alist) struct open_file *f; #endif { - struct hppa_dev *dp; - struct pz_device *pzd; + register struct hppa_dev *dp = f->f_devdata;; - if (!(pzd = pdc_findev(-1, PCL_NET_MASK|PCL_SEQU))) + if (!(dp->pz_dev = pdc_findev(-1, PCL_NET_MASK|PCL_SEQU))) return ENXIO; - if (!(dp = alloc(sizeof(struct hppa_dev)))) { -#ifdef DEBUG - printf("lfopen: no mem\n"); -#endif - return ENODEV; - } - - bzero (dp, sizeof (struct hppa_dev)); - dp->pz_dev = pzd; - dp->bootdev = bootdev; - dp->last_blk = 0; - dp->last_read = 0; - f->f_devdata = dp; - return 0; } |