Modify file error to match real cat

This commit is contained in:
2026-09-12 18:30:37 -04:00
parent 65ba2737af
commit 5a78522d8e
2 changed files with 38 additions and 30 deletions
+15 -15
View File
@@ -68,19 +68,19 @@ open_fd:
2:
ret
# Check if the given file exists without opening fd
# @param[in] a0: ptr to null-terminated file str.
# @param[out] a0: result code (0-exists 1-doesn't exist).
file_exists:
mv a1, a0
li a0, -100 # relative/absolute path
li a2, 0
li a7, 48
ecall
beqz a0, 1f
li a0, 1
ret
# # Check if the given file exists without opening fd
# # @param[in] a0: ptr to null-terminated file str.
# # @param[out] a0: result code (0-exists 1-doesn't exist).
# file_exists:
# mv a1, a0
# li a0, -100 # relative/absolute path
# li a2, 0
# li a7, 48
# ecall
# beqz a0, 1f
# li a0, 1
# ret
1:
li a0, 0
ret
# 1:
# li a0, 0
# ret