pull last change pending from pre-git CVS tree
[debian/amanda] / server-src / amlabel.c
index ab5169bbc937819e6cd35c52aa5754ab7b65f962..1ead3ae917d86f42a8ef2409c2728e64f80431f5 100644 (file)
@@ -102,7 +102,7 @@ main(
 
     erroutput_type = ERR_INTERACTIVE;
 
-    parse_server_conf(argc, argv, &new_argc, &new_argv);
+    parse_conf(argc, argv, &new_argc, &new_argv);
 
     if(new_argc > 1 && strcmp(new_argv[1],"-f") == 0)
         force=1;
@@ -188,7 +188,12 @@ main(
                    new_argv[0], conffile);
            usage();
        }
-       tapename = stralloc(getconf_str(CNF_TAPEDEV));
+       tapename = getconf_str(CNF_TAPEDEV);
+       if (tapename == NULL) {
+           error("No tapedev specified");
+       } else {
+           tapename = stralloc(tapename);
+       }
 #ifdef HAVE_LIBVTBLC
        rawtapedev = stralloc(getconf_str(CNF_RAWTAPEDEV));
 #endif /* HAVE_LIBVTBLC */
@@ -456,6 +461,10 @@ main(
                error("couldn't write tapelist: %s", strerror(errno));
                /*NOTREACHED*/
            }
+
+            if (have_changer) {
+                changer_label(outslot, label);
+            }
        } /* write tape list */
        printf(", done.\n");
     } else {