[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-334-g4cc09ec
Alexander Bokovoy
ab at samba.org
Thu Mar 20 19:14:18 GMT 2008
On Thu, Mar 20, 2008 at 6:59 PM, Volker Lendecke <vlendec at samba.org> wrote:
> commit df574fd2ee58f008b93b06f4d78c85cb909cc92c
> Author: Volker Lendecke <vl at samba.org>
> Date: Thu Mar 20 12:49:13 2008 +0100
>
> Fix some warnings in the tsmsm module
>
> Alexander, please check!
>
> -----------------------------------------------------------------------
>
> Summary of changes:
> source/modules/vfs_tsmsm.c | 10 ++++--
> source/rpc_server/srv_srvsvc_nt.c | 1 +
> source/smbd/server.c | 60 +++++++++++++++++++++++++++++++++++--
> 3 files changed, 64 insertions(+), 7 deletions(-)
>
>
> Changeset truncated at 500 lines:
>
> diff --git a/source/modules/vfs_tsmsm.c b/source/modules/vfs_tsmsm.c
> index 791e8cf..aa0f945 100644
> --- a/source/modules/vfs_tsmsm.c
> +++ b/source/modules/vfs_tsmsm.c
> @@ -148,8 +148,9 @@ static bool tsmsm_is_offline(struct vfs_handle_struct *handle,
> /* if the file has more than FILE_IS_ONLINE_RATIO of blocks available,
> then assume it is not offline (it may not be 100%, as it could be sparse) */
> if (512 * (off_t)stbuf->st_blocks >= stbuf->st_size * tsmd->online_ratio) {
> - DEBUG(10,("%s not offline: st_blocks=%ld st_size=%ld online_ratio=%.2f\n",
> - path, stbuf->st_blocks, stbuf->st_size, tsmd->online_ratio));
> + DEBUG(10,("%s not offline: st_blocks=%ld st_size=%ld "
> + "online_ratio=%.2f\n", path, (long)stbuf->st_blocks,
> + (long)stbuf->st_size, tsmd->online_ratio));
> return false;
> }
>
> @@ -226,8 +227,9 @@ static bool tsmsm_aio_force(struct vfs_handle_struct *handle, struct files_struc
> if the file might be offline
> */
> if(SMB_VFS_FSTAT(fsp, &sbuf) == 0) {
> - DEBUG(10,("tsmsm_aio_force st_blocks=%ld st_size=%ld online_ratio=%.2f\n",
> - sbuf.st_blocks, sbuf.st_size, tsmd->online_ratio));
> + DEBUG(10,("tsmsm_aio_force st_blocks=%ld st_size=%ld "
> + "online_ratio=%.2f\n", (long)sbuf.st_blocks,
> + (long)sbuf.st_size, tsmd->online_ratio));
> return !(512 * (off_t)sbuf.st_blocks >= sbuf.st_size * tsmd->online_ratio);
> }
> return false;
These two look OK except that at least in Linux stat/stat64 defines
st_blocks as 'unsigned long'/'unsigned long long' correspondingly.
This is certainly problematic as to recognize both cases we would need
to change formatting symbol too. SUSv2 doesn't know %llu, only %lu,
but our snprintf() replacement knows %ll.
--
/ Alexander Bokovoy
More information about the samba-technical
mailing list