diff options
author | Mike Fulbright <msf@redhat.com> | 2001-07-19 19:32:10 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-07-19 19:32:10 +0000 |
commit | 0e82660641f9f1e38c27fa102eae106804c90737 (patch) | |
tree | 3955a2bd291ecd59c049e513ea4150787561cd6f /partitioning.py | |
parent | 5575d7da7ea15683fd2183523d4756dddcc29325 (diff) | |
download | anaconda-0e82660641f9f1e38c27fa102eae106804c90737.tar.gz anaconda-0e82660641f9f1e38c27fa102eae106804c90737.tar.xz anaconda-0e82660641f9f1e38c27fa102eae106804c90737.zip |
report preexisting disk label for existing filesystems (which have one) so user knows how things were previously mounted
Diffstat (limited to 'partitioning.py')
-rw-r--r-- | partitioning.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/partitioning.py b/partitioning.py index deeca0d19..a0e4331d8 100644 --- a/partitioning.py +++ b/partitioning.py @@ -513,7 +513,7 @@ class PartitionSpec: format = None, options = None, constraint = None, migrate = None, raidmembers = None, raidlevel = None, - raidspares = None, badblocks = None): + raidspares = None, badblocks = None, fslabel = None): # # requesttype: REQUEST_PREEXIST or REQUEST_NEW or REQUEST_RAID # @@ -549,6 +549,9 @@ class PartitionSpec: self.raidmembers = raidmembers self.raidlevel = raidlevel self.raidspares = raidspares + + # fs label (if pre-existing, otherwise None) + self.fslabel = fslabel # device is what we currently think the device is # realDevice is used by partitions which are pre-existing @@ -661,6 +664,7 @@ class Partitions: self.deletes = [] self.requests = [] diskset.refreshDevices() + labels = diskset.getLabels() drives = diskset.disks.keys() drives.sort() for drive in drives: @@ -697,6 +701,12 @@ class Partitions: drive = drive, format = format) spec.device = fsset.PartedPartitionDevice(part).getDevice() + # set label if makes sense + if ptype and ptype.isMountable() and ptype.getName != "foreign": + if spec.device in labels.keys(): + if labels[spec.device] and len(labels[spec.device])>0: + spec.fslabel = labels[spec.device] + self.addRequest(spec) part = disk.next_partition(part) |