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

Diff of /trunk/src/GLIStorageDevice.py

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

Revision 523 Revision 529
468 else: 468 else:
469 dev_node = device._device + str(minor) 469 dev_node = device._device + str(minor)
470 if type == "ntfs": 470 if type == "ntfs":
471 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 .\+//'")) 471 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 .\+//'"))
472 self._min_mb_for_resize = int(min_bytes / MEGABYTE) + 1 472 self._min_mb_for_resize = int(min_bytes / MEGABYTE) + 1
473 self._resizeable == True 473 self._resizeable = True
474 elif type == "ext2" or type == "ext3": 474 elif type == "ext2" or type == "ext3":
475 block_size = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'")) 475 block_size = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'"))
476 free_blocks = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'")) 476 free_blocks = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'"))
477 free_bytes = int(block_size * free_blocks) 477 free_bytes = int(block_size * free_blocks)
478 # can't hurt to pad (the +50) it a bit since this is really just a guess 478 # can't hurt to pad (the +50) it a bit since this is really just a guess
479 self._min_mb_for_resize = self._mb - int(free_bytes / MEGABYTE) + 50 479 self._min_mb_for_resize = self._mb - int(free_bytes / MEGABYTE) + 50
480 self._resizeable == True 480 self._resizeable = True
481 else: 481 else:
482 parted_part = self._device._parted_disk.get_partition(int(self._minor)) 482 parted_part = self._device._parted_disk.get_partition(int(self._minor))
483 try: 483 try:
484 parted_fs = parted_part.geom.file_system_open() 484 parted_fs = parted_part.geom.file_system_open()
485 except: 485 except:

Legend:
Removed from v.523  
changed lines
  Added in v.529

  ViewVC Help
Powered by ViewVC 1.1.20