X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fmount.c;h=d0d7290c303243f05ebb3f3fb6ac6c10952e37ed;hb=7e3a0260f0a6bb7bb1c1c001649b04bbe7ad6d52;hp=45591a46f6fd6048d97ba6a97fa5752eb2cb5bd9;hpb=775bf8013abe9fe4ef3d4883ea2e43bba2a84da1;p=tpg%2Facess2.git diff --git a/Kernel/vfs/mount.c b/Kernel/vfs/mount.c index 45591a46..d0d7290c 100644 --- a/Kernel/vfs/mount.c +++ b/Kernel/vfs/mount.c @@ -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;