hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 27ed4332c7ed9d2559c6a8ba70e6f8c15fbea312
parent 2a8ef053ee6842eea0dd20668ca6b5ebebfeaa05
Author: Lorenz (xha) <me@xha.li>
Date:   Sun, 10 Dec 2023 06:24:55 +0100

os fs.ha: s/errors::errno/fs_to_errno/

breaking change; might change the return value of some errors

Signed-off-by: Lorenz (xha) <me@xha.li>

Diffstat:
Mos/+freebsd/fs.ha | 6+++---
Mos/+linux/fs.ha | 12++++++------
Mos/+openbsd/fs.ha | 6+++---
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/os/+freebsd/fs.ha b/os/+freebsd/fs.ha @@ -25,7 +25,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { let fs = fs: *os_filesystem; match (rt::fchdir(fs.dirfd)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => return; }; @@ -34,7 +34,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { }; match (rt::chdir(path)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -46,7 +46,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { export fn chroot(target: str) (void | fs::error) = { match (rt::chroot(target)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; diff --git a/os/+linux/fs.ha b/os/+linux/fs.ha @@ -25,7 +25,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { let fs = fs: *os_filesystem; match (rt::fchdir(fs.dirfd)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => return; }; @@ -34,7 +34,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { }; match (rt::chdir(path)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -46,7 +46,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { export fn chroot(target: str) (void | fs::error) = { match (rt::chroot(target)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -56,7 +56,7 @@ export fn mkfifo(path: str, mode: fs::mode) (void | fs::error) = { match (rt::mknodat(rt::AT_FDCWD, path, mode: rt::mode_t | rt::S_IFIFO, 0)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -73,7 +73,7 @@ export fn mkblk( mode: rt::mode_t | rt::S_IFBLK, rt::mkdev(major: u32, minor: u32))) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -89,7 +89,7 @@ export fn mkchr( match (rt::mknodat(rt::AT_FDCWD, path, mode: rt::mode_t | rt::S_IFCHR, rt::mkdev(major: u32, minor: u32))) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; diff --git a/os/+openbsd/fs.ha b/os/+openbsd/fs.ha @@ -26,7 +26,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { let fs = fs: *os_filesystem; match (rt::fchdir(fs.dirfd)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => return; }; @@ -35,7 +35,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { }; match (rt::chdir(path)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; }; @@ -47,7 +47,7 @@ export fn chdir(target: (*fs::fs | str)) (void | fs::error) = { export fn chroot(target: str) (void | fs::error) = { match (rt::chroot(target)) { case let err: rt::errno => - return errors::errno(err); + return errno_to_fs(err); case void => void; }; };