summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-05 05:23:29 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-05 05:23:29 +0000
commit012e575e1336fbba70174d32c26ecab9ce5523ce (patch)
treea9a5282e7d59433dec562e07abfd5b79f6f0cf32 /source3/locking
parente9ea36e4d2270bd7d32da12ef6d6e2299641582d (diff)
downloadsamba-012e575e1336fbba70174d32c26ecab9ce5523ce.tar.gz
samba-012e575e1336fbba70174d32c26ecab9ce5523ce.tar.bz2
samba-012e575e1336fbba70174d32c26ecab9ce5523ce.zip
ahh, the joy of deleting large chunks of code that someone else has
painstakingly put in :) This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around DEBUG() statements. We just use %.0f in all cases. Makes the code a bit easier to read :) (This used to be commit 41f0069afc02169932e04ff0039bb6328eaaf04d)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c10
-rw-r--r--source3/locking/shmem.c25
2 files changed, 0 insertions, 35 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index bd484a18b6..f088720e0a 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -109,13 +109,8 @@ BOOL do_lock(files_struct *fsp,connection_struct *conn,
return False;
}
-#ifdef LARGE_SMB_OFF_T
DEBUG(10,("do_lock: lock type %d start=%.0f len=%.0f requested for file %s\n",
lock_type, (double)offset, (double)count, fsp->fsp_name ));
-#else /* LARGE_SMB_OFF_T */
- DEBUG(10,("do_lock: lock type %d start=%d len=%d requested for file %s\n",
- lock_type, (int)offset, (int)count, fsp->fsp_name ));
-#endif /* LARGE_SMB_OFF_T */
if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn))
ok = fcntl_lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count,
@@ -141,13 +136,8 @@ BOOL do_unlock(files_struct *fsp,connection_struct *conn,
if (!lp_locking(SNUM(conn)))
return(True);
-#ifdef LARGE_SMB_OFF_T
DEBUG(10,("do_unlock: unlock start=%.0f len=%.0f requested for file %s\n",
(double)offset, (double)count, fsp->fsp_name ));
-#else
- DEBUG(10,("do_unlock: unlock start=%d len=%d requested for file %s\n",
- (int)offset, (int)count, fsp->fsp_name ));
-#endif
if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn))
ok = fcntl_lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count,F_UNLCK);
diff --git a/source3/locking/shmem.c b/source3/locking/shmem.c
index d8ef1d2c53..f1c985881b 100644
--- a/source3/locking/shmem.c
+++ b/source3/locking/shmem.c
@@ -339,13 +339,8 @@ static BOOL smb_shm_register_process(char *processreg_file, pid_t pid, BOOL *oth
else
{
/* erase old pid */
-#ifdef LARGE_SMB_OFF_T
DEBUG(5,("smb_shm_register_process : erasing stale record for pid %d (seek_back = %.0f)\n",
(int)other_pid, (double)seek_back));
-#else
- DEBUG(5,("smb_shm_register_process : erasing stale record for pid %d (seek_back = %d)\n",
- (int)other_pid, (int)seek_back));
-#endif
other_pid = (pid_t)0;
erased_slot = sys_lseek(smb_shm_processes_fd, seek_back, SEEK_CUR);
write(smb_shm_processes_fd, &other_pid, sizeof(other_pid));
@@ -367,13 +362,8 @@ static BOOL smb_shm_register_process(char *processreg_file, pid_t pid, BOOL *oth
if(free_slot < 0)
free_slot = sys_lseek(smb_shm_processes_fd, 0, SEEK_END);
-#ifdef LARGE_SMB_OFF_T
DEBUG(5,("smb_shm_register_process : writing record for pid %d at offset %.0f\n",
(int)pid, (double)free_slot));
-#else /* LARGE_SMB_OFF_T */
- DEBUG(5,("smb_shm_register_process : writing record for pid %d at offset %d\n",
- (int)pid,(int)free_slot));
-#endif /* LARGE_SMB_OFF_T */
sys_lseek(smb_shm_processes_fd, free_slot, SEEK_SET);
if(write(smb_shm_processes_fd, &pid, sizeof(pid)) < 0)
@@ -411,13 +401,8 @@ static BOOL smb_shm_unregister_process(char *processreg_file, pid_t pid)
if(other_pid == pid)
{
/* erase pid */
-#ifdef LARGE_SMB_OFF_T
DEBUG(5,("smb_shm_unregister_process : erasing record for pid %d (seek_val = %.0f)\n",
(int)other_pid, (double)seek_back));
-#else /* LARGE_SMB_OFF_T */
- DEBUG(5,("smb_shm_unregister_process : erasing record for pid %d (seek_val = %d)\n",
- (int)other_pid, (int)seek_back));
-#endif /* LARGE_SMB_OFF_T */
other_pid = (pid_t)0;
erased_slot = sys_lseek(smb_shm_processes_fd, seek_back, SEEK_CUR);
if(write(smb_shm_processes_fd, &other_pid, sizeof(other_pid)) < 0)
@@ -782,12 +767,7 @@ struct shmem_ops *smb_shm_open(int ronly)
if (!*file_name) return(False);
pstrcat(file_name, "/SHARE_MEM_FILE");
-#ifdef LARGE_SMB_OFF_T
DEBUG(5,("smb_shm_open : using shmem file %s to be of size %.0f\n",file_name,(double)size));
-#else /* LARGE_SMB_OFF_T */
- DEBUG(5,("smb_shm_open : using shmem file %s to be of size %d\n",
- file_name,(int)size));
-#endif /* LARGE_SMB_OFF_T */
smb_shm_fd = open(file_name, read_only?O_RDONLY:(O_RDWR|O_CREAT),
SHM_FILE_MODE);
@@ -859,13 +839,8 @@ struct shmem_ops *smb_shm_open(int ronly)
{
/* the existing file has a different size and we are not the first opener.
Since another process is still using it, we will use the file size */
-#ifdef LARGE_SMB_OFF_T
DEBUG(0,("WARNING smb_shm_open : filesize (%.0f) != expected size (%.0f), using filesize\n",
(double)filesize, (double)size));
-#else /* LARGE_SMB_OFF_T */
- DEBUG(0,("WARNING smb_shm_open : filesize (%d) != expected size (%d), using filesize\n",
- (int)filesize,(int)size));
-#endif /* LARGE_SMB_OFF_T */
size = filesize;
}