obj: add header-offset field to object_type
this allows the object header to be placed anywhere within the larger object structure. the object system now also ensures that the object is zero-initialised during allocation.
This commit is contained in:
@@ -34,6 +34,7 @@ static kern_status_t kext_destroy(struct object *obj)
|
||||
static struct object_type kext_type = {
|
||||
.ob_name = "kext",
|
||||
.ob_size = sizeof(struct kext),
|
||||
.ob_header_offset = offsetof(struct kext, k_base),
|
||||
.ob_ops = {
|
||||
.query_name = kext_query_name,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user