summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64/stand/libsa/ct.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa64/stand/libsa/ct.c')
-rw-r--r--sys/arch/hppa64/stand/libsa/ct.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/sys/arch/hppa64/stand/libsa/ct.c b/sys/arch/hppa64/stand/libsa/ct.c
new file mode 100644
index 00000000000..44316e10b12
--- /dev/null
+++ b/sys/arch/hppa64/stand/libsa/ct.c
@@ -0,0 +1,71 @@
+/* $OpenBSD: ct.c,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+
+/*
+ * Copyright (c) 2005 Michael Shalayeff
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * Copyright 1996 1995 by Open Software Foundation, Inc.
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appears in all copies and
+ * that both the copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
+ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include "libsa.h"
+
+#include <sys/param.h>
+#include <sys/disklabel.h>
+#include <sys/reboot.h>
+
+#include <machine/pdc.h>
+#include <machine/iomod.h>
+
+#include "dev_hppa64.h"
+
+int
+ctopen(struct open_file *f, ...)
+{
+ struct hppa_dev *dp = f->f_devdata;
+
+ if (!(dp->pz_dev = pdc_findev(-1, PCL_SEQU)))
+ return (ENXIO);
+
+ return (0);
+}
+
+/*ARGSUSED*/
+int
+ctclose(f)
+ struct open_file *f;
+{
+ free (f->f_devdata, sizeof(struct hppa_dev));
+ f->f_devdata = NULL;
+ return 0;
+}