diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 01:59:36 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 01:59:36 +0200 |
commit | 4746f79d50d804b0e9d5d5cc0d4796dee54d052c (patch) | |
tree | c10c06cd3e9b10cc0a4ea964875b4cfa739a2e4c /source3/locking | |
parent | abe443a65edf86892ce01c80804a4b644ec99433 (diff) | |
download | samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.tar.gz samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.tar.bz2 samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.zip |
Use {u,}int64_t instead of SMB_BIG_{U,}INT.
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/locking.c | 20 | ||||
-rw-r--r-- | source3/locking/posix.c | 32 |
2 files changed, 26 insertions, 26 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 368ab1687c..33717f1bb9 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -77,8 +77,8 @@ const char *lock_flav_name(enum brl_flavour lock_flav) bool is_locked(files_struct *fsp, uint32 smbpid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_type lock_type) { int strict_locking = lp_strict_locking(fsp->conn->params); @@ -144,8 +144,8 @@ bool is_locked(files_struct *fsp, NTSTATUS query_lock(files_struct *fsp, uint32 *psmbpid, - SMB_BIG_UINT *pcount, - SMB_BIG_UINT *poffset, + uint64_t *pcount, + uint64_t *poffset, enum brl_type *plock_type, enum brl_flavour lock_flav) { @@ -184,8 +184,8 @@ NTSTATUS query_lock(files_struct *fsp, struct byte_range_lock *do_lock(struct messaging_context *msg_ctx, files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_type lock_type, enum brl_flavour lock_flav, bool blocking_lock, @@ -251,8 +251,8 @@ struct byte_range_lock *do_lock(struct messaging_context *msg_ctx, NTSTATUS do_unlock(struct messaging_context *msg_ctx, files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_flavour lock_flav) { bool ok = False; @@ -304,8 +304,8 @@ NTSTATUS do_unlock(struct messaging_context *msg_ctx, NTSTATUS do_lock_cancel(files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_flavour lock_flav) { bool ok = False; diff --git a/source3/locking/posix.c b/source3/locking/posix.c index 32e1ee9fbf..c036ee597c 100644 --- a/source3/locking/posix.c +++ b/source3/locking/posix.c @@ -79,7 +79,7 @@ static const char *posix_lock_type_name(int lock_type) ****************************************************************************/ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, - SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count) + uint64_t u_offset, uint64_t u_count) { SMB_OFF_T offset = (SMB_OFF_T)u_offset; SMB_OFF_T count = (SMB_OFF_T)u_count; @@ -132,9 +132,9 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, * ignore this lock. */ - if (u_offset & ~((SMB_BIG_UINT)max_positive_lock_offset)) { + if (u_offset & ~((uint64_t)max_positive_lock_offset)) { DEBUG(10,("posix_lock_in_range: (offset = %.0f) offset > %.0f and we cannot handle this. Ignoring lock.\n", - (double)u_offset, (double)((SMB_BIG_UINT)max_positive_lock_offset) )); + (double)u_offset, (double)((uint64_t)max_positive_lock_offset) )); return False; } @@ -142,7 +142,7 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, * We must truncate the count to less than max_positive_lock_offset. */ - if (u_count & ~((SMB_BIG_UINT)max_positive_lock_offset)) { + if (u_count & ~((uint64_t)max_positive_lock_offset)) { count = max_positive_lock_offset; } @@ -271,8 +271,8 @@ static bool posix_fcntl_getlock(files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T ****************************************************************************/ bool is_posix_locked(files_struct *fsp, - SMB_BIG_UINT *pu_offset, - SMB_BIG_UINT *pu_count, + uint64_t *pu_offset, + uint64_t *pu_count, enum brl_type *plock_type, enum brl_flavour lock_flav) { @@ -302,8 +302,8 @@ bool is_posix_locked(files_struct *fsp, if (lock_flav == POSIX_LOCK) { /* Only POSIX lock queries need to know the details. */ - *pu_offset = (SMB_BIG_UINT)offset; - *pu_count = (SMB_BIG_UINT)count; + *pu_offset = (uint64_t)offset; + *pu_count = (uint64_t)count; *plock_type = (posix_lock_type == F_RDLCK) ? READ_LOCK : WRITE_LOCK; } return True; @@ -929,8 +929,8 @@ lock: start = %.0f, size = %.0f", (double)l_curr->start, (double)l_curr->size, ( ****************************************************************************/ bool set_posix_lock_windows_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type lock_type, const struct lock_context *lock_ctx, const struct lock_struct *plocks, @@ -1066,8 +1066,8 @@ bool set_posix_lock_windows_flavour(files_struct *fsp, ****************************************************************************/ bool release_posix_lock_windows_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type deleted_lock_type, const struct lock_context *lock_ctx, const struct lock_struct *plocks, @@ -1189,8 +1189,8 @@ bool release_posix_lock_windows_flavour(files_struct *fsp, ****************************************************************************/ bool set_posix_lock_posix_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type lock_type, int *errno_ret) { @@ -1229,8 +1229,8 @@ bool set_posix_lock_posix_flavour(files_struct *fsp, ****************************************************************************/ bool release_posix_lock_posix_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, const struct lock_context *lock_ctx, const struct lock_struct *plocks, int num_locks) |