Re: [PATCH] Don't pass size=1 for autopart PVs. Use PartitionDevice's default size.

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

 



Ack.

On 03/22/2010 04:34 PM, David Lehman wrote:
Also avoid putting size=1 in anaconda-ks.cfg for partitions.
---
  storage/devices.py      |    5 +++--
  storage/partitioning.py |    1 -
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index dededb8..6fe7d90 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -870,6 +870,7 @@ class PartitionDevice(StorageDevice):
      """
      _type = "partition"
      _resizable = True
+    defaultSize = 500

      def __init__(self, name, format=None,
                   size=None, grow=False, maxsize=None,
@@ -958,7 +959,7 @@ class PartitionDevice(StorageDevice):
              #     for new partitions.
              if not self._size:
                  # default size for new partition requests
-                self._size = 500
+                self._size = self.defaultSize
              self.req_name = name
              self.req_partType = partType
              self.req_primary = primary
@@ -1023,7 +1024,7 @@ class PartitionDevice(StorageDevice):
          if self.req_primary:
              args.append("--asprimary")
          if self.req_size:
-            args.append("--size=%s" % (self.req_size or 1))
+            args.append("--size=%s" % (self.req_size or self.defaultSize))
          if preexisting:
              if len(self.req_disks) == 1:
                  args.append("--ondisk=%s" % self.req_disks[0].name)
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 939cf96..bbc5ef6 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -73,7 +73,6 @@ def _createFreeSpacePartitions(anaconda):
              fmt_args = {}
          part = anaconda.storage.newPartition(fmt_type=fmt_type,
                                                  fmt_args=fmt_args,
-                                                size=1,
                                                  grow=True,
                                                  disks=[disk])
          anaconda.storage.createDevice(part)

_______________________________________________
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