Ejemplo n.º 1
0
 def select_disk(disk):
     self.selected_disk = disk
     self.pardus_device = diskutils.parseLinuxDevice(disk[0])
     self.other_devices = diskutils.getDeviceMap()
     self.selected_disk_info = "Selected Pardus disk : %s label: %s "\
            % (self.selected_disk[0],self.selected_disk[1])
     self.sop_screen()
Ejemplo n.º 2
0
def get_windows_partitions():

    windows_partitions = []
    device_list = diskutils.getDeviceMap()

    for i in device_list:
        device = parted.PedDevice.get(i[1])
        disk = parted.PedDisk.new(device)
        path = disk.next_partition()
        while path:
            if path.fs_type:
                if path.fs_type.name in ("ntfs", "fat32"):
                    if is_windows("%s%d" % (i[1], path.num), path.fs_type.name):
                        windows_partitions.append([i[1], path.num,
                          path.fs_type.name, "%s%d" % (i[1], path.num)])
            path = disk.next_partition(path)

    return windows_partitions
Ejemplo n.º 3
0
def get_windows_partitions():

    windows_partitions = []
    device_list = diskutils.getDeviceMap()

    for i in device_list:
        device = parted.PedDevice.get(i[1])
        disk = parted.PedDisk.new(device)
        path = disk.next_partition()
        while path:
            if path.fs_type:
                if path.fs_type.name in ("ntfs", "fat32"):
                    if is_windows("%s%d" % (i[1], path.num),
                                  path.fs_type.name):
                        windows_partitions.append([
                            i[1], path.num, path.fs_type.name,
                            "%s%d" % (i[1], path.num)
                        ])
            path = disk.next_partition(path)

    return windows_partitions