From 1509ed4180fa4f8808a918bd7ce8a74c1d94a91b Mon Sep 17 00:00:00 2001 From: midipix Date: Sep 02 2019 23:03:01 +0000 Subject: glue layer: __fs_{r|a|n|d}path() interfaces: use errno to indicate the error. --- diff --git a/include/sys/fs.h b/include/sys/fs.h index f0dd33b..efc1466 100644 --- a/include/sys/fs.h +++ b/include/sys/fs.h @@ -29,10 +29,8 @@ extern "C" { /* buflen: size of buffer, including null termination. */ /* */ /* return value: */ -/* zero upon successful resolution and buffer initialization */ -/* negative value returned upon failure, which is the actual value */ -/* returned by the underlying system call; accordingly, errno */ -/* is _not_ set by any of the above interfaces. */ +/* zero upon successful resolution and buffer initialization; */ +/* otherwise, -1 shall be returned and errno set to indicate the error. */ /* */ /* implementation: */ /* the above interfaces are async-safe, thread-safe, and re-entrant. */ diff --git a/src/arch/nt32/fs.c b/src/arch/nt32/fs.c index b198777..7051b04 100644 --- a/src/arch/nt32/fs.c +++ b/src/arch/nt32/fs.c @@ -4,23 +4,23 @@ int __fs_rpath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_rpath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_rpath,fdat,path,options,buffer,buflen); } int __fs_apath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_apath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_apath,fdat,path,options,buffer,buflen); } int __fs_npath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_npath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_npath,fdat,path,options,buffer,buflen); } int __fs_dpath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_dpath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_dpath,fdat,path,options,buffer,buflen); } diff --git a/src/arch/nt64/fs.c b/src/arch/nt64/fs.c index b198777..7051b04 100644 --- a/src/arch/nt64/fs.c +++ b/src/arch/nt64/fs.c @@ -4,23 +4,23 @@ int __fs_rpath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_rpath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_rpath,fdat,path,options,buffer,buflen); } int __fs_apath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_apath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_apath,fdat,path,options,buffer,buflen); } int __fs_npath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_npath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_npath,fdat,path,options,buffer,buflen); } int __fs_dpath(int fdat, const char * path, int options, char * buffer, size_t buflen) { - return __syscall(SYS_fs_dpath,fdat,path,options,buffer,buflen); + return syscall(SYS_fs_dpath,fdat,path,options,buffer,buflen); }