From 18556274139cc5a00593471bd745354d98a35303 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Sep 1998 20:11:54 +0000 Subject: More abstraction of file system data types, to move to a 64 bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb) --- source3/lib/system.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index d569b80a74..d3612f8b25 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -141,36 +141,36 @@ int sys_select(int maxfd, fd_set *fds,struct timeval *tval) /******************************************************************* -just a unlink wrapper +just a unlink wrapper that calls dos_to_unix. ********************************************************************/ -int sys_unlink(char *fname) +int dos_unlink(char *fname) { return(unlink(dos_to_unix(fname,False))); } /******************************************************************* -a simple open() wrapper +a simple open() wrapper that calls dos_to_unix. ********************************************************************/ -int sys_open(char *fname,int flags,int mode) +int dos_open(char *fname,int flags,int mode) { return(open(dos_to_unix(fname,False),flags,mode)); } /******************************************************************* -a simple opendir() wrapper +a simple opendir() wrapper that calls dos_to_unix ********************************************************************/ -DIR *sys_opendir(char *dname) +DIR *dos_opendir(char *dname) { return(opendir(dos_to_unix(dname,False))); } /******************************************************************* -and a stat() wrapper +and a stat() wrapper that calls dos_to_unix. ********************************************************************/ -int sys_stat(char *fname,struct stat *sbuf) +int dos_stat(char *fname,SMB_STRUCT_STAT *sbuf) { return(stat(dos_to_unix(fname,False),sbuf)); } @@ -188,45 +188,45 @@ int sys_waitpid(pid_t pid,int *status,int options) } /******************************************************************* -don't forget lstat() +don't forget lstat() that calls dos_to_unix. ********************************************************************/ -int sys_lstat(char *fname,struct stat *sbuf) +int dos_lstat(char *fname,struct stat *sbuf) { return(lstat(dos_to_unix(fname,False),sbuf)); } /******************************************************************* -mkdir() gets a wrapper +mkdir() gets a wrapper that calls dos_to_unix. ********************************************************************/ -int sys_mkdir(char *dname,int mode) +int dos_mkdir(char *dname,int mode) { return(mkdir(dos_to_unix(dname,False),mode)); } /******************************************************************* -do does rmdir() +do does rmdir() - call dos_to_unix ********************************************************************/ -int sys_rmdir(char *dname) +int dos_rmdir(char *dname) { return(rmdir(dos_to_unix(dname,False))); } /******************************************************************* -I almost forgot chdir() +I almost forgot chdir() - call dos_to_unix. ********************************************************************/ -int sys_chdir(char *dname) +int dos_chdir(char *dname) { return(chdir(dos_to_unix(dname,False))); } /******************************************************************* -now for utime() +now for utime() - call dos_to_unix. ********************************************************************/ -int sys_utime(char *fname,struct utimbuf *times) +int dos_utime(char *fname,struct utimbuf *times) { /* if the modtime is 0 or -1 then ignore the call and return success */ @@ -344,9 +344,9 @@ static int copy_reg(char *source, const char *dest) } /******************************************************************* -for rename() +for rename() - call dos_to_unix. ********************************************************************/ -int sys_rename(char *from, char *to) +int dos_rename(char *from, char *to) { int rcode; pstring zfrom, zto; @@ -364,9 +364,9 @@ int sys_rename(char *from, char *to) } /******************************************************************* -for chmod +for chmod - call dos_to_unix. ********************************************************************/ -int sys_chmod(char *fname,int mode) +int dos_chmod(char *fname,int mode) { return(chmod(dos_to_unix(fname,False),mode)); } -- cgit