* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: amlabel.c,v 1.53 2006/07/25 18:27:57 martinea Exp $
+ * $Id: amlabel.c,v 1.53.2.2 2007/02/06 14:07:44 martinea Exp $
*
* write an Amanda label on a tape
*/
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 */
error("couldn't write tapelist: %s", strerror(errno));
/*NOTREACHED*/
}
+
+ if (have_changer) {
+ changer_label(outslot, label);
+ }
} /* write tape list */
printf(", done.\n");
} else {