Minor cosmetic changes.

Make sure { on the same line as struct for all struct *devdesc.  Move
some type definitions to next to the dv_type define, since that's what
sets the d_type.
This commit is contained in:
Warner Losh 2018-03-12 21:39:27 +00:00
parent a5b0fd9ca9
commit b3a2aad11e
6 changed files with 17 additions and 21 deletions

View File

@ -81,8 +81,8 @@
#ifndef _DISK_H
#define _DISK_H
struct disk_devdesc
{
/* Note: Must match the 'struct devdesc' in stand.h */
struct disk_devdesc {
struct devsw *d_dev;
int d_type;
int d_unit;

View File

@ -29,12 +29,10 @@
/*
* i386 fully-qualified device descriptor.
* Note, this must match the 'struct devdesc' declaration
* in bootstrap.h and also with struct zfs_devdesc for zfs
* support.
* Note, this must match struct zfs_devdesc for zfs support.
*/
struct i386_devdesc
{
/* Note: Must match the 'struct devdesc' in stand.h */
struct i386_devdesc {
struct devsw *d_dev;
int d_type;
int d_unit;

View File

@ -138,6 +138,12 @@ extern struct fs_ops pkgfs_fsops;
struct devsw {
const char dv_name[8];
int dv_type; /* opaque type constant, arch-dependant */
#define DEVT_NONE 0
#define DEVT_DISK 1
#define DEVT_NET 2
#define DEVT_CD 3
#define DEVT_ZFS 4
#define DEVT_FD 5
int (*dv_init)(void); /* early probe call */
int (*dv_strategy)(void *devdata, int rw, daddr_t blk,
size_t size, char *buf, size_t *rsize);
@ -160,16 +166,9 @@ extern int errno;
* versions may be larger, but should be allowed to
* overlap.
*/
struct devdesc
{
struct devdesc {
struct devsw *d_dev;
int d_type;
#define DEVT_NONE 0
#define DEVT_DISK 1
#define DEVT_NET 2
#define DEVT_CD 3
#define DEVT_ZFS 4
#define DEVT_FD 5
int d_unit;
void *d_opendata;
};

View File

@ -27,7 +27,7 @@
#include "openfirm.h"
/* Note: Must match the 'struct devdesc' in bootstrap.h */
/* Note: Must match the 'struct devdesc' in stand.h */
struct ofw_devdesc {
struct devsw *d_dev;
int d_type;

View File

@ -27,8 +27,8 @@
* $FreeBSD$
*/
struct uboot_devdesc
{
/* Note: Must match the 'struct devdesc' in stand.h */
struct uboot_devdesc {
struct devsw *d_dev;
int d_type;
int d_unit;

View File

@ -33,12 +33,11 @@
/*
* ZFS fully-qualified device descriptor.
* Note, this must match the 'struct devdesc' declaration in bootstrap.h.
* Arch-specific device descriptors should be binary compatible with this
* structure if they are to support ZFS.
*/
struct zfs_devdesc
{
/* Note: Must match the 'struct devdesc' in stand.h */
struct zfs_devdesc {
struct devsw *d_dev;
int d_type;
int d_unit;