[BACK]Return to root.c CVS log [TXT][DIR] Up to [local] / funnyos / dev

File: [local] / funnyos / dev / root.c (download)

Revision 1.1, Tue Oct 16 08:41:04 2007 UTC (16 years, 6 months ago) by init
Branch: MAIN

Initial revision

/*
 * $Id: root.c,v 1.1 2007/10/16 08:41:04 init Exp $
 */
#include <sys/types.h>
#include <sys/device.h>
#include <libkern/printf.h>

int 	root_attach(struct device *, uint32_t, uint8_t);

/* bogus root_dd */
struct root_dd {
	uint32_t rd_bogus1;
	uint8_t  rd_bogus2;
};

struct driver root_dr = {
	/* sizeof(dd) */ sizeof(struct root_dd),
	/* attach */ root_attach,
	/* detach */ NULL
};


/*
 * System root device.
 * All other will be created/destroyed dynamically with devconfig.
 */
struct device *rootdev;

int
root_attach(struct device *self, uint32_t loc, uint8_t flags)
{
	/* root pseudo device */

	printf("(root) pseudo device\n");

	return(0);
}