summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-02-20 04:53:04 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-02-20 04:53:04 +0000
commit95b50094c18d54c44c4ef9401e82e98f70b4567c (patch)
treee11cb84f2998f731027a096224a039b79455ab39
parenta31c9394f3f47b27cb4c1d84d40c4b75ff73fd1e (diff)
Merge in changes from NetBSD:
- Filesystem prototype changes - LOCORE -> _LOCORE - Move disk-specific ioctls out of <sys/disklabel.h> and into <sys/dkio.h>. <sys/dkio.h> is in turn included by <sys/ioctl.h>, much like how <sys/filio.h> and <sys/sockio.h> are handled. This minimizes changes to existing sources which use the disk ioctls. Define DIOCLOCK which is used to lock and unlock the pack.
-rw-r--r--sys/sys/disklabel.h38
1 files changed, 9 insertions, 29 deletions
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index acef7095de9..86a2e461e22 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.35 1995/10/09 12:00:18 pk Exp $ */
+/* $NetBSD: disklabel.h,v 1.38 1996/02/09 18:25:05 christos Exp $ */
/*
* Copyright (c) 1987, 1988, 1993
@@ -70,7 +70,7 @@
#define DISKMAGIC ((u_int32_t)0x82564557) /* The disk magic number */
-#ifndef LOCORE
+#ifndef _LOCORE
struct disklabel {
u_int32_t d_magic; /* the magic number */
u_int16_t d_type; /* drive type */
@@ -167,7 +167,7 @@ struct disklabel {
#define p_sgs __partition_u1.sgs
} d_partitions[MAXPARTITIONS]; /* actually may be more */
};
-#else /* LOCORE */
+#else /* _LOCORE */
/*
* offsets for asm boot files.
*/
@@ -178,7 +178,7 @@ struct disklabel {
.set d_secpercyl,56
.set d_secperunit,60
.set d_end_,276 /* size of disk label */
-#endif /* LOCORE */
+#endif /* _LOCORE */
/* d_type values: */
#define DTYPE_SMD 1 /* SMD, XSMD; VAX hp/up */
@@ -287,7 +287,7 @@ static char *fstypenames[] = {
*/
#define d_blind d_drivedata[0]
-#ifndef LOCORE
+#ifndef _LOCORE
/*
* Structure used to perform a format or other raw operation, returning
* data and/or register values. Register identification and format
@@ -309,26 +309,6 @@ struct partinfo {
struct partition *part;
};
-/*
- * Disk-specific ioctls.
- */
- /* get and set disklabel; DIOCGPART used internally */
-#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
-#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
-#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
-#define DIOCGPART _IOW('d', 104, struct partinfo) /* get partition */
-
-/* do format operation, read or write */
-#define DIOCRFORMAT _IOWR('d', 105, struct format_op)
-#define DIOCWFORMAT _IOWR('d', 106, struct format_op)
-
-#define DIOCSSTEP _IOW('d', 107, int) /* set step rate */
-#define DIOCSRETRIES _IOW('d', 108, int) /* set # of retries */
-#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-
-#define DIOCSBAD _IOW('d', 110, struct dkbad) /* set kernel dkbad */
-#define DIOCEJECT _IO('d', 112) /* Eject removable disk */
-
#ifdef _KERNEL
void diskerr
__P((struct buf *, char *, char *, int, int, struct disklabel *));
@@ -336,14 +316,14 @@ void disksort __P((struct buf *, struct buf *));
u_int dkcksum __P((struct disklabel *));
int setdisklabel __P((struct disklabel *, struct disklabel *, u_long,
struct cpu_disklabel *));
-char *readdisklabel __P((dev_t, void (*)(), struct disklabel *,
+char *readdisklabel __P((dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *));
-int writedisklabel __P((dev_t, void (*)(), struct disklabel *,
+int writedisklabel __P((dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *));
#endif
-#endif /* LOCORE */
+#endif /* _LOCORE */
-#if !defined(_KERNEL) && !defined(LOCORE)
+#if !defined(_KERNEL) && !defined(_LOCORE)
#include <sys/cdefs.h>