Annotation of sys/arch/hppa64/stand/libsa/lf.c, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: lf.c,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
2:
3: /*
4: * Copyright (c) 2005 Michael Shalayeff
5: * All rights reserved.
6: *
7: * Permission to use, copy, modify, and distribute this software for any
8: * purpose with or without fee is hereby granted, provided that the above
9: * copyright notice and this permission notice appear in all copies.
10: *
11: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15: * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
16: * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18: */
19:
20: #include "libsa.h"
21: #include <machine/pdc.h>
22: #include <machine/iomod.h>
23: #include <machine/param.h>
24:
25: #include "dev_hppa64.h"
26:
27: int
28: lfopen(struct open_file *f, ...)
29: {
30: struct hppa_dev *dp = f->f_devdata;
31:
32: if (!(dp->pz_dev = pdc_findev(-1, PCL_NET_MASK|PCL_SEQU)))
33: return ENXIO;
34:
35: return 0;
36: }
37:
38: int
39: lfclose(struct open_file *f)
40: {
41: free(f->f_devdata, sizeof(struct hppa_dev));
42: f->f_devdata = NULL;
43: return 0;
44: }
CVSweb