From d5c80a5bd5e5f7f6f8d2edb55e89523f65e309e1 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 9 Oct 2020 18:06:07 +0200 Subject: [PATCH] code cleanup Signed-off-by: Thomas Lamprecht --- PVE/API2/Disks.pm | 10 +++++----- PVE/Diskmanage.pm | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm index 89ed57d..807e9b2 100644 --- a/PVE/API2/Disks.pm +++ b/PVE/API2/Disks.pm @@ -3,18 +3,18 @@ package PVE::API2::Disks; use strict; use warnings; -use PVE::SafeSyslog; -use PVE::Diskmanage; use HTTP::Status qw(:constants); + +use PVE::Diskmanage; use PVE::JSONSchema qw(get_standard_option); +use PVE::SafeSyslog; +use PVE::API2::Disks::Directory; use PVE::API2::Disks::LVM; use PVE::API2::Disks::LVMThin; -use PVE::API2::Disks::Directory; use PVE::API2::Disks::ZFS; use PVE::RESTHandler; - use base qw(PVE::RESTHandler); __PACKAGE__->register_method ({ @@ -69,7 +69,7 @@ __PACKAGE__->register_method ({ { name => 'lvmthin' }, { name => 'directory' }, { name => 'zfs' }, - ]; + ]; return $result; }}); diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index 267da08..0339177 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -2,6 +2,7 @@ package PVE::Diskmanage; use strict; use warnings; + use PVE::ProcFSTools; use Data::Dumper; use Cwd qw(abs_path); @@ -108,7 +109,6 @@ sub get_smart_data { if (defined($type) && $type eq 'ata' && $line =~ m/^([ \d]{2}\d)\s+(\S+)\s+(\S{6})\s+(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/) { my $entry = {}; - $entry->{name} = $2 if defined $2; $entry->{flags} = $3 if defined $3; # the +0 makes a number out of the strings -- 2.39.2