X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Finterface.c;h=69d54c3ebadebd1850a6604919477aaf1439fa8c;hb=384befc18f81f42d2dd6e324a35904ad037b3af7;hp=6f357134367d2ce340bafc37f43bd1061fe8d906;hpb=107a87368c3786c1be3c2bfaa0ba6ede956971c5;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/interface.c b/KernelLand/Modules/IPStack/interface.c index 6f357134..69d54c3e 100644 --- a/KernelLand/Modules/IPStack/interface.c +++ b/KernelLand/Modules/IPStack/interface.c @@ -22,14 +22,14 @@ extern tVFS_Node gIP_AdaptersNode; // === PROTOTYPES === int IPStack_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); -tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name); +tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); int IPStack_Root_IOCtl(tVFS_Node *Node, int ID, void *Data); int IPStack_AddFile(tSocketFile *File); tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name); int IPStack_Iface_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); -tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name); +tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); int IPStack_Iface_IOCtl(tVFS_Node *Node, int ID, void *Data); // === GLOBALS === @@ -110,11 +110,8 @@ int IPStack_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) /** * \brief Get the node of an interface */ -tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name) +tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) { - #if 0 - int i, num; - #endif tInterface *iface; ENTER("pNode sName", Node, Name); @@ -231,7 +228,7 @@ tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name) } else { - nameLen = sprintf(NULL, "%i", giIP_NextIfaceId); + nameLen = snprintf(NULL, 0, "%i", giIP_NextIfaceId); } iface = malloc( @@ -304,7 +301,7 @@ tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name) */ int IPStack_AddFile(tSocketFile *File) { - Log_Log("IPStack", "Added file '%s'", File->Name); +// Log_Log("IPStack", "Added file '%s'", File->Name); File->Next = gIP_FileTemplates; gIP_FileTemplates = File; return 0; @@ -333,7 +330,7 @@ int IPStack_Iface_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) /** * \brief Gets a named node from an interface directory */ -tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name) +tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) { tSocketFile *file = gIP_FileTemplates;