summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_recycle.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-05-14 10:59:01 +0000
committerAlexander Bokovoy <ab@samba.org>2003-05-14 10:59:01 +0000
commitbc2a3748e9caa8f60f7c2387e7eecd7fb3fae899 (patch)
treea687d4517c20de0efbb94721f8301628f3a529a6 /source3/modules/vfs_recycle.c
parentdf641bc7caceab142372a279a2844df187c86597 (diff)
downloadsamba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.tar.gz
samba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.tar.bz2
samba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.zip
Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
(This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
Diffstat (limited to 'source3/modules/vfs_recycle.c')
-rw-r--r--source3/modules/vfs_recycle.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index 03e2c5eabc..45c661edb7 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -39,13 +39,13 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
static vfs_op_tuple recycle_ops[] = {
/* Disk operations */
- {VFS_OP(recycle_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {VFS_OP(recycle_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(recycle_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(recycle_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT},
/* File operations */
- {VFS_OP(recycle_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(recycle_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
- {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+ {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
static int recycle_connect(vfs_handle_struct *handle, connection_struct *conn, const char *service, const char *user)
@@ -53,7 +53,7 @@ static int recycle_connect(vfs_handle_struct *handle, connection_struct *conn, c
DEBUG(10,("recycle_connect() connect to service[%s] as user[%s].\n",
service,user));
- return VFS_NEXT_CONNECT(handle, conn, service, user);
+ return SMB_VFS_NEXT_CONNECT(handle, conn, service, user);
}
static void recycle_disconnect(vfs_handle_struct *handle, connection_struct *conn)
@@ -61,7 +61,7 @@ static void recycle_disconnect(vfs_handle_struct *handle, connection_struct *con
DEBUG(10,("recycle_disconnect() connect to service[%s].\n",
lp_servicename(SNUM(conn))));
- VFS_NEXT_DISCONNECT(handle, conn);
+ SMB_VFS_NEXT_DISCONNECT(handle, conn);
}
static const char *recycle_repository(vfs_handle_struct *handle)
@@ -157,7 +157,7 @@ static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname
{
SMB_STRUCT_STAT st;
- if (VFS_NEXT_STAT(handle, handle->conn, dname, &st) == 0) {
+ if (SMB_VFS_NEXT_STAT(handle, handle->conn, dname, &st) == 0) {
if (S_ISDIR(st.st_mode)) {
return True;
}
@@ -170,7 +170,7 @@ static BOOL recycle_file_exist(vfs_handle_struct *handle, const char *fname)
{
SMB_STRUCT_STAT st;
- if (VFS_NEXT_STAT(handle, handle->conn, fname, &st) == 0) {
+ if (SMB_VFS_NEXT_STAT(handle, handle->conn, fname, &st) == 0) {
if (S_ISREG(st.st_mode)) {
return True;
}
@@ -189,7 +189,7 @@ static SMB_OFF_T recycle_get_file_size(vfs_handle_struct *handle, const char *fn
{
SMB_STRUCT_STAT st;
- if (VFS_NEXT_STAT(handle, handle->conn, fname, &st) != 0) {
+ if (SMB_VFS_NEXT_STAT(handle, handle->conn, fname, &st) != 0) {
DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno)));
return (SMB_OFF_T)0;
}
@@ -231,7 +231,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname)
DEBUG(10, ("recycle: dir %s already exists\n", new_dir));
else {
DEBUG(5, ("recycle: creating new dir %s\n", new_dir));
- if (VFS_NEXT_MKDIR(handle, handle->conn, new_dir, mode) != 0) {
+ if (SMB_VFS_NEXT_MKDIR(handle, handle->conn, new_dir, mode) != 0) {
DEBUG(1,("recycle: mkdir failed for %s with error: %s\n", new_dir, strerror(errno)));
ret = False;
goto done;
@@ -304,7 +304,7 @@ static void recycle_do_touch(vfs_handle_struct *handle, const char *fname)
struct utimbuf tb;
time_t currtime;
- if (VFS_NEXT_STAT(handle, handle->conn, fname, &st) != 0) {
+ if (SMB_VFS_NEXT_STAT(handle, handle->conn, fname, &st) != 0) {
DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno)));
return;
}
@@ -312,7 +312,7 @@ static void recycle_do_touch(vfs_handle_struct *handle, const char *fname)
tb.actime = currtime;
tb.modtime = st.st_mtime;
- if (VFS_NEXT_UTIME(handle, handle->conn, fname, &tb) == -1 ) {
+ if (SMB_VFS_NEXT_UTIME(handle, handle->conn, fname, &tb) == -1 ) {
DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(errno)));
}
}
@@ -340,14 +340,14 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
if(!repository || *(repository) == '\0') {
DEBUG(3, ("recycle: repository path not set, purging %s...\n", file_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
/* we don't recycle the recycle bin... */
if (strncmp(file_name, repository, strlen(repository)) == 0) {
DEBUG(3, ("recycle: File is within recycling bin, unlinking ...\n"));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
@@ -357,7 +357,7 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
*
if(fsize == 0) {
DEBUG(3, ("recycle: File %s is empty, purging...\n", file_name));
- rc = VFS_NEXT_UNLINK(handle,conn,file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle,conn,file_name);
goto done;
}
*/
@@ -369,18 +369,18 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
maxsize = recycle_maxsize(handle);
if(maxsize > 0 && file_size > maxsize) {
DEBUG(3, ("recycle: File %s exceeds maximum recycle size, purging... \n", file_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
/* FIXME: this is wrong: moving files with rename does not change the disk space
* allocation
*
- space_avail = VFS_NEXT_DISK_FREE(handle, conn, ".", True, &bsize, &dfree, &dsize) * 1024L;
+ space_avail = SMB_VFS_NEXT_DISK_FREE(handle, conn, ".", True, &bsize, &dfree, &dsize) * 1024L;
DEBUG(5, ("space_avail = %Lu, file_size = %Lu\n", space_avail, file_size));
if(space_avail < file_size) {
DEBUG(3, ("recycle: Not enough diskspace, purging file %s\n", file_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
*/
@@ -405,7 +405,7 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
if (matchparam(recycle_exclude(handle), base)) {
DEBUG(3, ("recycle: file %s is excluded \n", base));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
@@ -415,7 +415,7 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
*/
if (checkparam(recycle_exclude_dir(handle), path_name)) {
DEBUG(3, ("recycle: directory %s is excluded \n", path_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
@@ -433,7 +433,7 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
DEBUG(10, ("recycle: Creating directory %s\n", temp_name));
if (recycle_create_dir(handle, temp_name) == False) {
DEBUG(3, ("recycle: Could not create directory, purging %s...\n", file_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}
}
@@ -446,7 +446,7 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
if (recycle_file_exist(handle, final_name)) {
if (recycle_versions(handle) == False || matchparam(recycle_noversions(handle), base) == True) {
DEBUG(3, ("recycle: Removing old file %s from recycle bin\n", final_name));
- if (VFS_NEXT_UNLINK(handle, conn, final_name) != 0) {
+ if (SMB_VFS_NEXT_UNLINK(handle, conn, final_name) != 0) {
DEBUG(1, ("recycle: Error deleting old file: %s\n", strerror(errno)));
}
}
@@ -459,10 +459,10 @@ static int recycle_unlink(vfs_handle_struct *handle, connection_struct *conn, co
}
DEBUG(10, ("recycle: Moving %s to %s\n", file_name, final_name));
- rc = VFS_NEXT_RENAME(handle, conn, file_name, final_name);
+ rc = SMB_VFS_NEXT_RENAME(handle, conn, file_name, final_name);
if (rc != 0) {
DEBUG(3, ("recycle: Move error %d (%s), purging file %s (%s)\n", errno, strerror(errno), file_name, final_name));
- rc = VFS_NEXT_UNLINK(handle, conn, file_name);
+ rc = SMB_VFS_NEXT_UNLINK(handle, conn, file_name);
goto done;
}