- p = Partition(mountpoint = self.getAutofsMountpoint(device), description = description, force_mounted = True, device = device)
- self.partitions.append(p)
- self.on_partition_list_change("add", p)
+ if blacklisted:
+ print "blacklisted"
+ else:
+ if error:
+ print "error querying properties"
+ elif not medium_found:
+ print "no medium"
+ else:
+ print "ok, removable=%s, cdrom=%s, partitions=%s" % (removable, is_cdrom, partitions)
+
+ l = len(device)
+ if l:
+ # see if this is a harddrive
+ if not device[l-1].isdigit() and not removable and not is_cdrom:
+ self.hdd.append(Harddisk(device))
+ self.hdd.sort()
+ SystemInfo["Harddisk"] = len(self.hdd) > 0
+
+ if (not removable or medium_found) and not self.is_hard_mounted(device):
+ # device is the device name, without /dev
+ # physdev is the physical device path, which we (might) use to determine the userfriendly name
+ description = self.getUserfriendlyDeviceName(device, physdev)
+ p = Partition(mountpoint = self.getAutofsMountpoint(device), description = description, force_mounted = True, device = device)
+ self.partitions.append(p)
+ self.on_partition_list_change("add", p)