Skip to content

Commit

Permalink
mxraid_assemble: Switch logic of get_hd_info/get_hd_serial
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas committed Jan 21, 2019
1 parent 1e5e2f6 commit 5524a32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mxraid/mxraid_assemble
Original file line number Diff line number Diff line change
Expand Up @@ -652,15 +652,15 @@ exit;
}

# 'shortcut'
sub get_hd_info {
sub get_hd_serial {
my $self = shift;
$self->get_hd_serial($_[0], 1)
$self->get_hd_info($_[0], 1)
}

sub get_hd_serial {
sub get_hd_info {
my $self = shift;
my $dev_list = shift;
my $full_info = shift;
my $short_info = shift;

my @ret;
my $num = scalar @$dev_list;
Expand Down Expand Up @@ -694,10 +694,10 @@ exit;
}

if (defined $serial_number) {
if ($full_info) {
push @ret, [$dk, $serial_number, $model];
} else {
if ($short_info) {
push @ret, $serial_number;
} else {
push @ret, [$dk, $serial_number, $model];
}
}
}
Expand Down

0 comments on commit 5524a32

Please sign in to comment.