]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Enhance debugging in set_file_size
authorVolker Lendecke <vl@samba.org>
Tue, 7 Aug 2018 13:09:04 +0000 (15:09 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 17 Aug 2018 16:25:08 +0000 (18:25 +0200)
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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index 0ec20fe6337f7643433ae66d42f4074c314b9fa2..c0f984704d2f49fe0ee56c2627a2a132986dae38 100644 (file)
@@ -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;