summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-02-03 05:10:09 +0000
committerTim Potter <tpot@samba.org>2000-02-03 05:10:09 +0000
commit3d9a9cbe966fbbfccfcce3204e4bdcb1a8ccdcf5 (patch)
tree0c21dc03dbf5102ae0c623b4a70bc82ca902d0fe /source3/lib
parent71604bb213d369d9ccf9d2d959a80b799d6c4f34 (diff)
downloadsamba-3d9a9cbe966fbbfccfcce3204e4bdcb1a8ccdcf5.tar.gz
samba-3d9a9cbe966fbbfccfcce3204e4bdcb1a8ccdcf5.tar.bz2
samba-3d9a9cbe966fbbfccfcce3204e4bdcb1a8ccdcf5.zip
Comments to use vfs_* functions instead of dos_* unless really
accessing files on local disk. (This used to be commit b55f63da7e6a3c306ce668c77ed63a41d33240db)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/doscalls.c16
-rw-r--r--source3/lib/util.c4
2 files changed, 16 insertions, 4 deletions
diff --git a/source3/lib/doscalls.c b/source3/lib/doscalls.c
index 4ce84cbca2..2bd68d3097 100644
--- a/source3/lib/doscalls.c
+++ b/source3/lib/doscalls.c
@@ -52,18 +52,23 @@ int dos_open(char *fname,int flags,mode_t mode)
}
/*******************************************************************
- Opendir() wrapper that calls dos_to_unix.
+ Opendir() wrapper that calls dos_to_unix. Should use the
+ vfs_ops->opendir() function instead.
********************************************************************/
+#if 0
DIR *dos_opendir(char *dname)
{
return(opendir(dos_to_unix(dname,False)));
}
+#endif
/*******************************************************************
- Readdirname() wrapper that calls unix_to_dos.
+ Readdirname() wrapper that calls unix_to_dos. Should use the
+ vfs_readdirname() function instead.
********************************************************************/
+#if 0
char *dos_readdirname(DIR *p)
{
char *dname = readdirname(p);
@@ -74,6 +79,7 @@ char *dos_readdirname(DIR *p)
unix_to_dos(dname, True);
return(dname);
}
+#endif
/*******************************************************************
A chown() wrapper that calls dos_to_unix.
@@ -106,6 +112,8 @@ int dos_lstat(char *fname,SMB_STRUCT_STAT *sbuf)
Mkdir() that calls dos_to_unix.
Cope with UNIXes that don't allow high order mode bits on mkdir.
Patch from gcarter@lanier.com.
+ Don't use this call unless you really want to access a file on
+ disk. Use the vfs_ops.mkdir() function instead.
********************************************************************/
int dos_mkdir(char *dname,mode_t mode)
@@ -289,13 +297,15 @@ char *dos_getwd(char *unix_path)
}
/*******************************************************************
- Check if a DOS file exists.
+ Check if a DOS file exists. Use vfs_file_exist function instead.
********************************************************************/
+#if 0
BOOL dos_file_exist(char *fname,SMB_STRUCT_STAT *sbuf)
{
return file_exist(dos_to_unix(fname, False), sbuf);
}
+#endif
/*******************************************************************
Check if a DOS directory exists.
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 0db12e92c6..71f440eae5 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -334,7 +334,7 @@ int name_mangle( char *In, char *Out, char name_type )
} /* name_mangle */
/*******************************************************************
- check if a file exists
+ check if a file exists - call vfs_file_exist for samba files
********************************************************************/
BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf)
{
@@ -1562,6 +1562,8 @@ set the length of a file from a filedescriptor.
Returns 0 on success, -1 on failure.
****************************************************************************/
+/* tpot vfs need to recode this function */
+
int set_filelen(int fd, SMB_OFF_T len)
{
/* According to W. R. Stevens advanced UNIX prog. Pure 4.3 BSD cannot