freebsd-skq/sys/sys/sliceio.h
julian 0796a5c56e Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.
1998-04-19 23:32:49 +00:00

38 lines
1.1 KiB
C

/*
* $Id: mtio.h,v 1.10 1997/02/22 09:45:37 peter Exp $
*/
#ifndef _SYS_SLICEIO_H_
#define _SYS_SLICEIO_H_
#ifndef KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
#define SLCTYPE_SIZE 16
#define SLCNAME_SIZE 32
struct sliceinfo {
u_int64_t size;
u_int32_t blocksize;
char type[SLCTYPE_SIZE]; /* e.g. sd or raw*/
char hint[SLCTYPE_SIZE]; /* e.g. mbr or ""*/
char handler[SLCTYPE_SIZE]; /* e.g. mbr or "" */
char devicename[SLCNAME_SIZE]; /* e.g. sd0s1a */
};
struct subsliceinfo {
struct sliceinfo wholesliceinfo; /* size of the whole slice */
int slicenumber; /* which subslice we are on */
u_int64_t offset; /* where that subslice starts */
struct sliceinfo subsliceinfo; /* info about that subslice */
};
#define SLCIOCRESET _IO('S', 0) /* reset and reprobe. */
#define SLCIOCINQ _IOR('S', 2, struct sliceinfo) /* info on container */
#define SLCIOCMOD _IOW('S', 3, struct sliceinfo) /* force container */
#define SLCIOCGETSUB _IOWR('S', 4, struct subsliceinfo) /* get sub info */
#define SLCIOCSETSUB _IOWR('S', 5, struct subsliceinfo) /* set sub info */
#endif /* !_SYS_SLICEIO_H_ */