X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famlabel.c;fp=server-src%2Famlabel.c;h=b04dcff2732460737404b2c7e831dcc6c8ec90ad;hb=310f09c0f55a2fb6f3f3746d6ded20099792b773;hp=ab5169bbc937819e6cd35c52aa5754ab7b65f962;hpb=13d6d10aa48f1dfb956ccff2f72dbaa255073472;p=debian%2Famanda diff --git a/server-src/amlabel.c b/server-src/amlabel.c index ab5169b..b04dcff 100644 --- a/server-src/amlabel.c +++ b/server-src/amlabel.c @@ -24,7 +24,7 @@ * 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 */ @@ -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 {