mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-11-11 09:57:53 +08:00
19 lines
318 B
Python
19 lines
318 B
Python
import ctypes
|
|
|
|
|
|
BLKSSZGET = 0x1268
|
|
BLKGETSIZE64 = 0x80081272
|
|
HDIO_GETGEO = 0x0301
|
|
|
|
|
|
class HDGeometry(ctypes.Structure):
|
|
_fields_ = [
|
|
("heads", ctypes.c_ubyte),
|
|
("sectors", ctypes.c_ubyte),
|
|
("cylinders", ctypes.c_ushort),
|
|
("start", ctypes.c_ulong),
|
|
]
|
|
|
|
|
|
assert(ctypes.sizeof(HDGeometry()) == 16)
|