- $dev->volume_header->{'type'} == $Amanda::Header::F_WEIRD and
- !$autolabel->{'non_amanda'}) {
- return 0;
- }
-
- if ($status & $DEVICE_STATUS_VOLUME_ERROR and
- !$autolabel->{'volume_error'}) {
+ $dev->volume_header->{'type'} == $Amanda::Header::F_WEIRD) {
+ if (!$autolabel->{'non_amanda'}) {
+ $self->_user_msg(slot_result => 1,
+ non_amanda => 1,
+ slot => $slot,
+ res => $res);
+ return 0;
+ }
+ } elsif ($status & $DEVICE_STATUS_VOLUME_ERROR) {
+ if (!$autolabel->{'volume_error'}) {
+ $self->_user_msg(slot_result => 1,
+ volume_error => 1,
+ err => $dev->error_or_status(),
+ slot => $slot,
+ res => $res);
+ return 0;
+ }
+ } elsif ($status != $DEVICE_STATUS_SUCCESS) {
+ $self->_user_msg(slot_result => 1,
+ not_success => 1,
+ err => $dev->error_or_status(),
+ slot => $slot,
+ res => $res);