Subversion Repositories Kolibri OS

Rev

Rev 6502 | Rev 6534 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2288 clevermous 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
6462 pathoswith 3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
4
;;  Distributed under terms of the GNU General Public License.  ;;
2288 clevermous 5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
8
$Revision: 6503 $
9
 
2889 turbanoff 10
ERROR_SUCCESS        = 0
11
ERROR_DISK_BASE      = 1
12
ERROR_UNSUPPORTED_FS = 2
13
ERROR_UNKNOWN_FS     = 3
14
ERROR_PARTITION      = 4
15
ERROR_FILE_NOT_FOUND = 5
16
ERROR_END_OF_FILE    = 6
17
ERROR_MEMORY_POINTER = 7
18
ERROR_DISK_FULL      = 8
19
ERROR_FS_FAIL        = 9
20
ERROR_ACCESS_DENIED  = 10
21
ERROR_DEVICE         = 11
5994 pathoswith 22
ERROR_OUT_OF_MEMORY  = 12
2288 clevermous 23
 
6468 pathoswith 24
maxPathLength = 1000h
25
 
2288 clevermous 26
image_of_eax EQU esp+32
27
image_of_ebx EQU esp+20
28
 
6464 pathoswith 29
; System function 70
2288 clevermous 30
 
3296 clevermous 31
file_system_lfn_protected:
32
        pushad
33
        call    protect_from_terminate
34
        call    file_system_lfn
35
        call    unprotect_from_terminate
36
        popad
37
        mov     [image_of_eax], eax
38
        mov     [image_of_ebx], ebx
39
        ret
40
 
2288 clevermous 41
file_system_lfn:
6464 pathoswith 42
; in: ebx -> parameter structure
43
;   operation codes:
44
; 0 = read file
45
; 1 = read folder
46
; 2 = create/rewrite file
47
; 3 = write/append to file
48
; 4 = set file end
49
; 5 = get file info
50
; 6 = set file info
51
; start application
52
; 8 = delete file/folder
53
; 9 = create folder
6468 pathoswith 54
        lea     ebp, [ebx+20]
55
        cmp     byte [ebp], 0
2288 clevermous 56
        jnz     @f
6468 pathoswith 57
        mov     ebp, [ebx+21]
2288 clevermous 58
@@:
6502 pathoswith 59
        cmp     word [ebp], '/'
60
        jz      .rootdir
61
        cmp     byte [ebp], 4
62
        jnc     @f
63
        cmp     byte [ebp], 0
64
        jz      @f
65
        cmp     word [ebp+1], '/'
66
        jnz     @f
67
        cmp     byte [ebp], 2
68
        jnz     .rootdir
69
        cmp     word [ebp+3], 0
70
        jz      .rootdir
71
@@:
6464 pathoswith 72
        cmp     dword[ebx], 7   ; start application
6502 pathoswith 73
        jnz     @f
6333 serge 74
        mov     edx, [ebx+4]
75
        mov     ebx, [ebx+8]
6464 pathoswith 76
        call    fs_execute      ; ebp, ebx, edx
6333 serge 77
        mov     [image_of_eax], eax
78
        ret
6464 pathoswith 79
 
6333 serge 80
@@:
6468 pathoswith 81
        stdcall kernel_alloc, maxPathLength
82
        push    ebx
83
        mov     ebx, ebp
84
        mov     ebp, eax
6502 pathoswith 85
        stdcall get_full_file_name, eax, maxPathLength
6468 pathoswith 86
        pop     ebx
6471 pathoswith 87
        test    eax, eax
88
        jz      .notfound
6502 pathoswith 89
        lea     esi, [ebp+2]
90
        mov     ax, [esi]
6464 pathoswith 91
        or      ax, 2020h
92
        cmp     ax, 'cd'
93
        jz      .CD
94
        call    dyndisk_handler ; not returns if success
95
.notfound:
6468 pathoswith 96
        stdcall kernel_free, ebp
6464 pathoswith 97
        mov     dword[image_of_eax], ERROR_FILE_NOT_FOUND
98
        ret
99
 
100
.CD:
101
        add     esi, 2
102
        xor     eax, eax
103
        lodsb       ; disk number
104
        sub     eax, '0'
105
        cmp     eax, 10
106
        jnc     .notfound
107
        mov     edi, eax
2288 clevermous 108
        lodsb
6464 pathoswith 109
        test    eax, eax
110
        jz      .maindir
2288 clevermous 111
        cmp     al, '/'
6464 pathoswith 112
        jnz     .notfound
113
        lodsb       ; partition number
114
        test    eax, eax
115
        jz      .maindir
116
        cmp     al, '1'
117
        jnz     .notfound
118
        cmp     byte [esi], '/'
119
        jnz     @f
120
        inc     esi
121
@@:
122
        call    reserve_cd
123
        mov     eax, edi
124
        bt      eax, 0
125
        setc    [DiskNumber]
126
        bt      eax, 1
127
        setc    [ChannelNumber]
128
        inc     [ChannelNumber]
129
        inc     eax
130
        mov     [cdpos], eax
131
        call    reserve_cd_channel
132
        mov     eax, edi
133
        not     eax
134
        and     eax, 3
135
        shl     eax, 1
136
        inc     eax
137
        shr     edi, 2
138
        mov     dword[image_of_eax], ERROR_FILE_NOT_FOUND
139
        bt      [edi*5+DRIVE_DATA+1], ax
140
        jnc     @f
141
        mov     ecx, [ebx+12]
142
        mov     edx, [ebx+16]
143
        mov     eax, [ebx]
144
        mov     dword[image_of_eax], ERROR_UNSUPPORTED_FS
145
        cmp     eax, fs_NumCdServices
146
        jae     @f
147
        add     ebx, 4
148
        call    dword[fs_CdServices + eax*4]
149
        mov     [image_of_eax], eax
150
        mov     [image_of_ebx], ebx
151
@@:
152
        call    free_cd_channel
153
        and     [cd_status], 0
6468 pathoswith 154
        stdcall kernel_free, ebp
6464 pathoswith 155
        ret
156
 
157
.nextCD:
158
        test    eax, eax    ; partition number
159
        stc
160
        jnz     @f      ; no more partitions
161
        mov     al, 1   ; /cdX/1
162
        clc
163
@@:
164
        ret
165
 
166
.maindir:   ; list partitions
167
        mov     esi, .nextCD
168
.maindir_noesi:     ; backjump from dyndisk_handler
6468 pathoswith 169
        push    ebp
170
        mov     ebp, ecx
171
        call    kernel_free
6464 pathoswith 172
        cmp     dword[ebx], 1
173
        jnz     .access_denied  ; read folder?
6468 pathoswith 174
        push    ebp
175
        pushd   [ebx+4]         ; first block
6464 pathoswith 176
        mov     ebp, [ebx+12]   ; the number of blocks to read
6468 pathoswith 177
        mov     edx, [ebx+16]   ; buffer
2288 clevermous 178
        mov     ebx, [ebx+8]    ; flags
6464 pathoswith 179
        mov     ecx, 32/4
2288 clevermous 180
        mov     edi, edx
6464 pathoswith 181
        xor     eax, eax
2288 clevermous 182
        rep stosd
183
        mov     byte [edx], 1   ; version
184
.maindir_loop:
185
        call    esi
186
        jc      .maindir_done
6464 pathoswith 187
        inc     dword[edx+8]
188
        dec     dword[esp]
2288 clevermous 189
        jns     .maindir_loop
190
        dec     ebp
191
        js      .maindir_loop
6464 pathoswith 192
        inc     dword[edx+4]
193
        mov     dword[edi], 16      ; attributes: folder
194
        mov     dword[edi+4], ebx   ; name encoding
2288 clevermous 195
        push    eax
6464 pathoswith 196
        mov     ecx, 32/4
197
        add     edi, 8
2288 clevermous 198
        xor     eax, eax
199
        rep stosd
200
        pop     eax
6464 pathoswith 201
        push    eax edx edi
202
; convert number in eax to decimal string
2288 clevermous 203
        push    -'0'
204
        mov     ecx, 10
205
@@:
206
        xor     edx, edx
207
        div     ecx
208
        push    edx
209
        test    eax, eax
210
        jnz     @b
6464 pathoswith 211
        cmp     ebx, 1
212
        jz      .uni
2288 clevermous 213
@@:
214
        pop     eax
6464 pathoswith 215
        add     eax, '0'
2288 clevermous 216
        stosb
6464 pathoswith 217
        test    eax, eax
2288 clevermous 218
        jnz     @b
6464 pathoswith 219
        pop     edi edx eax
220
        add     edi, 264
221
        jmp     .maindir_loop
222
 
223
.uni:
224
        pop     eax
225
        add     eax, '0'
226
        stosw
227
        test    eax, eax
228
        jnz     .uni
229
        pop     edi edx eax
2288 clevermous 230
        add     edi, 520
231
        jmp     .maindir_loop
6464 pathoswith 232
 
2288 clevermous 233
.maindir_done:
6464 pathoswith 234
        pop     eax eax
2288 clevermous 235
        mov     ebx, [edx+4]
236
        xor     eax, eax
237
        dec     ebp
238
        js      @f
239
        mov     al, ERROR_END_OF_FILE
240
@@:
241
        mov     [image_of_eax], eax
242
        mov     [image_of_ebx], ebx
243
        ret
6464 pathoswith 244
 
2288 clevermous 245
.access_denied:
6464 pathoswith 246
        mov     dword[image_of_eax], ERROR_ACCESS_DENIED
2288 clevermous 247
        ret
248
 
6464 pathoswith 249
.rootdir:   ; / - virtual root folder
250
        cmp     dword[ebx], 1   ; read folder?
251
        jnz     .access_denied
252
        mov     ebp, [ebx+12]   ; number of blocks
253
        mov     edx, [ebx+16]   ; return area
254
        push    dword[ebx+4]    ; first block
2288 clevermous 255
        mov     ebx, [ebx+8]    ; flags
6464 pathoswith 256
        mov     ecx, 32/4
257
        mov     edi, edx
2288 clevermous 258
        xor     eax, eax
259
        rep stosd
260
        mov     byte [edx], 1   ; version
4277 clevermous 261
        sub     esp, 16
6464 pathoswith 262
.rootdir_loop:
4277 clevermous 263
        push    edi
264
        lea     edi, [esp+4]
265
        call    dyndisk_enum_root
266
        pop     edi
267
        test    eax, eax
6464 pathoswith 268
        jz      .rootdirCD
269
        inc     dword[edx+8]
270
        dec     dword[esp+16]
271
        jns     .rootdir_loop
4277 clevermous 272
        dec     ebp
6464 pathoswith 273
        js      .rootdir_loop
274
        inc     dword[edx+4]
275
        mov     dword[edi], 16      ; attributes: folder
276
        mov     dword[edi+4], ebx   ; name encoding
4277 clevermous 277
        push    eax
6464 pathoswith 278
        mov     ecx, 32/4
279
        add     edi, 8
4277 clevermous 280
        xor     eax, eax
281
        rep stosd
6468 pathoswith 282
        push    edi
283
        lea     esi, [esp+8]
6464 pathoswith 284
        cmp     ebx, 1
285
        jz      .uni2
4277 clevermous 286
@@:
287
        lodsb
288
        stosb
6464 pathoswith 289
        test    eax, eax
4277 clevermous 290
        jnz     @b
6468 pathoswith 291
        pop     edi eax
6464 pathoswith 292
        add     edi, 264
293
        jmp     .rootdir_loop
294
 
295
.uni2:
296
        lodsb
297
        stosw
298
        test    eax, eax
299
        jnz     .uni2
6468 pathoswith 300
        pop     edi eax
4277 clevermous 301
        add     edi, 520
6464 pathoswith 302
        jmp     .rootdir_loop
303
 
304
.rootdirCD:
4277 clevermous 305
        add     esp, 16
6464 pathoswith 306
        or      esi, -1
307
.rootdirCD_loop:
308
        inc     esi
309
        cmp     esi, 10
310
        jnc     .rootdir_done
311
        mov     eax, esi
312
        not     eax
313
        and     eax, 3
314
        shl     eax, 1
315
        inc     eax
316
        mov     ecx, esi
317
        shr     ecx, 2
318
        bt      [ecx*5+DRIVE_DATA+1], ax
319
        jnc     .rootdirCD_loop
320
        inc     dword[edx+8]
321
        dec     dword[esp]
322
        jns     .rootdirCD_loop
2288 clevermous 323
        dec     ebp
6464 pathoswith 324
        js      .rootdirCD_loop
325
        inc     dword[edx+4]
326
        mov     dword[edi], 16      ; attributes: folder
327
        mov     dword[edi+4], ebx   ; name encoding
328
        mov     ecx, 32/4
2288 clevermous 329
        add     edi, 8
6464 pathoswith 330
        xor     eax, eax
2288 clevermous 331
        rep stosd
6464 pathoswith 332
        mov     eax, esi
333
        add     eax, '0'
334
        cmp     ebx, 1
335
        jz      @f
336
        mov     word [edi], 'cd'
337
        mov     [edi+2], ax
338
        add     edi, 264
339
        jmp     .rootdirCD_loop
340
 
2288 clevermous 341
@@:
6464 pathoswith 342
        mov     dword[edi], 640063h
343
        mov     [edi+4], eax
2288 clevermous 344
        add     edi, 520
6464 pathoswith 345
        jmp     .rootdirCD_loop
346
 
347
.rootdir_done:
2288 clevermous 348
        pop     eax
349
        mov     ebx, [edx+4]
350
        xor     eax, eax
351
        dec     ebp
352
        js      @f
353
        mov     al, ERROR_END_OF_FILE
354
@@:
355
        mov     [image_of_eax], eax
356
        mov     [image_of_ebx], ebx
357
        ret
358
 
4700 mario79 359
;-----------------------------------------------------------------------------
2288 clevermous 360
process_replace_file_name:
6464 pathoswith 361
; in: [esi] = virtual path
362
; out: [esi]+[ebp] = physical path
3689 mario79 363
        xor     edi, edi
6471 pathoswith 364
        xor     ebp, ebp
2288 clevermous 365
.loop:
3711 clevermous 366
        cmp     edi, [full_file_name_table.size]
3689 mario79 367
        jae     .notfound
2288 clevermous 368
        push    esi edi
6464 pathoswith 369
        shl     edi, 7
6471 pathoswith 370
        add     edi, [full_file_name_table]
2288 clevermous 371
@@:
6464 pathoswith 372
        cmp     byte [edi], 0
2288 clevermous 373
        jz      .dest_done
374
        lodsb
375
        test    al, al
376
        jz      .cont
6464 pathoswith 377
        or      al, 20h
2288 clevermous 378
        scasb
379
        jz      @b
6464 pathoswith 380
.cont:
381
        pop     edi esi
382
        inc     edi
383
        jmp     .loop
384
 
2288 clevermous 385
.dest_done:
386
        cmp     byte [esi], 0
387
        jz      .found
388
        cmp     byte [esi], '/'
389
        jnz     .cont
390
.found:
391
        pop     edi eax
6464 pathoswith 392
        shl     edi, 7
6471 pathoswith 393
        add     edi, [full_file_name_table]
2288 clevermous 394
        mov     ebp, esi
395
        lea     esi, [edi+64]
396
.notfound:
397
        ret
6464 pathoswith 398
 
3689 mario79 399
;-----------------------------------------------------------------------------
3663 mario79 400
uglobal
6471 pathoswith 401
addDirSeal db  ?
3663 mario79 402
endg
6338 serge 403
 
6464 pathoswith 404
sys_current_directory:  ; sysfunction 30
2288 clevermous 405
        mov     eax, [current_slot]
406
        mov     edi, [eax+APPDATA.cur_dir]
407
        dec     ebx
408
        jz      .set
409
        dec     ebx
410
        jz      .get
3663 mario79 411
        dec     ebx
412
        jz      .mount_additional_directory
6471 pathoswith 413
        dec     ebx
414
        jz      .get16
415
@@:
2288 clevermous 416
        ret
3663 mario79 417
 
418
.mount_additional_directory:
6464 pathoswith 419
; in: ecx -> dir name+dir path (128)
6471 pathoswith 420
        mov     al, 1
421
        xchg    [addDirSeal], al
422
        test    al, al
423
        jnz     @b
3663 mario79 424
        mov     esi, ecx
425
        mov     edi, sysdir_name1
426
        mov     ecx, 63
6464 pathoswith 427
        rep movsb   ; copying fake directory name
3663 mario79 428
        inc     esi
429
        xor     eax, eax
6464 pathoswith 430
        stosb       ; terminator of name, in case if we get the inlet trash
6471 pathoswith 431
        mov     cl, 63
432
        cmp     word [esi], 2
433
        jz      .utf16
434
        call    cp866toUTF8_string
435
@@:
436
        mov     byte [edi], 0
3663 mario79 437
        mov     [full_file_name_table.size], 2
438
        ret
6338 serge 439
 
6471 pathoswith 440
.utf16:
441
        add     esi, 2
442
        call    UTF16to8_string
443
        jmp     @b
444
 
6464 pathoswith 445
.get:       ; in: ecx -> buffer, edx = length
6471 pathoswith 446
        mov     esi, edi
447
        mov     edi, ecx
448
        cmp     edx, maxPathLength
449
        jc      @f
450
        mov     edx, maxPathLength
2288 clevermous 451
@@:
6464 pathoswith 452
        mov     al, '/'
2288 clevermous 453
        stosb
454
        mov     ecx, edx
6471 pathoswith 455
        dec     ecx
456
@@:
457
        dec     ecx
458
        js      @f
459
        call    utf8to16
460
        call    uni2ansi_char
461
        stosb
462
        test    al, al
463
        jnz     @b
464
        sub     edx, ecx
465
        mov     ecx, edx
466
@@:
467
        mov     [esp+32], ecx
2288 clevermous 468
        ret
469
 
6471 pathoswith 470
.get16:
471
        mov     esi, edi
472
        mov     edi, ecx
473
        cmp     edx, maxPathLength
474
        jc      @f
475
        mov     edx, maxPathLength
476
@@:
477
        shr     edx, 1
478
        mov     ax, '/'
479
        stosw
480
        mov     ecx, edx
481
        dec     ecx
482
@@:
483
        dec     ecx
484
        js      @f
485
        call    utf8to16
486
        stosw
487
        test    ax, ax
488
        jnz     @b
489
        sub     edx, ecx
490
        mov     ecx, edx
491
@@:
492
        mov     [esp+32], ecx
2288 clevermous 493
        ret
6464 pathoswith 494
 
2288 clevermous 495
.set:
6464 pathoswith 496
        pop     eax
6468 pathoswith 497
        push    maxPathLength
6464 pathoswith 498
        push    edi
499
        push    eax
2288 clevermous 500
        mov     ebx, ecx
501
get_full_file_name:
6464 pathoswith 502
; in: ebx -> file name, [esp+4] -> destination, [esp+8] = max length
6502 pathoswith 503
; out: UTF-8 string, eax=0 -> out of length
6471 pathoswith 504
        push    ebp ebx
6502 pathoswith 505
        cmp     byte [ebx], 0
506
        jz      .set_relative
6471 pathoswith 507
        mov     esi, ebx
6502 pathoswith 508
        cmp     byte [ebx], 4
509
        jnc     @f
6471 pathoswith 510
        inc     esi
511
@@:
512
        cmp     byte [esi], '/'
6468 pathoswith 513
        jnz     .set_relative
6471 pathoswith 514
        inc     esi
515
        cmp     byte [ebx], 2
516
        jnz     @f
517
        inc     esi
518
@@:
6468 pathoswith 519
        call    process_replace_file_name
6471 pathoswith 520
        mov     edi, [esp+12]
521
        mov     ecx, [esp+16]
6502 pathoswith 522
        mov     al, 3
523
        mov     ah, '/'
524
        stosw
525
        sub     ecx, 2
6471 pathoswith 526
        test    ebp, ebp
527
        jz      .absolute
528
@@:
6468 pathoswith 529
        lodsb
530
        stosb
6471 pathoswith 531
        dec     ecx
6468 pathoswith 532
        test    al, al
6471 pathoswith 533
        jnz     @b
534
        mov     esi, ebp
6468 pathoswith 535
        dec     edi
6471 pathoswith 536
.absolute:
537
        cmp     byte [ebx], 2
6502 pathoswith 538
        jz      .utf16
539
        cmp     byte [ebx], 3
540
        jz      .utf8
6471 pathoswith 541
        call    cp866toUTF8_string
542
        jns     .ret
543
        jmp     .fail
544
 
6502 pathoswith 545
.utf8:
546
        dec     ecx
547
        js      .fail
548
        lodsb
549
        stosb
550
        test    al, al
551
        jz      .ret
552
        jmp     .utf8
553
 
554
.utf16:
6471 pathoswith 555
        call    UTF16to8_string
556
        jns     .ret
6468 pathoswith 557
.fail:
558
        mov     byte [edi], 0
559
        xor     eax, eax
6471 pathoswith 560
        pop     ebx ebp
6468 pathoswith 561
        ret     8
562
 
563
.set_relative:
564
        mov     edi, [current_slot]
565
        mov     edi, [edi+APPDATA.cur_dir]
566
        mov     edx, edi
6471 pathoswith 567
        mov     ecx, [esp+16]
6468 pathoswith 568
        xor     eax, eax
569
        repnz scasb
570
        mov     esi, edi
571
        dec     esi
6471 pathoswith 572
        mov     edi, [esp+12]
6468 pathoswith 573
        jecxz   .fail
6502 pathoswith 574
        cmp     byte [ebx], 0
575
        jz      .set_ok
576
        cmp     byte [ebx], 4
577
        jnc     .relative
578
        inc     ebx
579
        cmp     byte [ebx-1], 2
6471 pathoswith 580
        jz      .relative16
2288 clevermous 581
.relative:
582
        cmp     byte [ebx], 0
583
        jz      .set_ok
584
        cmp     word [ebx], '.'
585
        jz      .set_ok
586
        cmp     word [ebx], './'
6471 pathoswith 587
        jz      .next
2288 clevermous 588
        cmp     word [ebx], '..'
589
        jnz     .doset_relative
590
        cmp     byte [ebx+2], 0
591
        jz      @f
592
        cmp     byte [ebx+2], '/'
593
        jnz     .doset_relative
6471 pathoswith 594
        inc     ebx
2288 clevermous 595
@@:
596
        dec     esi
597
        cmp     byte [esi], '/'
598
        jnz     @b
6471 pathoswith 599
.next:
600
        add     ebx, 2
2288 clevermous 601
        jmp     .relative
6464 pathoswith 602
 
2288 clevermous 603
.set_ok:
6471 pathoswith 604
        cmp     edx, edi    ; is destination equal to cur_dir?
6468 pathoswith 605
        jz      @f
2288 clevermous 606
        mov     ecx, esi
6468 pathoswith 607
        sub     ecx, edx
2288 clevermous 608
        mov     esi, edx
609
        rep movsb
610
        mov     byte [edi], 0
6471 pathoswith 611
.ret:
6464 pathoswith 612
        mov     al, 1
6471 pathoswith 613
        pop     ebx ebp
2288 clevermous 614
        ret     8
6464 pathoswith 615
 
6468 pathoswith 616
@@:
2288 clevermous 617
        mov     byte [esi], 0
6471 pathoswith 618
        jmp     .ret
6464 pathoswith 619
 
2288 clevermous 620
.doset_relative:
6471 pathoswith 621
        cmp     edx, edi    ; is destination equal to cur_dir?
622
        mov     edi, esi
623
        jz      @f
624
        mov     edi, [esp+12]
2288 clevermous 625
        mov     ecx, esi
6468 pathoswith 626
        sub     ecx, edx
2288 clevermous 627
        mov     esi, edx
628
        mov     edx, edi
629
        rep movsb
6471 pathoswith 630
@@:
2288 clevermous 631
        mov     byte [edi], '/'
632
        inc     edi
6471 pathoswith 633
        mov     esi, ebx
634
        mov     ecx, edx
635
        add     ecx, [esp+16]
636
        sub     ecx, edi
637
        mov     ebx, [esp]
638
        jmp     .absolute
639
 
640
.relative16:
641
        cmp     word [ebx], 0
642
        jz      .set_ok
643
        cmp     word [ebx], '.'
644
        jnz     .doset_relative
645
        cmp     word [ebx+2], 0
646
        jz      .set_ok
647
        cmp     word [ebx+2], '/'
648
        jz      .next16
649
        cmp     word [ebx+2], '.'
650
        jnz     .doset_relative
651
        cmp     word [ebx+4], 0
652
        jz      @f
653
        cmp     word [ebx+4], '/'
654
        jnz     .doset_relative
655
        add     ebx, 2
2288 clevermous 656
@@:
6471 pathoswith 657
        dec     esi
658
        cmp     byte [esi], '/'
659
        jnz     @b
660
.next16:
661
        add     ebx, 4
662
        jmp     .relative16
6464 pathoswith 663
 
6462 pathoswith 664
include "parse_fn.inc"
665
include "fs_common.inc"
666
include "iso9660.inc"   ; read for CD filesystem
667
include "fat.inc"
668
include "ntfs.inc"
669
include "ext.inc"
6503 pathoswith 670
; include "xfs.asm"
671
 
672
xfs_create_partition:
673
        xor     eax, eax
674
        ret