Annotation of sys/arch/hppa64/stand/libsa/ct.c, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: ct.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: * Copyright 1996 1995 by Open Software Foundation, Inc.
21: * All Rights Reserved
22: *
23: * Permission to use, copy, modify, and distribute this software and
24: * its documentation for any purpose and without fee is hereby granted,
25: * provided that the above copyright notice appears in all copies and
26: * that both the copyright notice and this permission notice appear in
27: * supporting documentation.
28: *
29: * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
30: * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31: * FOR A PARTICULAR PURPOSE.
32: *
33: * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
34: * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
35: * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
36: * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
37: * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38: *
39: */
40:
41: #include "libsa.h"
42:
43: #include <sys/param.h>
44: #include <sys/disklabel.h>
45: #include <sys/reboot.h>
46:
47: #include <machine/pdc.h>
48: #include <machine/iomod.h>
49:
50: #include "dev_hppa64.h"
51:
52: int
53: ctopen(struct open_file *f, ...)
54: {
55: struct hppa_dev *dp = f->f_devdata;
56:
57: if (!(dp->pz_dev = pdc_findev(-1, PCL_SEQU)))
58: return (ENXIO);
59:
60: return (0);
61: }
62:
63: /*ARGSUSED*/
64: int
65: ctclose(f)
66: struct open_file *f;
67: {
68: free (f->f_devdata, sizeof(struct hppa_dev));
69: f->f_devdata = NULL;
70: return 0;
71: }
CVSweb