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
Nearly completed physical init
[tpg/acess2.git]
/
Modules
/
IPStack
/
main.c
diff --git
a/Modules/IPStack/main.c
b/Modules/IPStack/main.c
index
9b132ec
..
6b75b77
100644
(file)
--- a/
Modules/IPStack/main.c
+++ b/
Modules/IPStack/main.c
@@
-97,7
+97,7
@@
int IPStack_Install(char **Arguments)
*/
int IPStack_AddFile(tSocketFile *File)
{
*/
int IPStack_AddFile(tSocketFile *File)
{
- Log
("IPStack_AddFile: %s
", File->Name);
+ Log
_Log("IPStack", "Added file '%s'
", File->Name);
File->Next = gIP_FileTemplates;
gIP_FileTemplates = File;
return 0;
File->Next = gIP_FileTemplates;
gIP_FileTemplates = File;
return 0;
@@
-231,7
+231,6
@@
char *IPStack_Iface_ReadDir(tVFS_Node *Node, int Pos)
{
tSocketFile *file = gIP_FileTemplates;
while(Pos-- && file) {
{
tSocketFile *file = gIP_FileTemplates;
while(Pos-- && file) {
- Log("IPStack_Iface_ReadDir: %s", file->Name);
file = file->Next;
}
file = file->Next;
}
@@
-251,7
+250,6
@@
tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, char *Name)
for(;file;file = file->Next)
{
if( strcmp(file->Name, Name) == 0 ) break;
for(;file;file = file->Next)
{
if( strcmp(file->Name, Name) == 0 ) break;
- Log("IPStack_Iface_FindDir: strcmp('%s', '%s')", file->Name, Name);
}
if(!file) return NULL;
}
if(!file) return NULL;
@@
-513,9
+511,12
@@
int IPStack_Iface_IOCtl(tVFS_Node *Node, int ID, void *Data)
int IPStack_AddInterface(char *Device)
{
tInterface *iface;
int IPStack_AddInterface(char *Device)
{
tInterface *iface;
+ tAdapter *card;
ENTER("sDevice", Device);
ENTER("sDevice", Device);
+ card = IPStack_GetAdapter(Device);
+
iface = malloc(sizeof(tInterface));
if(!iface) {
LEAVE('i', -2);
iface = malloc(sizeof(tInterface));
if(!iface) {
LEAVE('i', -2);
@@
-527,7
+528,6
@@
int IPStack_AddInterface(char *Device)
// Create Node
iface->Node.ImplPtr = iface;
// Create Node
iface->Node.ImplPtr = iface;
- iface->Node.ImplInt = giIP_NextIfaceId++;
iface->Node.Flags = VFS_FFLAG_DIRECTORY;
iface->Node.Size = -1;
iface->Node.NumACLs = 1;
iface->Node.Flags = VFS_FFLAG_DIRECTORY;
iface->Node.Size = -1;
iface->Node.NumACLs = 1;
@@
-547,6
+547,10
@@
int IPStack_AddInterface(char *Device)
return -1; // Return ERR_YOUFAIL
}
return -1; // Return ERR_YOUFAIL
}
+ // Delay setting ImplInt until after the adapter is opened
+ // Keeps things simple
+ iface->Node.ImplInt = giIP_NextIfaceId++;
+
// Append to list
LOCK( &glIP_Interfaces );
if( gIP_Interfaces ) {
// Append to list
LOCK( &glIP_Interfaces );
if( gIP_Interfaces ) {
UCC
git Repository :: git.ucc.asn.au