Skip to content

Commit

Permalink
Remove unused flags and do not read flags from boot command line
Browse files Browse the repository at this point in the history
These flags are not used by Anaconda anymore or not used in our
code at all.
Blivet is now also used outside Anaconda so we should not try to
parse kernel command line for flags and let Anaconda do it when it
makes sense.
  • Loading branch information
vojtechtrefny committed Feb 1, 2024
1 parent 53dfc31 commit 6a369c6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions blivet/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
# Red Hat Author(s): David Lehman <dlehman@redhat.com>
#

import shlex


class Flags(object):

def __init__(self):
Expand All @@ -47,7 +44,6 @@ def __init__(self):
self.selinux = selinux.is_selinux_enabled()

self.ibft = True
self.noiswmd = False

self.gfs2 = True

Expand Down Expand Up @@ -81,9 +77,6 @@ def __init__(self):
# (so far only for LUKS)
self.discard_new = False

self.boot_cmdline = {}

self.update_from_boot_cmdline()
self.allow_imperfect_devices = True

# compression option for btrfs filesystems
Expand All @@ -99,20 +92,5 @@ def __init__(self):
# Allow online filesystem resizes
self.allow_online_fs_resize = False

def get_boot_cmdline(self):
with open("/proc/cmdline") as f:
buf = f.read().strip()
args = shlex.split(buf)
for arg in args:
(opt, _equals, val) = arg.partition("=")
if val:
self.boot_cmdline[opt] = val

def update_from_boot_cmdline(self):
self.get_boot_cmdline()
self.multipath = "nompath" not in self.boot_cmdline
self.noiswmd = "noiswmd" in self.boot_cmdline
self.gfs2 = "gfs2" in self.boot_cmdline


flags = Flags()

0 comments on commit 6a369c6

Please sign in to comment.