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

Re: [PATCH 02/30] Make the allocation and grow code optional.



> @@ -597,8 +603,10 @@ def doPartitioning(storage, exclusiveDisks=None):
>          bootDev.req_bootable = True
>  
>      # FIXME: make sure non-existent partitions have empty parents list
> -    allocatePartitions(disks, partitions)
> -    growPartitions(disks, partitions)
> +    if alloc:
> +        allocatePartitions(disks, partitions)
> +    if grow:
> +        growPartitions(disks, partitions)
>      # The number and thus the name of partitions may have changed now,
>      # allocatePartitions() takes care of this for new partitions, but not
>      # for pre-existing ones, so we update the name of all partitions here

This should probably be:

if alloc:
   allocatePartitions(disks, partitions)

   if grow:
      growPartitions(disks, partitions)

Otherwise it'd be possible to call with alloc=False, grow=True and that
just seems like asking for trouble.

- Chris


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