From: Volker Lendecke Date: Tue, 28 Apr 2009 09:16:19 +0000 (+0200) Subject: Fix annoying debug messages when no snapshots are used X-Git-Tag: tdb-1.1.5~878 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c33291d49f888a7a29a07bc1735cbd890a23cb10;p=thirdparty%2Fsamba.git 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. --- 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; }