[PATCH 3/3] Do not strip trailing zeros from XFS labels (#571513)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When you specify an XFS filesystem label that ends in a zero, at least
with --noformat, anaconda strips the trailing zero from the label
because the python function readXFSLabel_int() which reads the label
from disk uses the wrong character for the null terminator, "\0x00" when
it should be using '\0'.

Patch from Andrew Ryan <andrewr@xxxxxxxxxxxx>
---
 isys/isys.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/isys/isys.py b/isys/isys.py
index 6312ba8..1a993ef 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -567,7 +567,7 @@ def readXFSLabel_int(device):
 
     xfslabel = None
     if len(buf) == 128 and buf[0:4] == "XFSB":
-        xfslabel = string.rstrip(buf[108:120],"\0x00")
+        xfslabel = string.rstrip(buf[108:120],'\0')
 
     return xfslabel
     
-- 
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux