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

Diff of /trunk/src/GLIStorageDevice.py

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

Revision 113 Revision 115
298 if type == "ntfs": 298 if type == "ntfs":
299 min_bytes = int(commands.getoutput("ntfsresize --info " + device._device + str(minor) + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'")) 299 min_bytes = int(commands.getoutput("ntfsresize --info " + device._device + str(minor) + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'"))
300 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1 300 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1
301 self._resizeable == True 301 self._resizeable == True
302 elif type == "ext2" or type == "ext3": 302 elif type == "ext2" or type == "ext3":
303 commands.system("mkdir /mnt/freespace; mount " + device._device + str(minor) + " /mnt/freespace") 303 commands.getstatus("mkdir /mnt/freespace; mount " + device._device + str(minor) + " /mnt/freespace")
304 min_bytes = int(commands.getoutput("df -B kB " + device._device + str(minor) + " | tail -n 1 | sed -e 's:^" + device._device + str(minor) + "\s\+[0-9]\+kB\s\+::' -e 's:kB\s.\+::'")) * 1000 304 min_bytes = int(commands.getoutput("df -B kB " + device._device + str(minor) + " | tail -n 1 | sed -e 's:^" + device._device + str(minor) + "\s\+[0-9]\+kB\s\+::' -e 's:kB\s.\+::'")) * 1000
305 commands.system("umount /mnt/freespace; rm -rf /mnt/freespace") 305 commands.getstatus("umount /mnt/freespace; rm -rf /mnt/freespace")
306 min_bytes = min_bytes + (100 * 1024 * 1024) # Add 100M just to be safe 306 min_bytes = min_bytes + (100 * 1024 * 1024) # Add 100M just to be safe
307 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1 307 self._min_cylinders_for_resize = int(min_bytes / self._device._cylinder_bytes) + 1
308 self._resizeable == True 308 self._resizeable == True
309 elif type == "fat16" or type == "fat32": 309 elif type == "fat16" or type == "fat32":
310 parted_part = self._device._parted_disk.get_partition(self._minor) 310 parted_part = self._device._parted_disk.get_partition(self._minor)

Legend:
Removed from v.113  
changed lines
  Added in v.115

  ViewVC Help
Powered by ViewVC 1.1.20