Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-02-07 15:36:24 +0100
committerAnton Hvornum <anton@hvornum.se>2021-02-07 15:36:24 +0100
commit530edb5ece1350cbba568529cbba1f6c2eb36938 (patch)
tree1820c9a80ba9b0baf7b4063a152a69c92d5abad9 /archinstall/lib
parentacf39296efd905e6b2a495468555c6b8a8976cbc (diff)
Moved the output of the current fileformat structure in guided, as well as added an option to supress the log message from format() in order to hide (for users) the some what confusing formating of /dev/null.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index d2bac3d2..7b3a9b66 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -143,11 +143,13 @@ class Partition():
else:
return f'Partition(path={self.path}, fs={self.filesystem}, mounted={self.mountpoint})'
- def format(self, filesystem, path=None):
+ def format(self, filesystem, path=None, log_formating=True):
if not path:
path = self.path
- log(f'Formatting {path} -> {filesystem}', level=LOG_LEVELS.Info)
+ if log_formating:
+ log(f'Formatting {path} -> {filesystem}', level=LOG_LEVELS.Info)
+
if filesystem == 'btrfs':
o = b''.join(sys_command(f'/usr/bin/mkfs.btrfs -f {path}'))
if b'UUID' not in o:
@@ -211,7 +213,7 @@ class Partition():
# We perform a dummy format on /dev/null with the given filesystem-type
# in order to determain if we support it or not.
try:
- self.format(self.filesystem, '/dev/null')
+ self.format(self.filesystem, '/dev/null', log_formating=False)
except SysCallError:
pass # We supported it, but /dev/null is not formatable as expected so the mkfs call exited with an error code
except UnknownFilesystemFormat as err: