From fca88879009c13e152d6b14535ee61f0ed506437 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Dec 2024 07:55:45 +0100 Subject: [PATCH] Modernize DEBUGs Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/lib/util_ea.c | 5 ++--- source3/modules/vfs_streams_depot.c | 14 +++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/source3/lib/util_ea.c b/source3/lib/util_ea.c index dd48e77e6f1..92761f29c85 100644 --- a/source3/lib/util_ea.c +++ b/source3/lib/util_ea.c @@ -53,8 +53,7 @@ struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t da return NULL; } if (!pull_ascii_talloc(ctx, &eal->ea.name, pdata + 4, &converted_size)) { - DEBUG(0,("read_ea_list_entry: pull_ascii_talloc failed: %s\n", - strerror(errno))); + DBG_ERR("pull_ascii_talloc failed: %s\n", strerror(errno)); } if (!eal->ea.name) { return NULL; @@ -76,7 +75,7 @@ struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t da *pbytes_used = 4 + namelen + 1 + val_len; } - DEBUG(10,("read_ea_list_entry: read ea name %s\n", eal->ea.name)); + DBG_DEBUG("read ea name %s\n", eal->ea.name); dump_data(10, eal->ea.value.data, eal->ea.value.length); return eal; diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 566d34996c1..1cd703ca60e 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -277,9 +277,9 @@ static char *stream_dir(vfs_handle_struct *handle, "delete_lost", false); if (delete_lost) { - DEBUG(3, ("Someone has recreated a file under an " - "existing inode. Removing: %s\n", - smb_fname_hash->base_name)); + DBG_NOTICE("Someone has recreated a file under an " + "existing inode. Removing: %s\n", + smb_fname_hash->base_name); recursive_rmdir(talloc_tos(), handle->conn, smb_fname_hash); SMB_VFS_NEXT_UNLINKAT(handle, @@ -289,10 +289,10 @@ static char *stream_dir(vfs_handle_struct *handle, } else { newname = talloc_asprintf(talloc_tos(), "lost-%lu", random()); - DEBUG(3, ("Someone has recreated a file under an " - "existing inode. Renaming: %s to: %s\n", - smb_fname_hash->base_name, - newname)); + DBG_NOTICE("Someone has recreated a file under an " + "existing inode. Renaming: %s to: %s\n", + smb_fname_hash->base_name, + newname); if (newname == NULL) { errno = ENOMEM; goto fail;