support for PnP disks, part 1

git-svn-id: svn://kolibrios.org@2119 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2011-08-25 18:32:14 +00:00
parent 0c8c27e46c
commit 1eb4e63e51
4 changed files with 1224 additions and 2 deletions

1215
kernel/trunk/fs/disk.inc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,7 @@ ERROR_MEMORY_POINTER = 7
ERROR_DISK_FULL = 8 ERROR_DISK_FULL = 8
ERROR_FAT_TABLE = 9 ERROR_FAT_TABLE = 9
ERROR_ACCESS_DENIED = 10 ERROR_ACCESS_DENIED = 10
ERROR_DEVICE = 11
PUSHAD_EAX equ [esp+28] PUSHAD_EAX equ [esp+28]
PUSHAD_ECX equ [esp+24] PUSHAD_ECX equ [esp+24]

View File

@ -85,6 +85,7 @@ virtual_root_query:
fs_additional_handlers: fs_additional_handlers:
dd biosdisk_handler, biosdisk_enum_root dd biosdisk_handler, biosdisk_enum_root
dd dyndisk_handler, dyndisk_enum_root
; add new handlers here ; add new handlers here
dd 0 dd 0
@ -383,7 +384,8 @@ file_system_lfn:
.notfounda: .notfounda:
cmp edi, esp cmp edi, esp
jnz .notfound jnz .notfound
add esp, 8 call dword [edi+4]
add esp, 16
jmp .notfound jmp .notfound
.found1: .found1:
@ -850,6 +852,8 @@ biosdisk_handler:
jmp file_system_lfn.maindir_noesi jmp file_system_lfn.maindir_noesi
@@: @@:
push ecx push ecx
push ecx
push biosdisk_cleanup
push fs_OnBd push fs_OnBd
mov edi, esp mov edi, esp
jmp file_system_lfn.found2 jmp file_system_lfn.found2
@ -858,10 +862,11 @@ fs_BdNext:
cmp eax, [BiosDiskPartitions+ecx*4] cmp eax, [BiosDiskPartitions+ecx*4]
inc eax inc eax
cmc cmc
biosdisk_cleanup:
ret ret
fs_OnBd: fs_OnBd:
pop edx edx pop edx edx edx edx
; edx = disk number, ecx = partition number ; edx = disk number, ecx = partition number
; esi+ebp = name ; esi+ebp = name
call reserve_hd1 call reserve_hd1

View File

@ -234,6 +234,7 @@ include "gui/button.inc"
; file system ; file system
include "fs/disk.inc" ; support for plug-n-play disks
include "fs/fs.inc" ; syscall include "fs/fs.inc" ; syscall
include "fs/fat32.inc" ; read / write for fat32 filesystem include "fs/fat32.inc" ; read / write for fat32 filesystem
include "fs/ntfs.inc" ; read / write for ntfs filesystem include "fs/ntfs.inc" ; read / write for ntfs filesystem