summaryrefslogtreecommitdiffstats
path: root/inspector/virt-inspector
diff options
context:
space:
mode:
Diffstat (limited to 'inspector/virt-inspector')
-rwxr-xr-xinspector/virt-inspector16
1 files changed, 9 insertions, 7 deletions
diff --git a/inspector/virt-inspector b/inspector/virt-inspector
index cb892c06..707825ee 100755
--- a/inspector/virt-inspector
+++ b/inspector/virt-inspector
@@ -407,13 +407,15 @@ sub output_text_os
print " $_->{name} $_->{version}\n"
}
- print __" Kernels:\n";
- my @kernels = @{$os->{kernels}};
- foreach (@kernels) {
- print " $_->{version} ($_->{arch})\n";
- my @modules = @{$_->{modules}};
- foreach (@modules) {
- print " $_\n";
+ if ($os->{kernels}) {
+ print __" Kernels:\n";
+ my @kernels = @{$os->{kernels}};
+ foreach (@kernels) {
+ print " $_->{version} ($_->{arch})\n";
+ my @modules = @{$_->{modules}};
+ foreach (@modules) {
+ print " $_\n";
+ }
}
}