From e2ced932dbd34384f1e3752cc073b2fb66467b46 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Jun 2001 22:32:24 +0000 Subject: Ensured all the system calls in msdfs.c go through the vfs layer. Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy. (This used to be commit c24e6b41ea60ab4bac2fcd19da947851d6df3c7c) --- source3/lib/system.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index 810096ef36..a402af77c9 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -264,6 +264,34 @@ char *sys_getwd(char *s) return wd; } +/******************************************************************* +system wrapper for symlink +********************************************************************/ + +int sys_symlink(const char *oldpath, const char *newpath) +{ +#ifndef HAVE_SYMLINK + errno = ENOSYS; + return -1; +#else + return symlink(oldpath, newpath); +#endif +} + +/******************************************************************* +system wrapper for readlink +********************************************************************/ + +int sys_readlink(const char *path, char *buf, size_t bufsiz) +{ +#ifndef HAVE_READLINK + errno = ENOSYS; + return -1; +#else + return readlink(path, buf, bufsiz); +#endif +} + /******************************************************************* chown isn't used much but OS/2 doesn't have it ********************************************************************/ -- cgit