X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FTaper%2FScan%2Ftraditional.pm;fp=perl%2FAmanda%2FTaper%2FScan%2Ftraditional.pm;h=ec6e96bb3105a9c6927cd1e0703dc500b545b75e;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=7c8235cbd54f2acf1d930856c36426c8a4f7b57e;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/perl/Amanda/Taper/Scan/traditional.pm b/perl/Amanda/Taper/Scan/traditional.pm index 7c8235c..ec6e96b 100644 --- a/perl/Amanda/Taper/Scan/traditional.pm +++ b/perl/Amanda/Taper/Scan/traditional.pm @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2010 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License version 2.1 as @@ -390,10 +390,42 @@ sub stage_2 { if (!defined $autolabel->{'template'} || $autolabel->{'template'} eq "") { - $self->_user_msg(slot_result => 1, - not_autolabel => 1, - slot => $slot, - res => $res); + if ($status & $DEVICE_STATUS_VOLUME_UNLABELED and + $dev->volume_header and + $dev->volume_header->{'type'} == $Amanda::Header::F_EMPTY) { + $self->_user_msg(slot_result => 1, + not_autolabel => 1, + empty => 1, + slot => $slot, + res => $res); + } elsif ($status & $DEVICE_STATUS_VOLUME_UNLABELED and + $dev->volume_header and + $dev->volume_header->{'type'} == $Amanda::Header::F_WEIRD) { + $self->_user_msg(slot_result => 1, + not_autolabel => 1, + non_amanda => 1, + slot => $slot, + res => $res); + } elsif ($status & $DEVICE_STATUS_VOLUME_ERROR) { + $self->_user_msg(slot_result => 1, + not_autolabel => 1, + volume_error => 1, + err => $dev->error_or_status(), + slot => $slot, + res => $res); + } elsif ($status != $DEVICE_STATUS_SUCCESS) { + $self->_user_msg(slot_result => 1, + not_autolabel => 1, + not_success => 1, + err => $dev->error_or_status(), + slot => $slot, + res => $res); + } else { + $self->_user_msg(slot_result => 1, + not_autolabel => 1, + slot => $slot, + res => $res); + } return $steps->{'try_continue'}->(); }