MCPcopy
hub / github.com/corpnewt/gibMacOS / get_efi

Method get_efi

Scripts/disk.py:322–333  ·  view source on GitHub ↗
(self, disk)

Source from the content-addressed store, hash-verified

320 return None
321
322 def get_efi(self, disk):
323 disk_id = self.get_parent(self.get_identifier(disk))
324 if not disk_id:
325 return None
326 # At this point - we should have the parent
327 for d in self.disks["AllDisksAndPartitions"]:
328 if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
329 # Found our disk
330 for p in d.get("Partitions", []):
331 if p.get("Content", "").lower() == "efi":
332 return p.get("DeviceIdentifier", None)
333 return None
334
335 def mount_partition(self, disk):
336 disk_id = self.get_identifier(disk)

Callers 1

_get_physical_diskMethod · 0.95

Calls 2

get_parentMethod · 0.95
get_identifierMethod · 0.95

Tested by

no test coverage detected