[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Commit the new disk layout right away when initializing (#498602).
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Commit the new disk layout right away when initializing (#498602).
- Date: Wed, 13 May 2009 17:48:23 -0400
---
storage/devices.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/storage/devices.py b/storage/devices.py
index 8213379..bb724ed 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -709,6 +709,13 @@ class DiskDevice(StorageDevice):
if initcb is not None and initcb():
self.partedDisk = parted.freshDisk(device=self.partedDevice, \
ty = platform.getPlatform(None).diskType)
+
+ # If we've initialized the disk, we also need to commit
+ # the change now. At least on Macs, creating a new
+ # disk label means we've also created a partition. We
+ # need the system to reflect that immediately.
+ if self.partedDisk:
+ self.partedDisk.commit()
else:
raise DeviceUserDeniedFormatError("User prefered to not format.")
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]