X-Git-Url: https://git.wirehaze.ovh/BOS.git/blobdiff_plain/e751bf401d777584d0f7cb58ebc233b48d9c669f..08bb2f475e10fda9373da243b2adcf37cfc6fcca:/kernel/vfs/vfs.asm?ds=inline diff --git a/kernel/vfs/vfs.asm b/kernel/vfs/vfs.asm index 3742be6..30d5590 100644 --- a/kernel/vfs/vfs.asm +++ b/kernel/vfs/vfs.asm @@ -6,6 +6,13 @@ ; ; ;----------------------------------------------------------; + + ; file handles need to be dword, where the high + ; word contains drive number, and the low word + ; is the drive/FS specific handle. limits FS to + ; a max of 65535 opened files. should be alright. ;) + + ;---------------------------------------------; ; VFS main structure ; ;---------------------------------------------; @@ -16,6 +23,8 @@ times 255 * sizeof.VFS_storage db 0 ; storage driver structure .filesystem: times 255 * sizeof.VFS_filesystem db 0 ; filesystem driver structure + .mounted db 0 ; 1/0 switch if mounted + .current_path: times 255 db 0 ; drive opened path (increase max path size?) } virtual at 0 ; could use "at esi" instead @@ -68,16 +77,17 @@ sizeof.VFS_filesystem = $-$$ end virtual - + ;---------------------------------------------; + ; VFS structure pointer ; + ;---------------------------------------------; VFS_structure dd 0 + ;--------------------------------------------------------------; ; init_vfs - detect connected drives ; ;--------------------------------------------------------------; ; ; -; in: reg = pointer to VFS drive info ; -; ; -; out: reg = pointer to struct(s) if FAT12 found ; +; out: cf = set if failed ; ; ; ;--------------------------------------------------------------; init_vfs: