Fixed bad handling of VFS_AllocHandle_
[tpg/acess2.git] / Kernel / vfs / mount.c
index 45591a4..d0d7290 100644 (file)
@@ -11,11 +11,11 @@ extern int  giVFS_MountFileID;
 extern char    *gsVFS_MountFile;
 
 // === PROTOTYPES ===
- int   VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options);
-void   VFS_UpdateMountFile();
+ int   VFS_Mount(const char *Device, const char *MountPoint, const char *Filesystem, const char *Options);
+void   VFS_UpdateMountFile(void);
 
 // === GLOBALS ===
- int   glVFS_MountList = 0;
+tMutex glVFS_MountList;
 tVFS_Mount     *gVFS_Mounts;
 tVFS_Mount     *gVFS_RootMount = NULL;
 
@@ -32,7 +32,7 @@ tVFS_Mount    *gVFS_RootMount = NULL;
  * \a Filesystem. The options in the string \a Options is passed to the
  * driver's mount.
  */
-int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options)
+int VFS_Mount(const char *Device, const char *MountPoint, const char *Filesystem, const char *Options)
 {
        tVFS_Mount      *mnt;
        tVFS_Driver     *fs;
@@ -82,7 +82,7 @@ int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options)
        if(!gVFS_RootMount)     gVFS_RootMount = mnt;
        
        // Add to mount list
-       LOCK( &glVFS_MountList );
+       Mutex_Acquire( &glVFS_MountList );
        {
                tVFS_Mount      *tmp;
                mnt->Next = NULL;
@@ -94,7 +94,7 @@ int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options)
                        gVFS_Mounts = mnt;
                }
        }
-       RELEASE( &glVFS_MountList );
+       Mutex_Release( &glVFS_MountList );
        
        Log_Log("VFS", "Mounted '%s' to '%s' ('%s')", Device, MountPoint, Filesystem);
        
@@ -108,7 +108,7 @@ int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options)
  * 
  * Updates the ProcFS mounts file buffer to match the current mounts list.
  */
-void VFS_UpdateMountFile()
+void VFS_UpdateMountFile(void)
 {
         int    len = 0;
        char    *buf;

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