git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed `make install` issues, bugs with VESA
[tpg/acess2.git]
/
Kernel
/
vfs
/
fs
/
devfs.c
diff --git
a/Kernel/vfs/fs/devfs.c
b/Kernel/vfs/fs/devfs.c
index
b7379ad
..
162f111
100644
(file)
--- a/
Kernel/vfs/fs/devfs.c
+++ b/
Kernel/vfs/fs/devfs.c
@@
-8,11
+8,13
@@
#include <fs_devfs.h>
// === PROTOTYPES ===
#include <fs_devfs.h>
// === PROTOTYPES ===
+#if 0
int DevFS_AddDevice(tDevFS_Driver *Device);
void DevFS_DelDevice(tDevFS_Driver *Device);
int DevFS_AddDevice(tDevFS_Driver *Device);
void DevFS_DelDevice(tDevFS_Driver *Device);
-tVFS_Node *DevFS_InitDevice(char *Device, char **Options);
+#endif
+tVFS_Node *DevFS_InitDevice(const char *Device, const char **Options);
char *DevFS_ReadDir(tVFS_Node *Node, int Pos);
char *DevFS_ReadDir(tVFS_Node *Node, int Pos);
-tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name);
+tVFS_Node *DevFS_FindDir(tVFS_Node *Node, c
onst c
har *Name);
// === GLOBALS ===
tVFS_Driver gDevFS_Info = {
// === GLOBALS ===
tVFS_Driver gDevFS_Info = {
@@
-28,7
+30,7
@@
tVFS_Node gDevFS_RootNode = {
};
tDevFS_Driver *gDevFS_Drivers = NULL;
int giDevFS_NextID = 1;
};
tDevFS_Driver *gDevFS_Drivers = NULL;
int giDevFS_NextID = 1;
-tS
pinlock
glDevFS_ListLock;
+tS
hortSpinlock
glDevFS_ListLock;
// === CODE ===
/**
// === CODE ===
/**
@@
-39,7
+41,7
@@
int DevFS_AddDevice(tDevFS_Driver *Device)
int ret = 0;
tDevFS_Driver *dev;
int ret = 0;
tDevFS_Driver *dev;
- LOCK( &glDevFS_ListLock );
+
SHORT
LOCK( &glDevFS_ListLock );
// Check if the device is already registered or the name is taken
for( dev = gDevFS_Drivers; dev; dev = dev->Next )
// Check if the device is already registered or the name is taken
for( dev = gDevFS_Drivers; dev; dev = dev->Next )
@@
-63,7
+65,7
@@
int DevFS_AddDevice(tDevFS_Driver *Device)
gDevFS_RootNode.Size ++;
ret = giDevFS_NextID ++;
}
gDevFS_RootNode.Size ++;
ret = giDevFS_NextID ++;
}
-
RELEASE
( &glDevFS_ListLock );
+
SHORTREL
( &glDevFS_ListLock );
return ret;
}
return ret;
}
@@
-75,7
+77,7
@@
void DevFS_DelDevice(tDevFS_Driver *Device)
{
tDevFS_Driver *prev = NULL, *dev;
{
tDevFS_Driver *prev = NULL, *dev;
- LOCK( &glDevFS_ListLock );
+
SHORT
LOCK( &glDevFS_ListLock );
// Search list for device
for(dev = gDevFS_Drivers;
dev && dev != Device;
// Search list for device
for(dev = gDevFS_Drivers;
dev && dev != Device;
@@
-94,15
+96,14
@@
void DevFS_DelDevice(tDevFS_Driver *Device)
Log_Warning("DevFS", "Attempted to unregister device %p '%s' which was not registered",
Device, Device->Name);
Log_Warning("DevFS", "Attempted to unregister device %p '%s' which was not registered",
Device, Device->Name);
-
RELEASE
( &glDevFS_ListLock );
+
SHORTREL
( &glDevFS_ListLock );
}
/**
}
/**
- * \fn tVFS_Node *DevFS_InitDevice(char *Device, char **Options)
* \brief Initialise the DevFS and detect double-mounting, or just do nothing
* \note STUB
*/
* \brief Initialise the DevFS and detect double-mounting, or just do nothing
* \note STUB
*/
-tVFS_Node *DevFS_InitDevice(c
har *Device,
char **Options)
+tVFS_Node *DevFS_InitDevice(c
onst char *Device, const
char **Options)
{
return &gDevFS_RootNode;
}
{
return &gDevFS_RootNode;
}
@@
-128,10
+129,10
@@
char *DevFS_ReadDir(tVFS_Node *Node, int Pos)
}
/**
}
/**
- * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name)
+ * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, c
onst c
har *Name)
* \brief Get an entry from the devices directory
*/
* \brief Get an entry from the devices directory
*/
-tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name)
+tVFS_Node *DevFS_FindDir(tVFS_Node *Node, c
onst c
har *Name)
{
tDevFS_Driver *dev;
{
tDevFS_Driver *dev;
UCC
git Repository :: git.ucc.asn.au