Kernel/PCI - Removed unused port bitmap
[tpg/acess2.git] / KernelLand / Kernel / drv / fifo.c
index 94e8aae..cb62193 100644 (file)
@@ -31,7 +31,7 @@ tVFS_Node     *FIFO_FindDir(tVFS_Node *Node, const char *Filename);
  int   FIFO_MkNod(tVFS_Node *Node, const char *Name, Uint Flags);
 void   FIFO_Reference(tVFS_Node *Node);
 void   FIFO_Close(tVFS_Node *Node);
- int   FIFO_Relink(tVFS_Node *Node, const char *OldName, const char *NewName);
+ int   FIFO_Unlink(tVFS_Node *Node, const char *OldName);
 size_t FIFO_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer);
 size_t FIFO_Write(tVFS_Node *Node, off_t Offset, size_t Length, const void *Buffer);
 tPipe  *FIFO_Int_NewPipe(int Size, const char *Name);
@@ -43,7 +43,7 @@ tVFS_NodeType gFIFO_DirNodeType = {
        .ReadDir = FIFO_ReadDir,
        .FindDir = FIFO_FindDir,
        .MkNod = FIFO_MkNod,
-       .Relink = FIFO_Relink,
+       .Unlink = FIFO_Unlink,
        .IOCtl = FIFO_IOCtl
 };
 tVFS_NodeType  gFIFO_PipeNodeType = {
@@ -178,12 +178,11 @@ void FIFO_Close(tVFS_Node *Node)
 }
 
 /**
- * \fn int FIFO_Relink(tVFS_Node *Node, const char *OldName, const char *NewName)
- * \brief Relink a file (Deletes named pipes)
+ * \brief Delete a pipe
  */
-int FIFO_Relink(tVFS_Node *Node, const char *OldName, const char *NewName)
+int FIFO_Unlink(tVFS_Node *Node, const char *OldName)
 {
-       tPipe   *pipe, *tmp;
+       tPipe   *pipe;
        
        if(Node != &gFIFO_DriverInfo.RootNode)  return 0;
        
@@ -200,22 +199,6 @@ int FIFO_Relink(tVFS_Node *Node, const char *OldName, const char *NewName)
        }
        if(!pipe)       return 0;
        
-       // Relink a named pipe
-       if(NewName) {
-               // Check new name
-               for(tmp = gFIFO_NamedPipes;
-                       tmp;
-                       tmp = tmp->Next)
-               {
-                       if(strcmp(tmp->Name, NewName) == 0)     return 0;
-               }
-               // Create new name
-               free(pipe->Name);
-               pipe->Name = malloc(strlen(NewName)+1);
-               strcpy(pipe->Name, NewName);
-               return 1;
-       }
-       
        // Unlink the pipe
        if(Node->ImplPtr) {
                free(Node->ImplPtr);

UCC git Repository :: git.ucc.asn.au