]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/scan.c
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / stored / scan.c
index 655ee2924c69d75a30d59a026510fa9fd213699c..d5afc0e80bd1b45d3dc953ece8445917bb5af34c 100644 (file)
@@ -1,3 +1,21 @@
+/*
+   Bacula(R) - The Network Backup Solution
+
+   Copyright (C) 2000-2016 Kern Sibbald
+
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
+
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
+
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
+*/
 /*
  *
  *   scan.c scan a directory (on a removable file) for a valid
@@ -5,35 +23,7 @@
  *
  *    Kern Sibbald, MMVI
  *
- *   Version $Id$
  */
-/*
-   Bacula® - The Network Backup Solution
-
-   Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
-
-   The main author of Bacula is Kern Sibbald, with contributions from
-   many others, a complete list can be found in the file AUTHORS.
-   This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-   Bacula® is a registered trademark of John Walker.
-   The licensor of Bacula is the Free Software Foundation Europe
-   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-   Switzerland, email:ftf@fsfeurope.org.
-*/
 
 #include "bacula.h"
 #include "stored.h"
@@ -70,15 +60,15 @@ bool DEVICE::scan_dir_for_volume(DCR *dcr)
    } else {
       mount_point = device->device_name;
    }
-      
+
    if (!(dp = opendir(mount_point))) {
       berrno be;
       dev_errno = errno;
-      Dmsg3(29, "scan_dir_for_vol: failed to open dir %s (dev=%s), ERR=%s\n", 
+      Dmsg3(29, "scan_dir_for_vol: failed to open dir %s (dev=%s), ERR=%s\n",
             mount_point, print_name(), be.bstrerror());
       goto get_out;
    }
-   
+
    len = strlen(mount_point);
    if (len > 0) {
       need_slash = !IsPathSeparator(mount_point[len - 1]);
@@ -87,15 +77,15 @@ bool DEVICE::scan_dir_for_volume(DCR *dcr)
    for ( ;; ) {
       if ((readdir_r(dp, entry, &result) != 0) || (result == NULL)) {
          dev_errno = EIO;
-         Dmsg2(129, "scan_dir_for_vol: failed to find suitable file in dir %s (dev=%s)\n", 
+         Dmsg2(129, "scan_dir_for_vol: failed to find suitable file in dir %s (dev=%s)\n",
                mount_point, print_name());
          break;
       }
-      if (strcmp(result->d_name, ".") == 0 || 
+      if (strcmp(result->d_name, ".") == 0 ||
           strcmp(result->d_name, "..") == 0) {
          continue;
       }
-       
+
       if (!is_volume_name_legal(result->d_name)) {
          continue;
       }
@@ -129,7 +119,7 @@ bool DEVICE::scan_dir_for_volume(DCR *dcr)
    }
    free(entry);
    closedir(dp);
-   
+
 get_out:
    if (!found) {
       /* Restore VolumeName we really wanted */
@@ -137,7 +127,7 @@ get_out:
       dcr->VolCatInfo = dcrVolCatInfo;     /* structure assignment */
       VolCatInfo = devVolCatInfo;          /* structure assignment */
    }
-   sm_check(__FILE__, __LINE__, false);
+   Dsm_check(100);
    return found;
 }