arch-image-builder/builder/disk/layout/ioctl.py
BigfootACA e6c6ab6bf7 Initial commit
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-17 23:04:34 +08:00

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)