Skip to contentSkip to conversation

vmxcap: Fix output formatting

PATCH In review Stefan Fritsch 2 participants 2 messages Jul 20, 2017 – Sep 24, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmxcap: Fix output formatting

From: Stefan Fritsch <[email protected]>

One string is longer than 40 chars. Set the field width to 50.

---
 scripts/kvm/vmxcap | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/kvm/vmxcap +2 -2
index d9a6db0bb7..19506f45bf 100755
@@ -69,7 +69,7 @@ class Control(object):
                 s = 'forced'
             elif one and zero:
                 s = 'yes'
-            print('  %-40s %s' % (self.bits[bit], s))
+            print('  %-50s %s' % (self.bits[bit], s))
 
 class Misc(object):
     def __init__(self, name, bits, msr):
@@ -94,7 +94,7 @@ class Misc(object):
                 def fmt(x):
                     return { True: 'yes', False: 'no' }[x]
             v = (value >> lo) & ((1 << (hi - lo + 1)) - 1)
-            print('  %-40s %s' % (self.bits[bits], fmt(v)))
+            print('  %-50s %s' % (self.bits[bits], fmt(v)))
 
 controls = [
     Misc(
Signature · 1 line
2.11.0
#1 lore raw

Please excuse me for the long delay with this patch.

Quoted 3 lines · Stefan Fritsch

From: Stefan Fritsch <[email protected]>

One string is longer than 40 chars. Set the field width to 50.

The string is this one, I guess:

Miscellaneous data
Hex: 0x100401e5
VMX-preemption timer scale (log2) 5
Store EFER.LMA into IA-32e mode guest control yes
HLT activity state yes
Shutdown activity state yes

While technically after this change, it will be aligned in one column, I think it is better to reword this one entry instead: when widening the alignment column, the whole thing becomes less and less readable, it is more difficult this way to follow which value correspond to which entry.

A better wording for this one entry is welcome :)

Thanks,

/mjt