Rev 8985 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8985 | Rev 8986 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License. ;; |
4 | ;; Distributed under terms of the GNU General Public License. ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 8914 $ |
8 | $Revision: 8986 $ |
9 | 9 | ||
10 | ERROR_SUCCESS = 0 |
10 | ERROR_SUCCESS = 0 |
11 | ERROR_DISK_BASE = 1 |
11 | ERROR_DISK_BASE = 1 |
Line 88... | Line 88... | ||
88 | ; .ret: |
88 | ; .ret: |
89 | ; pop edx ecx ebx |
89 | ; pop edx ecx ebx |
90 | ; ret |
90 | ; ret |
91 | ; endp |
91 | ; endp |
Line 92... | Line 92... | ||
92 | 92 | ||
93 | ; syscall_fileSystemUnicode: ; with user pointer correctness checking |
93 | ; syscall_syscall_fs_diff_encodings: ; with user pointer correctness checking |
94 | ; ; in: ebx -> f.80 parameter structure |
94 | ; ; in: ebx -> f.80 parameter structure |
95 | ; stdcall file_system_is_operation_safe, ebx |
95 | ; stdcall file_system_is_operation_safe, ebx |
Line 96... | Line 96... | ||
96 | ; jnz @f |
96 | ; jnz @f |
97 | 97 | ||
98 | ; DEBUGF 1, "sysfn80 addr error\n" |
98 | ; DEBUGF 1, "sysfn80 addr error\n" |
99 | ; mov dword [image_of_eax], ERROR_MEMORY_POINTER |
99 | ; mov dword [image_of_eax], ERROR_MEMORY_POINTER |
100 | ; ret |
100 | ; ret |
Line 101... | Line 101... | ||
101 | ; @@: |
101 | ; @@: |
102 | ; jmp fileSystemUnicode |
102 | ; jmp syscall_fs_diff_encodings |
103 | 103 | ||
104 | ; temporarily commented out cause acpi driver (drivers/devman) uses sysfn70 via 0x40 |
104 | ; temporarily commented out cause acpi driver (drivers/devman) uses sysfn70 via 0x40 |
105 | ; so because drivers it kernel space, pointer checking fails |
105 | ; so because drivers it kernel space, pointer checking fails |
106 | ; TODO solution: add filesystem functions without pointer checking to kernel exports |
106 | ; TODO solution: add filesystem functions without pointer checking to kernel exports |
107 | ; and make the driver use them, not int 0x40 |
107 | ; and make the driver use them, not int 0x40 |
108 | ; syscall_fileSystemUnicode commented out for the same reason |
108 | ; syscall_syscall_fs_diff_encodings commented out for the same reason |
109 | ; syscall_file_system_lfn: ; with user pointer correctness checking |
109 | ; syscall_file_system_lfn: ; with user pointer correctness checking |
Line 110... | Line 110... | ||
110 | ; ; in: ebx -> f.70 parameter structure |
110 | ; ; in: ebx -> f.70 parameter structure |
111 | ; stdcall file_system_is_operation_safe, ebx |
111 | ; stdcall file_system_is_operation_safe, ebx |
112 | ; jnz @f |
112 | ; jnz @f |
113 | 113 | ||
114 | ; DEBUGF 1, "sysfn70 addr error\n" |
114 | ; DEBUGF 1, "sysfn70 addr error\n" |
Line 115... | Line 115... | ||
115 | ; mov dword [image_of_eax], ERROR_MEMORY_POINTER |
115 | ; mov dword [image_of_eax], ERROR_MEMORY_POINTER |
Line 116... | Line 116... | ||
116 | ; ret |
116 | ; ret |
117 | ; @@: |
117 | ; @@: |
118 | ; jmp file_system_lfn |
118 | ; jmp syscall_file_system_lfn |
119 | 119 | ||
120 | 120 | ||
121 | ; System function 70 |
121 | ; System function 70 |
122 | 122 | ||
123 | file_system_lfn_protected: |
123 | syscall_file_system_lfn_protected: |
124 | pushad |
124 | pushad |
Line 125... | Line 125... | ||
125 | call protect_from_terminate |
125 | call protect_from_terminate |
126 | call file_system_lfn |
126 | call syscall_file_system_lfn |
127 | call unprotect_from_terminate |
127 | call unprotect_from_terminate |
128 | popad |
128 | popad |
129 | mov [image_of_eax], eax |
129 | mov [image_of_eax], eax |
Line 130... | Line 130... | ||
130 | mov [image_of_ebx], ebx |
130 | mov [image_of_ebx], ebx |
131 | ret |
131 | ret |
132 | 132 | ||
133 | fileSystemUnicode: |
133 | syscall_fs_diff_encodings: |
134 | ; in: ebx -> f.80 parameter structure |
134 | ; in: ebx -> f.80 parameter structure |
135 | mov edi, [ebx+20] |
135 | mov edi, [ebx+20] |
Line 510... | Line 510... | ||
510 | ;----------------------------------------------------------------------------- |
510 | ;----------------------------------------------------------------------------- |
511 | uglobal |
511 | uglobal |
512 | addDirSeal db ? |
512 | addDirSeal db ? |
513 | endg |
513 | endg |
Line 514... | Line 514... | ||
514 | 514 | ||
515 | sys_current_directory: ; sysfunction 30 |
515 | syscall_current_directory: ; sysfunction 30 |
516 | mov eax, [current_slot] |
516 | mov eax, [current_slot] |
517 | mov edi, [eax+APPDATA.cur_dir] |
517 | mov edi, [eax+APPDATA.cur_dir] |
518 | xor eax, eax |
518 | xor eax, eax |
519 | dec ebx |
519 | dec ebx |