ftpd: Add mkd command #342

Open
igorsh wants to merge 4 commits from igorsh/kolibrios:ftpd-add-mkd-command into main
Contributor

Added MKD command

Added MKD command
igorsh added 1 commit 2026-02-23 14:13:33 +00:00
ftpd: Add mkd command
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m17s
Build system / Build (pull_request) Successful in 10m27s
ef5b97d0ca
mxlgv requested changes 2026-02-23 21:40:32 +00:00
Dismissed
@@ -334,2 +334,4 @@
ret
align 4
console_fs_error:
Owner

Don't forget the server in floppy disk image. I think here you can write more optimally, for example, get a line with an error by index.

Don't forget the server in floppy disk image. I think here you can write more optimally, for example, get a line with an error by index.
mxlgv marked this conversation as resolved
@@ -1251,0 +1322,4 @@
mov byte [edi], 0x00
call create_path
dec edi
Owner

Bad ident

Bad ident
mxlgv marked this conversation as resolved
mxlgv added the Category/ApplicationsFASM
Kind
Feature
Priority
Low
PR
Request changes
labels 2026-02-23 22:16:44 +00:00
igorsh added 2 commits 2026-02-24 17:30:27 +00:00
ftpd: Add function to access filesystem errors by index
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m17s
Build system / Build (pull_request) Successful in 10m0s
2893749afb
mxlgv requested changes 2026-02-25 18:16:13 +00:00
Dismissed
@@ -336,0 +337,4 @@
fs_err_table:
dd str_fs_error2 ; 2
dd str_fs_error3 ; 3
dd str_fs_error5 ; 5
Owner

I suggest using 4 as str_fs_error

I suggest using 4 as str_fs_error
@@ -336,0 +346,4 @@
dd str_fs_error11 ; 11
dd str_fs_error12 ; 12
console_fs_error:
Owner

I think you can shorten it something like this

console_fs_error:
        mov edx, 4 ;  Unknown filesystem error
       
        cmp     eax, 2
        jb      .print_err
        cmp     eax, 12
        ja       .print_err
       
        mov edx, eax
        
.print_err:
        sub     edx, 2
        mov     edx, [fs_err_table + edx*4]
        invoke  con_write_asciiz, edx
        ret
I think you can shorten it something like this ```asm console_fs_error: mov edx, 4 ; Unknown filesystem error cmp eax, 2 jb .print_err cmp eax, 12 ja .print_err mov edx, eax .print_err: sub edx, 2 mov edx, [fs_err_table + edx*4] invoke con_write_asciiz, edx ret ```
mxlgv requested changes 2026-02-25 18:29:38 +00:00
Dismissed
@@ -1251,0 +1323,4 @@
; called fs function
push ebx
dec esp
mov byte[esp], 0
Owner

May be xor eax, eax and push eax? I also don’t understand why there is mov and push here. push is smaller in size

May be `xor eax, eax` and `push eax`? I also don’t understand why there is `mov` and `push` here. `push` is smaller in size
Author
Contributor

Эта часть скопирована с cmdDELE. Если не добавить 1 байт в стек - получаю Page Fault.

Эта часть скопирована с **cmdDELE**. Если не добавить 1 байт в стек - получаю Page Fault.
mxlgv marked this conversation as resolved
mxlgv requested changes 2026-03-02 17:41:28 +00:00
Dismissed
@@ -1251,0 +1331,4 @@
push dword SSF_CREATE_FOLDER
mov ebx, esp
mcall SF_FILE
add esp, 6*4 + 1
Owner
I guess the problem (https://git.kolibrios.org/KolibriOS/kolibrios/pulls/342/files#issuecomment-4485) is here
Author
Contributor

No, at that line - mcall SF_FILE

No, at that line - `mcall SF_FILE`
Owner

You are right. I read SF 70 and understood why there is one byte.
But I would still recommend storing 0 in the register and then doing a push and mov.

You are right. I read SF 70 and understood why there is one byte. But I would still recommend storing 0 in the register and then doing a `push` and `mov`.
Author
Contributor

But I would still recommend storing 0 in the register and then doing a push and mov.

Немного не пойму что ты предлагаешь:
push ebx
xor eax, eax
push eax
add esp, 3

вместо
push ebx
dec esp
mov byte[esp], 0
?

> But I would still recommend storing 0 in the register and then doing a push and mov. Немного не пойму что ты предлагаешь: `push ebx` `xor eax, eax` `push eax` `add esp, 3` вместо `push ebx` `dec esp` `mov byte[esp], 0` ?
Owner

I suggest leaving it as is. I'm already confused myself.

I suggest leaving it as is. I'm already confused myself.
mxlgv marked this conversation as resolved
igorsh added 1 commit 2026-03-03 19:04:27 +00:00
ftpd: Simplify console_fs_error logic
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 26s
Build system / Build (pull_request) Successful in 10m19s
e72e908c1a
mxlgv approved these changes 2026-03-07 20:48:54 +00:00
mxlgv removed the
PR
Request changes
label 2026-03-07 20:49:08 +00:00
mxlgv requested review from Burer 2026-03-07 20:49:14 +00:00
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 26s
Required
Details
Build system / Build (pull_request) Successful in 10m19s
Required
Details
This pull request has changes conflicting with the target branch.
  • programs/network/ftpd/commands.inc
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u ftpd-add-mkd-command:igorsh-ftpd-add-mkd-command
git checkout igorsh-ftpd-add-mkd-command
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#342