X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fmount.c;h=1773218a3908ab4a474cbc17c3788607cd3fbfcb;hb=7b8c541cd83b70296325dbbf047d682fd7b03c22;hp=a42cd09b7332ccadc0c74cb3a50c445bf7ab55fd;hpb=ee9c3126fc8c693418a9f1216245a0576c0582d4;p=tpg%2Facess2.git diff --git a/Kernel/vfs/mount.c b/Kernel/vfs/mount.c index a42cd09b..1773218a 100644 --- a/Kernel/vfs/mount.c +++ b/Kernel/vfs/mount.c @@ -20,7 +20,7 @@ void VFS_UpdateMountFile(void); tMutex glVFS_MountList; tVFS_Mount *gVFS_Mounts; tVFS_Mount *gVFS_RootMount = NULL; -Uint32 giVFS_NextMountIdent = 0; +Uint32 giVFS_NextMountIdent = 1; // === CODE === /** @@ -82,6 +82,12 @@ int VFS_Mount(const char *Device, const char *MountPoint, const char *Filesystem } mnt->Identifier = giVFS_NextMountIdent++; + #if 0 + // Ensure identifiers don't repeat + // - Only a problem if there have been 4 billion mounts + while( giVFS_NextMountIdent == 0 || VFS_GetMountByIdent(giVFS_NextMountIdent) ) + giVFS_NextMountIdent ++; + #endif // Set root if(!gVFS_RootMount) gVFS_RootMount = mnt;