BaseTools/Source/Python/GenFds/GenFds.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3009
Update the FV Space Information to display decimal and Hex
FV Space Information
before format:
SECFV [13%Full] 212992 total, 28400 used, 184592 free
Updated format:
SECFV [13%Full] 0x34000 (212992) total, 0x6ef0 (28400) used,
0x2d110 (184592) free
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
BaseTools/Source/Python/GenFds/GenFds.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index d5511f4c40..76a6d0d1d0 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -633,7 +633,10 @@ class GenFds(object):
else:
Percentage = str((UsedSizeValue + 0.0) / TotalSizeValue)[0:4].lstrip('0.')
- GenFdsGlobalVariable.InfLogger(Name + ' ' + '[' + Percentage + '%Full] ' + str(TotalSizeValue) + ' total, ' + str(UsedSizeValue) + ' used, ' + str(FreeSizeValue) + ' free')
+ GenFdsGlobalVariable.InfLogger(Name + ' ' + '[' + Percentage + '%Full] '\
+ + hex(TotalSizeValue) + ' (' + str(TotalSizeValue) + ')' + ' total, '\
+ + hex(UsedSizeValue) + ' (' + str(UsedSizeValue) + ')' + ' used, '\
+ + hex(FreeSizeValue) + ' (' + str(FreeSizeValue) + ')' + ' free')
## PreprocessImage()
#
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66689): https://edk2.groups.io/g/devel/message/66689
Mute This Topic: https://groups.io/mt/77857022/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
How about swapping the positions of decimal and hex numbers? I think the 13 in 13%Full is a decimal number, so putting the decimal number outside the square brackets might look more consistent.
SECFV [13%Full] 212992 (0x34000) total, 28400 (0x6ef0) used, 184592 (0x2d110) free
Thanks,
Bob
-----Original Message-----
From: Yunhua Feng <fengyunhua@byosoft.com.cn>
Sent: Wednesday, October 28, 2020 1:51 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH] BaseTools: Update the FV Space Information to display decimal and Hex
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3009
Update the FV Space Information to display decimal and Hex
FV Space Information
before format:
SECFV [13%Full] 212992 total, 28400 used, 184592 free Updated format:
SECFV [13%Full] 0x34000 (212992) total, 0x6ef0 (28400) used,
0x2d110 (184592) free
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
BaseTools/Source/Python/GenFds/GenFds.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index d5511f4c40..76a6d0d1d0 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -633,7 +633,10 @@ class GenFds(object):
else:
Percentage = str((UsedSizeValue + 0.0) / TotalSizeValue)[0:4].lstrip('0.')
- GenFdsGlobalVariable.InfLogger(Name + ' ' + '[' + Percentage + '%Full] ' + str(TotalSizeValue) + ' total, ' + str(UsedSizeValue) + ' used, ' + str(FreeSizeValue) + ' free')
+ GenFdsGlobalVariable.InfLogger(Name + ' ' + '[' + Percentage + '%Full] '\
+ + hex(TotalSizeValue) + ' (' + str(TotalSizeValue) + ')' + ' total, '\
+ + hex(UsedSizeValue) + ' (' + str(UsedSizeValue) + ')' + ' used, '\
+ + hex(FreeSizeValue) + ' ('
+ + str(FreeSizeValue) + ')' + ' free')
## PreprocessImage()
#
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66696): https://edk2.groups.io/g/devel/message/66696
Mute This Topic: https://groups.io/mt/77857022/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.