summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-28 11:16:19 +0200
committerKarolin Seeger <kseeger@samba.org>2009-04-28 17:53:35 +0200
commit9af9a660b376e09a800719861d7379ed75507705 (patch)
tree1a66509051868611f1c8222c87bc98a5eb15b3ec
parent7bc900deed605ec1afa9804df222f282f79b42bb (diff)
downloadsamba-9af9a660b376e09a800719861d7379ed75507705.tar.gz
Fix annoying debug messages when no snapshots are used
Not being able to open the shadow copy directory is the same as having no shadow copy support at all. The VFS module should in this case not log with debug level 0 and set ENOSYS to indicate "no shadow copies used" to the higher levels. (cherry picked from commit 4982483cdd2a4d37f96574c19dd3aade236c1b93)
-rw-r--r--source3/modules/vfs_shadow_copy2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 9eaf8ee8512..9543af32b9a 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -513,9 +513,10 @@ static int shadow_copy2_get_shadow_copy2_data(vfs_handle_struct *handle,
p = SMB_VFS_NEXT_OPENDIR(handle, snapdir, NULL, 0);
if (!p) {
- DEBUG(0,("shadow_copy2: SMB_VFS_NEXT_OPENDIR() failed for '%s' - %s\n",
- snapdir, strerror(errno)));
+ DEBUG(2,("shadow_copy2: SMB_VFS_NEXT_OPENDIR() failed for '%s'"
+ " - %s\n", snapdir, strerror(errno)));
talloc_free(tmp_ctx);
+ errno = ENOSYS;
return -1;
}