Skip to content

Commit

Permalink
Merge pull request #1194 from vojtechtrefny/3.9-devel_flags-update
Browse files Browse the repository at this point in the history
Remove unused flags and do not read flags from boot command line
  • Loading branch information
vojtechtrefny authored Feb 5, 2024
2 parents 53dfc31 + 6a369c6 commit e5dc397
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 <[email protected]>
#

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 e5dc397

Please sign in to comment.