From 8966f617bf63bc8ce85ee4619aed1fd9183e5fe1 Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Wed, 17 Jun 2026 20:42:32 +1000 Subject: [PATCH] util: Document the VolBootable FSCTL The second argument of fsctl() is an IOCTL. If we use the naming convention in the publicly available XNU sources, it could hypothetically be called APFSIOC_VOL_BOOTABLE.... Signed-off-by: James Calligeros --- src/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util.py b/src/util.py index c68c57b..95db251 100644 --- a/src/util.py +++ b/src/util.py @@ -366,7 +366,8 @@ def fsctl_apfs_bootable(path, cmd): func.argtypes = (c_char_p, c_ulong, POINTER(c_int), c_uint) c_fsctl = func c_cmd = c_int(cmd) - err = c_fsctl(path.encode(), 0xc0044a57, byref(c_cmd), 0) + APFSIOC_VOL_BOOTABLE = 0xc0044a57 # _IOWR('J', 'W', int32_t) + err = c_fsctl(path.encode(), APFSIOC_VOL_BOOTABLE, byref(c_cmd), 0) if err == -1: raise Exception(f'fsctl call failed, errno: {get_errno()}') return c_cmd.value