Rev 9734 | Rev 9930 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9734 | Rev 9894 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2011-2021. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2011-2021. 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: 9734 $ |
8 | $Revision: 9894 $ |
9 | 9 | ||
10 | ; ============================================================================= |
10 | ; ============================================================================= |
11 | ; ================================= Constants ================================= |
11 | ; ================================= Constants ================================= |
Line 1239... | Line 1239... | ||
1239 | mov ebx, [ebp-4] ; get buffer |
1239 | mov ebx, [ebp-4] ; get buffer |
1240 | add ebx, [esi+DISK.MediaInfo.SectorSize] ; advance over MBR data to bootsector data |
1240 | add ebx, [esi+DISK.MediaInfo.SectorSize] ; advance over MBR data to bootsector data |
1241 | add ebp, 8 ; ebp points to part of PARTITION structure |
1241 | add ebp, 8 ; ebp points to part of PARTITION structure |
1242 | xor eax, eax ; first sector of the partition |
1242 | xor eax, eax ; first sector of the partition |
1243 | call fs_read32_sys |
1243 | call fs_read32_sys |
1244 | push eax |
1244 | ;push eax |
1245 | ; 2. Run tests for all supported filesystems. If at least one test succeeded, |
1245 | ; 2. Run tests for all supported filesystems. If at least one test succeeded, |
1246 | ; go to 4. |
1246 | ; go to 4. |
1247 | ; For tests: |
1247 | ; For tests: |
1248 | ; ebp -> first three fields of PARTITION structure, .start, .length, .disk; |
1248 | ; ebp -> first three fields of PARTITION structure, .start, .length, .disk; |
1249 | ; [esp] = error code after bootsector read: 0 = ok, otherwise = failed, |
1249 | ; [esp] = error code after bootsector read: 0 = ok, otherwise = failed, |
1250 | ; ebx points to the buffer for bootsector, |
1250 | ; ebx points to the buffer for bootsector, |
1251 | ; ebx+[esi+DISK.MediaInfo.SectorSize] points to sector-sized buffer that can be used for anything. |
1251 | ; ebx+[esi+DISK.MediaInfo.SectorSize] points to sector-sized buffer that can be used for anything. |
- | 1252 | mov ecx, [fs_list] |
|
- | 1253 | @@: |
|
- | 1254 | cmp ecx, fs_list |
|
- | 1255 | jz @f |
|
- | 1256 | ||
- | 1257 | push ecx eax |
|
- | 1258 | call dword[ecx + FileSystem.Creat_part] |
|
- | 1259 | pop ecx |
|
- | 1260 | test eax, eax |
|
- | 1261 | jnz .success |
|
- | 1262 | ||
- | 1263 | pop eax |
|
- | 1264 | mov ecx, [ecx] |
|
- | 1265 | jmp @b |
|
- | 1266 | @@: |
|
- | 1267 | push eax |
|
1252 | call fat_create_partition |
1268 | call fat_create_partition |
1253 | test eax, eax |
1269 | test eax, eax |
1254 | jnz .success |
1270 | jnz .success |
1255 | call exFAT_create_partition |
1271 | call exFAT_create_partition |
1256 | test eax, eax |
1272 | test eax, eax |