Skip to content

Commit

Permalink
- move more code into if block
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Sep 8, 2014
1 parent 74b696e commit 4591637
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/modules/StorageProposal.rb
Expand Up @@ -4470,10 +4470,12 @@ def modify(partitions)

# enable snapshots for root volume if desired
if StorageProposal.PropDefaultFs() == :btrfs && StorageProposal.GetProposalSnapshots()
opts = StorageProposal.GetControlCfg()
size_limit_k = 1024 * opts["root_base"]
if volume["mount"] == "/" && volume["size_k"] >= size_limit_k
volume["userdata"] = { "/" => "snapshots" }
if volume["mount"] == "/"
opts = StorageProposal.GetControlCfg()
size_limit_k = 1024 * opts["root_base"]
if volume["size_k"] >= size_limit_k
volume["userdata"] = { "/" => "snapshots" }
end
end
end

Expand Down

0 comments on commit 4591637

Please sign in to comment.