Modify file error to match real cat
This commit is contained in:
+15
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user