UbixOS V2
2.0
devfs.h
Go to the documentation of this file.
1
/*-
2
* Copyright (c) 2002-2018 The UbixOS Project.
3
* All rights reserved.
4
*
5
* This was developed by Christopher W. Olsen for the UbixOS Project.
6
*
7
* Redistribution and use in source and binary forms, with or without modification, are permitted
8
* provided that the following conditions are met:
9
*
10
* 1) Redistributions of source code must retain the above copyright notice, this list of
11
* conditions, the following disclaimer and the list of authors.
12
* 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13
* conditions, the following disclaimer and the list of authors in the documentation and/or
14
* other materials provided with the distribution.
15
* 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16
* endorse or promote products derived from this software without specific prior written
17
* permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef _DEVFS_DEVFS_H
30
#define _DEVFS_DEVFS_H
31
32
#include <
sys/types.h
>
33
#include <
vfs/file.h
>
34
35
struct
devfs_devices
{
36
struct
devfs_devices
*
next
;
37
struct
devfs_devices
*
prev
;
38
uInt8
devType
;
39
uInt16
devMajor
;
40
uInt16
devMinor
;
41
char
devName
[32];
42
};
43
44
struct
devfs_info
{
45
struct
devfs_devices
*
deviceList
;
46
};
47
48
int
devfs_init
();
49
int
devfs_makeNode
(
char
*
name
,
uInt8
type,
uInt16
major,
uInt16
minor);
50
/*
51
int devfs_open(char *file,fileDescriptor *fd);
52
void devFSInit(struct mountPoints *mp);
53
int devfs_read(fileDescriptor *fd,char *data,long offset,long size);
54
int devfs_write(fileDescriptor *fd,char *data,long offset,long size);
55
*/
56
57
#endif
58
59
/***
60
$Log: devfs.h,v $
61
Revision 1.1.1.1 2006/06/01 12:46:13 reddawg
62
ubix2
63
64
Revision 1.2 2005/10/12 00:13:36 reddawg
65
Removed
66
67
Revision 1.1.1.1 2005/09/26 17:23:38 reddawg
68
no message
69
70
Revision 1.5 2004/07/21 10:02:09 reddawg
71
devfs: renamed functions
72
device system: renamed functions
73
fdc: fixed a few potential bugs and cleaned up some unused variables
74
strol: fixed definition
75
endtask: made it print out freepage debug info
76
kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
77
ld: fixed a pointer conversion
78
file: cleaned up a few unused variables
79
sched: broke task deletion
80
kprintf: fixed ogPrintf definition
81
82
Revision 1.4 2004/07/14 12:17:52 reddawg
83
devfs: devFSEnable to devfs_init
84
Changed Startup Routines
85
86
Revision 1.3 2004/05/21 14:54:41 reddawg
87
Cleaned up
88
89
90
END
91
***/
file.h
devfs_devices::devType
uInt8 devType
Definition:
devfs.h:38
uInt16
unsigned short int uInt16
Definition:
objgfx30.h:48
devfs_makeNode
int devfs_makeNode(char *name, uInt8 type, uInt16 major, uInt16 minor)
Definition:
devfs.c:174
devfs_devices::prev
struct devfs_devices * prev
Definition:
devfs.h:37
devfs_devices
Definition:
devfs.h:35
devfs_init
int devfs_init()
Definition:
devfs.c:211
types.h
devfs_devices::devMajor
uInt16 devMajor
Definition:
devfs.h:39
uInt8
unsigned char uInt8
Definition:
objgfx30.h:47
devfs_info::deviceList
struct devfs_devices * deviceList
Definition:
devfs.h:45
devfs_devices::devName
char devName[32]
Definition:
devfs.h:41
devfs_devices::next
struct devfs_devices * next
Definition:
devfs.h:36
name
const char * name
Definition:
pci.c:37
devfs_info
Definition:
devfs.h:44
devfs_devices::devMinor
uInt16 devMinor
Definition:
devfs.h:40
C:
Dev
git
UbixOS
sys
include
devfs
devfs.h
Generated by
1.8.16