def write_kobj_otype_output(fp):
    fp.write('/* Core kernel objects */\n')
    for (kobj, obj_info) in kobjects.items():
        (dep, _) = obj_info
        if (kobj == 'device'):
            continue
        if dep:
            fp.write(('#ifdef %s\n' % dep))
        fp.write(('case %s: ret = "%s"; break;\n' % (kobject_to_enum(kobj), kobj)))
        if dep:
            fp.write('#endif\n')
    fp.write('/* Driver subsystems */\n')
    for subsystem in subsystems:
        subsystem = subsystem.replace('_driver_api', '')
        fp.write(('case K_OBJ_DRIVER_%s: ret = "%s driver"; break;\n' % (subsystem.upper(), subsystem)))
def write_kobj_otype_output(fp):
    fp.write('/* Core kernel objects */\n')
    for (kobj, obj_info) in kobjects.items():
        (dep, _) = obj_info
        if (kobj == 'device'):
            continue
        if dep:
            fp.write(('#ifdef %s\n' % dep))
        fp.write(('case %s: ret = "%s"; break;\n' % (kobject_to_enum(kobj), kobj)))
        if dep:
            fp.write('#endif\n')
    fp.write('/* Driver subsystems */\n')
    for subsystem in subsystems:
        subsystem = subsystem.replace('_driver_api', )
        fp.write(('case K_OBJ_DRIVER_%s: ret = "%s driver"; break;\n' % (subsystem.upper(), subsystem)))