/[gli]/trunk/src/GLIStorageDevice.py
Gentoo

Diff of /trunk/src/GLIStorageDevice.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 313 Revision 497
1import commands, string, re, os, parted 1import commands, string, re, os, parted
2from decimal import Decimal
3
4MEGABYTE = 1024 * 1024
5
6archinfo = { 'sparc': { 'fixedparts': [ { 'minor': 3, 'type': "wholedisk" } ], 'disklabel': 'sun', 'extended': False },
7 'hppa': { 'fixedparts': [ { 'minor': 1, 'type': "boot" } ], 'disklabel': 'msdos', 'extended': False },
8 'x86': { 'fixedparts': [], 'disklabel': 'msdos', 'extended': True },
9 'ppc': { 'fixedparts': [ { 'minor': 1, 'type': "metadata" } ], 'disklabel': 'mac', 'extended': False }
10 }
2 11
3class Device: 12class Device:
4 "Class representing a partitionable device." 13 "Class representing a partitionable device."
5 14
6 _device = None 15 _device = None
11 _cylinder_bytes = 0 20 _cylinder_bytes = 0
12 _sectors_in_cylinder = 0 21 _sectors_in_cylinder = 0
13 _parted_dev = None 22 _parted_dev = None
14 _parted_disk = None 23 _parted_disk = None
15 _sector_bytes = 0 24 _sector_bytes = 0
16 25 _total_mb = 0
26 _arch = None
27
17 def __init__(self, device): 28 def __init__(self, device, arch="x86"):
18 self._device = device 29 self._device = device
19 self._partitions = {} 30 self._partitions = {}
20 self._geometry = {'cylinders': 0, 'heads': 0, 'sectors': 0, 'sectorsize': 512} 31 self._geometry = {'cylinders': 0, 'heads': 0, 'sectors': 0, 'sectorsize': 512}
21 self._total_bytes = 0 32 self._total_bytes = 0
22 self._cylinder_bytes = 0 33 self._cylinder_bytes = 0
34 self._arch = arch
23 self._parted_dev = parted.PedDevice.get(self._device) 35 self._parted_dev = parted.PedDevice.get(self._device)
24 self._parted_disk = parted.PedDisk.new(self._parted_dev) 36 self._parted_disk = parted.PedDisk.new(self._parted_dev)
25 self.set_disk_geometry_from_disk() 37 self.set_disk_geometry_from_disk()
26 38
27 def set_disk_geometry_from_disk(self): 39 def set_disk_geometry_from_disk(self):
28 self._total_bytes = self._parted_dev.length * self._parted_dev.sector_size 40 self._total_bytes = self._parted_dev.length * self._parted_dev.sector_size
29# if string.strip(commands.getoutput("echo " + self._device + " | grep '/hd'")) == self._device: # IDE
30# proc_dir = "/proc/ide/" + commands.getoutput("echo " + self._device + " | cut -d '/' -f 3")
31# proc_dir = string.strip(proc_dir)
32# heads = commands.getoutput("cat " + proc_dir + "/geometry | grep logical | cut -d '/' -f 2")
33# sectors = commands.getoutput("cat " + proc_dir + "/geometry | grep logical | cut -d '/' -f 3")
34# total_sectors = commands.getoutput("cat " + proc_dir + "/capacity")
35# cylinders = int(total_sectors) / (int(heads) * int(sectors))
36# self._geometry['heads'], self._geometry['sectors'], self._geometry['cylinders'] = int(heads), int(sectors), int(cylinders)
37# else: #SCSI
38 self._geometry['heads'], self._geometry['sectors'], self._geometry['cylinders'] = self._parted_dev.heads, self._parted_dev.sectors, self._parted_dev.cylinders 41 self._geometry['heads'], self._geometry['sectors'], self._geometry['cylinders'] = self._parted_dev.heads, self._parted_dev.sectors, self._parted_dev.cylinders
39
40 self._sector_bytes = self._parted_dev.sector_size 42 self._sector_bytes = self._parted_dev.sector_size
41 self._cylinder_bytes = self._geometry['heads'] * self._geometry['sectors'] * self._sector_bytes 43 self._cylinder_bytes = self._geometry['heads'] * self._geometry['sectors'] * self._sector_bytes
42# self._total_sectors = self._geometry['cylinders'] * self._geometry['heads'] * self._geometry['sectors']
43 self._total_sectors = self._parted_dev.length 44 self._total_sectors = self._parted_dev.length
44 self._sectors_in_cylinder = self._geometry['heads'] * self._geometry['sectors'] 45 self._sectors_in_cylinder = self._geometry['heads'] * self._geometry['sectors']
46 self._total_mb = int(self._total_bytes / MEGABYTE)
45 47
46 def set_partitions_from_disk(self): 48 def set_partitions_from_disk(self):
49 last_part = 0
50 last_log_part = 4
47 parted_part = self._parted_disk.next_partition() 51 parted_part = self._parted_disk.next_partition()
48 while parted_part != None: 52 while parted_part:
53 part_mb = int((parted_part.geom.end - parted_part.geom.start + 1) * self._sector_bytes / MEGABYTE)
49 if parted_part.num < 1: 54 if parted_part.num >= 1:
50 parted_part = self._parted_disk.next_partition(parted_part)
51 continue
52 fs_type = ""
53 if parted_part.fs_type != None: fs_type = parted_part.fs_type.name
54 if parted_part.type == 2: fs_type = "extended"
55 self._partitions[int(parted_part.num)] = Partition(self, parted_part.num, '', parted_part.geom.start, parted_part.geom.end, (parted_part.geom.end - parted_part.geom.start), fs_type, format=False, existing=True)
56 parted_part = self._parted_disk.next_partition(parted_part)
57
58 def set_partitions_from_install_profile_structure(self, ips):
59 for part in ips:
60 tmppart = ips[part]
61 existing = False
62 parted_part = self._parted_disk.get_partition(part)
63 if parted_part != None:
64 start = parted_part.geom.start / self._sectors_in_cylinder
65 end = parted_part.geom.end / self._sectors_in_cylinder
66 fs_type = "" 55 fs_type = ""
67 if parted_part.fs_type != None: fs_type = parted_part.fs_type.name 56 if parted_part.fs_type != None: fs_type = parted_part.fs_type.name
68 if parted_part.type == 2: fs_type = "extended" 57 if parted_part.type == 2: fs_type = "extended"
58 self._partitions[int(parted_part.num)] = Partition(self, parted_part.num, part_mb, parted_part.geom.start, parted_part.geom.end, fs_type, format=False, existing=True)
59 elif parted_part.type_name == "free":
60 parent_part = self.get_partition_at(parted_part.geom.start, ignore_extended=0)
61 if parent_part:
62 self._partitions[Decimal(str(float(last_log_part+0.9)))] = Partition(self, Decimal(str(float(last_log_part+0.9))), part_mb, parted_part.geom.start, parted_part.geom.end, "free", format=False, existing=False)
63 last_log_part += 1
64 else:
65 self._partitions[Decimal(str(float(last_log_part+0.1)))] = Partition(self, Decimal(str(float(last_log_part+0.1))), part_mb, parted_part.geom.start, parted_part.geom.end, "free", format=False, existing=False)
66 last_part += 1
67 parted_part = self._parted_disk.next_partition(parted_part)
68
69 def set_partitions_from_install_profile_structure(self, ips):
70 pass
71# for part in ips:
72# tmppart = ips[part]
73# existing = False
74# parted_part = self._parted_disk.get_partition(part)
75# if parted_part != None:
76# start = parted_part.geom.start / self._sectors_in_cylinder
77# end = parted_part.geom.end / self._sectors_in_cylinder
78# fs_type = ""
79# if parted_part.fs_type != None: fs_type = parted_part.fs_type.name
80# if parted_part.type == 2: fs_type = "extended"
69 if int(tmppart['start']) == int(start) and int(tmppart['end']) == int(end) and tmppart['type'] == fs_type and tmppart['format'] == False: 81# if int(tmppart['start']) == int(start) and int(tmppart['end']) == int(end) and tmppart['type'] == fs_type and tmppart['format'] == False:
70 existing = True 82# existing = True
71 self._partitions[int(part)] = Partition(self, part, '', tmppart['start'], tmppart['end'], 0, tmppart['type'], mountopts=tmppart['mountopts'], mountpoint=tmppart['mountpoint'], format=tmppart['format'], existing=(not tmppart['format'])) 83# self._partitions[int(part)] = Partition(self, part, '', tmppart['start'], tmppart['end'], 0, tmppart['type'], mountopts=tmppart['mountopts'], mountpoint=tmppart['mountpoint'], format=tmppart['format'], existing=(not tmppart['format']))
72 84
73 def get_device(self): 85 def get_device(self):
74 return self._device 86 return self._device
75 87
76 def clear_partitions(self): 88 def tidy_partitions(self):
77 self._partitions = {} 89 last_minor = 0
90 last_log_minor = 4
91 last_free = 0
92 last_log_free = 0
93 parts = self._partitions.keys()
94 parts.sort()
95 for part in parts:
96 if archinfo[self._arch]['extended'] and part > 4: break
97 tmppart = self._partitions[part]
98 if tmppart.get_type() == "extended":
99 for part_log in parts:
100 if part_log < Decimal("4.9"): continue
101 tmppart_log = self._partitions[part_log]
102 if tmppart_log.get_type() == "free":
103 if last_log_minor < last_log_free:
104 self._partitions[last_log_free].set_mb(self._partitions[last_log_free].get_mb()+tmppart_log.get_mb())
105 del self._partitions[part_log]
106 else:
107 if not last_log_free:
108 last_log_free = Decimal(str(last_log_minor + 0.9))
109 tmppart_log.set_minor(last_log_free)
110 self._partitions[last_log_free] = tmppart_log
111 if part_log != last_log_free: del self._partitions[part_log]
112 continue
113 last_log_free = part_log
114 else:
115 if part_log > (last_log_minor + 1):
116 tmppart_log.set_minor(last_log_minor + 1)
117 last_log_minor = last_log_minor + 1
118 self._partitions[last_log_minor] = tmppart_log
119 del self._partitions[part_log]
120 continue
121 last_log_minor = part_log
122 if tmppart.get_type() == "free":
123 if last_minor < last_free:
124 self._partitions[last_free].set_mb(self._partitions[last_free].get_mb()+tmppart.get_mb())
125 del self._partitions[part]
126 else:
127 if not last_free:
128 last_free = Decimal(str(last_minor + 0.1))
129 tmppart.set_minor(last_free)
130 self._partitions[last_free] = tmppart
131 if part != last_free: del self._partitions[part]
132 continue
133 last_free = part
134 else:
135 if part > (last_minor + 1):
136 tmppart.set_minor(last_minor + 1)
137 last_minor = last_minor + 1
138 self._partitions[last_minor] = tmppart
139 del self._partitions[part]
140 continue
141 last_minor = part
78 142
79 def add_partition(self, minor, start, end, type, mountpoint='', mountopts=''): 143 def add_partition(self, free_minor, mb, start, end, type, mountpoint='', mountopts=''):
80 free_start, free_end = self.get_free_space(start) 144 free_minor = Decimal(str(free_minor))
81 minor = int(minor) 145 new_minor = int(free_minor) + 1
82 if not free_end: 146# print "add_partition(): free_minor=" + str(free_minor) + ", new_minor=" + str(new_minor)
83 return False
84 if self._partitions.has_key(minor): 147 if self._partitions.has_key(new_minor):
85 parts = self._partitions.keys() 148 parts = self._partitions.keys()
86 parts.sort() 149 parts.sort()
87 parts.reverse() 150 parts.reverse()
88 hole_at = 0 151 hole_at = 0
89 for i in range(1, parts[0]+1): 152 for i in range(1, parts[0]+1):
90 if i <= minor: continue 153 if i <= new_minor: continue
91 if not self._partitions.has_key(int(i)): 154 if not self._partitions.has_key(i):
92 hole_at = i 155 hole_at = i
93 break 156 break
94 stopscooting = 0 157 stopscooting = 0
95 for i in parts: 158 for i in parts:
96 if stopscooting: break 159 if stopscooting: break
97 if (i >= hole_at) and (hole_at): continue 160 if i >= hole_at and hole_at: continue
98 if i >= minor: 161 if i >= new_minor:
99 self._partitions[i].set_minor(i+1) 162 self._partitions[i].set_minor(i+1)
100 self._partitions[i+1] = self._partitions[i] 163 self._partitions[i+1] = self._partitions[i]
101 if i == minor: stopscooting = 1 164 if i == new_minor: stopscooting = 1
165 if mb != self._partitions[free_minor].get_mb():
166 old_free_mb = self._partitions[free_minor].get_mb()
167 del self._partitions[free_minor]
168 if archinfo[self._arch]['extended'] and new_minor >= 5:
169 free_minor = Decimal(str(new_minor + 0.9))
170 else:
171 free_minor = Decimal(str(new_minor + 0.1))
172 self._partitions[free_minor] = Partition(self, free_minor, old_free_mb-mb, 0, 0, "free")
173# print "add_partition(): new part doesn't use all freespace. new free part is: minor=" + str(free_minor)
174 else:
175 del self._partitions[free_minor]
102 self._partitions[minor] = Partition(self, minor, '', start, end, 0, type, mountpoint=mountpoint, mountopts=mountopts) 176 self._partitions[new_minor] = Partition(self, new_minor, mb, start, end, type, mountpoint=mountpoint, mountopts=mountopts)
177 if type == "extended":
178 self._partitions[Decimal("4.9")] = Partition(self, Decimal("4.9"), mb, 0, 0, "free")
179 self.tidy_partitions()
103 180
104 def remove_partition(self, minor): 181 def remove_partition(self, minor):
182 tmppart = self._partitions[int(minor)]
183 free_minor = 0
184 if tmppart.is_logical():
185 free_minor = Decimal(str(float(minor)-0.1))
186 else:
187 free_minor = Decimal(str(float(minor)-0.9))
188 self._partitions[free_minor] = Partition(self, free_minor, tmppart.get_mb(), 0, 0, "free", format=False, existing=False)
105 del self._partitions[int(minor)] 189 del self._partitions[int(minor)]
190 self.tidy_partitions()
106 191
107 def get_free_space(self, start): 192 def get_free_space(self, start):
108 GAP_SIZE = 100 193 GAP_SIZE = 100
109 parts = self._partitions.keys() 194 parts = self._partitions.keys()
110 parts.sort() 195 parts.sort()
181 266
182 def get_ordered_partition_list(self): 267 def get_ordered_partition_list(self):
183 parts = self._partitions.keys() 268 parts = self._partitions.keys()
184 parts.sort() 269 parts.sort()
185 partlist = [] 270 partlist = []
186 free_start, free_end = self.get_free_space(0) 271 tmppart = None
187 tmppart = None
188 tmppart_log = None 272 tmppart_log = None
189 for part in parts: 273 for part in parts:
190 if part > 4: break 274 if archinfo[self._arch]['extended'] and part > Decimal("4.1"): break
191 tmppart = self._partitions[part] 275 tmppart = self._partitions[part]
192 if free_end < tmppart.get_start() and not free_start == -1:
193 partlist.append("Free Space (" + str(free_start) + "-" + str(free_end) + ")")
194 free_start, free_end = self.get_free_space(free_end)
195 newitem = self._device + str(part) + ": " + str(tmppart.get_start()) + "-" + str(tmppart.get_end())
196 if tmppart.is_extended(): newitem = newitem + " extended"
197 partlist.append(newitem) 276 partlist.append(part)
198 if tmppart.is_extended(): 277 if tmppart.is_extended():
199 for part_log in parts: 278 for part_log in parts:
200 if part_log < 5: continue 279 if part_log < Decimal("4.9"): continue
201 tmppart_log = self._partitions[part_log] 280 tmppart_log = self._partitions[part_log]
202 if free_end < tmppart_log.get_start() and free_end <= tmppart.get_end() and not free_start == -1:
203 partlist.append("Free Space (" + str(free_start) + "-" + str(free_end) + ")")
204 free_start, free_end = self.get_free_space(free_end)
205 newitem = self._device + str(part_log) + ": " + str(tmppart_log.get_start()) + "-" + str(tmppart_log.get_end()) + " logical"
206 partlist.append(newitem) 281 partlist.append(part_log)
207 if ((tmppart_log == None) or (free_start > tmppart_log.get_end())) and free_start < tmppart.get_end():
208 partlist.append("Free Space (" + str(free_start) + "-" + str(free_end) + ") logical")
209 free_start, free_end = self.get_free_space(free_end)
210 if (tmppart == None) or (free_start > tmppart.get_end()):
211 partlist.append("Free Space (" + str(free_start) + "-" + str(free_end) + ")")
212 return partlist 282 return partlist
213 283
214 def get_install_profile_structure(self): 284 def get_install_profile_structure(self):
215 devdic = {} 285 devdic = {}
216 for part in self._partitions: 286 for part in self._partitions:
217 tmppart = self._partitions[part] 287 tmppart = self._partitions[part]
218 devdic[part] = { 'mb': 0, 'minor': int(part), 'start': tmppart.get_start(), 'end': tmppart.get_end(), 'type': tmppart.get_type(), 'mountpoint': tmppart.get_mountpoint(), 'mountopts': tmppart.get_mountopts(), 'format': tmppart.get_format() } 288 devdic[part] = { 'mb': tmppart.get_mb(), 'minor': float(part), 'origminor': tmppart.get_orig_minor(), 'start': tmppart.get_start(), 'end': tmppart.get_end(), 'type': tmppart.get_type(), 'mountpoint': tmppart.get_mountpoint(), 'mountopts': tmppart.get_mountopts(), 'format': tmppart.get_format() }
219 return devdic 289 return devdic
220 290
221 def get_extended_partition(self): 291 def get_extended_partition(self):
222 for part in self._partitions: 292 for part in self._partitions:
223 tmppart = self._partitions[part] 293 tmppart = self._partitions[part]
238 return int(self._geometry['cylinders']) 308 return int(self._geometry['cylinders'])
239 309
240 def get_drive_bytes(self): 310 def get_drive_bytes(self):
241 return int(self._total_bytes) 311 return int(self._total_bytes)
242 312
313 def get_total_mb(self):
314 return self._total_mb
315
243 def get_partitions(self): 316 def get_partitions(self):
244 return self._partitions 317 return self._partitions
245 318
246 def print_partitions(self): 319# def print_partitions(self):
247 for part in self._partitions.keys(): 320# for part in self._partitions.keys():
248 print self._partitions[part].return_info() 321# print self._partitions[part].return_info()
249 322
250 def print_geometry(self): 323 def print_geometry(self):
251 print self._total_bytes, self._geometry 324 print self._total_bytes, self._geometry
252 325
253 def _error(self, message): 326 def _error(self, message):
280 353
281class Partition: 354class Partition:
282 "Class representing a single partition within a Device object" 355 "Class representing a single partition within a Device object"
283 356
284 _device = None 357 _device = None
285 _minor = None 358 _minor = 0
286 _bootflag = None 359 _orig_minor = 0
287 _start = None 360 _start = 0
288 _end = None 361 _end = 0
289 _blocks = None
290 _type = None 362 _type = None
291 _mountpoint = None 363 _mountpoint = None
292 _mountopts = None 364 _mountopts = None
293 _format = None 365 _format = None
294 _resizeable = None 366 _resizeable = None
295 _min_sectors_for_resize = 0 367 _min_sectors_for_resize = 0
368 _mb = 0
296 369
297 def __init__(self, device, minor, bootflag, start, end, blocks, type, mountpoint='', mountopts='', format=True, existing=False): 370 def __init__(self, device, minor, mb, start, end, type, mountpoint='', mountopts='', format=True, existing=False):
298 self._device = device 371 self._device = device
299 self._minor = int(minor) 372 self._minor = float(minor)
300 self._bootflag = bootflag 373 if existing: self._orig_minor = int(minor)
301 self._start = int(start) 374 self._start = int(start)
302 self._end = int(end) 375 self._end = int(end)
303 self._blocks = int(blocks)
304 if type == "": type = "unknown" 376 self._type = type or "unknown"
305 self._type = type
306 self._mountpoint = mountpoint 377 self._mountpoint = mountpoint
307 self._mountopts = mountopts 378 self._mountopts = mountopts
308 self._format = format 379 self._format = format
309 if blocks == 0: 380 self._mb = mb
310 self._blocks = ((self._end - self._start) * self._device.get_cylinder_size()) / 512
311 if existing: 381 if existing:
382 self._orig_minor = self._minor
312 parted_part = device._parted_disk.get_partition(minor) 383 parted_part = device._parted_disk.get_partition(minor)
384 label_type = device._parted_disk.type.name
385 if label_type == "loop":
386 dev_node = device._device
387 else:
388 dev_node = device._device + str(minor)
313 if type == "ntfs": 389 if type == "ntfs":
314 min_bytes = int(commands.getoutput("ntfsresize -f --info " + device._device + str(minor) + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'")) 390 min_bytes = int(commands.getoutput("ntfsresize -f --info " + dev_node + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'"))
315 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1 391 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1
316 self._resizeable == True 392 self._resizeable == True
317 elif type == "ext2" or type == "ext3": 393 elif type == "ext2" or type == "ext3":
318 block_size = string.strip(commands.getoutput("dumpe2fs -h " + device._device + str(minor) + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'")) 394 block_size = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'"))
319 free_blocks = string.strip(commands.getoutput("dumpe2fs -h " + device._device + str(minor) + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'")) 395 free_blocks = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'"))
320 free_sec = int(int(block_size) * int(free_blocks) / self._device._sector_bytes) 396 free_sec = int(int(block_size) * int(free_blocks) / self._device._sector_bytes)
321 free_sec = free_sec - 2000 # just to be safe 397 free_sec = free_sec - 2000 # just to be safe
322 self._min_sectors_for_resize = (self._end - self._start + 1) - free_sec 398 self._min_sectors_for_resize = (self._end - self._start + 1) - free_sec
323 self._resizeable == True 399 self._resizeable == True
324 else: 400 else:
325 parted_part = self._device._parted_disk.get_partition(self._minor) 401 parted_part = self._device._parted_disk.get_partition(int(self._minor))
326 try: 402 try:
327 parted_fs = parted_part.geom.file_system_open() 403 parted_fs = parted_part.geom.file_system_open()
328 except: 404 except:
329 self._resizeable = False 405 self._resizeable = False
330 return 406 return
339 return True 415 return True
340 else: 416 else:
341 return False 417 return False
342 418
343 def is_logical(self): 419 def is_logical(self):
344 part = self._device.get_partition_at(self._start, ignore_extended=0) 420 if self._type == "free":
345 if part and self._device._partitions[part].is_extended() and not part == self._minor: 421 if int(self._minor) + Decimal("0.9") == Decimal(str(self._minor)):
422 return True
423 else:
424 return False
425 elif archinfo[self._device._arch]['extended'] and self._minor > 4:
346 return True 426 return True
427 else:
347 return False 428 return False
348 429
349 def get_logicals(self): 430 def get_logicals(self):
350 if not self.is_extended(): 431 if not self.is_extended():
351 return None 432 return None
352 logicals = [] 433 logicals = []
377 self._blocks = ((self._end - self._start) * self._device.get_cylinder_size()) / 512 458 self._blocks = ((self._end - self._start) * self._device.get_cylinder_size()) / 512
378 459
379 def get_end(self): 460 def get_end(self):
380 return int(self._end) 461 return int(self._end)
381 462
463 def get_mb(self):
464 return int(self._mb)
465
466 def set_mb(self, mb):
467 self._mb = int(mb)
468
382 def set_type(self, type): 469 def set_type(self, type):
383 self._type = type 470 self._type = type
384 471
385 def get_type(self): 472 def get_type(self):
386 return self._type 473 return self._type
387 474
388 def get_device(self): 475 def get_device(self):
389 return self._device 476 return self._device
390 477
391 def set_minor(self, minor): 478 def set_minor(self, minor):
392 self._minor = int(minor) 479 self._minor = float(minor)
393 480
394 def get_minor(self): 481 def get_minor(self):
395 return int(self._minor) 482 return float(self._minor)
483
484 def set_orig_minor(self, orig_minor):
485 self._orig_minor = int(orig_minor)
486
487 def get_orig_minor(self):
488 return self._orig_minor
396 489
397 def set_mountpoint(self, mountpoint): 490 def set_mountpoint(self, mountpoint):
398 self._mountpoint = mountpoint 491 self._mountpoint = mountpoint
399 492
400 def get_mountpoint(self): 493 def get_mountpoint(self):

Legend:
Removed from v.313  
changed lines
  Added in v.497

  ViewVC Help
Powered by ViewVC 1.1.20