summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-09-02 23:03:01 +0000
committermidipix <writeonce@midipix.org>2019-09-02 23:03:01 +0000
commit1509ed4180fa4f8808a918bd7ce8a74c1d94a91b (patch)
treeb36d0bf2900f9a4c19a33af9ce5987ef44416c40
parentb85b1f5d35413312c08e7670dd4db67b7e088d91 (diff)
downloadmmglue-1509ed4180fa4f8808a918bd7ce8a74c1d94a91b.tar.bz2
mmglue-1509ed4180fa4f8808a918bd7ce8a74c1d94a91b.tar.xz
glue layer: __fs_{r|a|n|d}path() interfaces: use errno to indicate the error.
-rw-r--r--include/sys/fs.h6
-rw-r--r--src/arch/nt32/fs.c8
-rw-r--r--src/arch/nt64/fs.c8
3 files changed, 10 insertions, 12 deletions
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);
}