From: Volker Lendecke Date: Tue, 7 Aug 2018 13:09:04 +0000 (+0200) Subject: smbd: Enhance debugging in set_file_size X-Git-Tag: tdb-1.3.17~2113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29eb2fc67c7c0b26390ddeda76f4d3aa8c0846c4;p=thirdparty%2Fsamba.git smbd: Enhance debugging in set_file_size I've stumbled over a case where VFS_FTRUNCATE wasn't called due to an unchanged size. Make that easier to detect. Also, get rid of an ancient cast to (double). Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 0ec20fe6337..c0f984704d2 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6355,7 +6355,9 @@ static NTSTATUS smb_set_file_size(connection_struct *conn, return NT_STATUS_OBJECT_NAME_NOT_FOUND; } - DEBUG(6,("smb_set_file_size: size: %.0f ", (double)size)); + DBG_INFO("size: %"PRIu64", file_size_stat=%"PRIu64"\n", + (uint64_t)size, + get_file_size_stat(psbuf)); if (size == get_file_size_stat(psbuf)) { return NT_STATUS_OK;