diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
commit | 18556274139cc5a00593471bd745354d98a35303 (patch) | |
tree | b10b897359416e4c67bcaff75a5f21eefe20c996 /source3/lib/system.c | |
parent | 6f53e2097d60d4b67f0859065cfa0fe01d63e28f (diff) | |
download | samba-18556274139cc5a00593471bd745354d98a35303.tar.gz samba-18556274139cc5a00593471bd745354d98a35303.tar.bz2 samba-18556274139cc5a00593471bd745354d98a35303.zip |
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)
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r-- | source3/lib/system.c | 44 |
1 files changed, 22 insertions, 22 deletions
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)); } |