mei_minor_get(9)
π mei_minor_get(9) β from the Kernel API Manual, bestie β¨
Okay so we're in the Kernel API Manual today and the page is literally mei_minor_get(9) β say that three times fast, I dare you π«Ά
πΈ NAME πΈ
mei_minor_get β obtain next free device minor number. That's it, that's the whole vibe: it goes and finds you a minor number that nobody's using yet. Scavenger hunt but make it kernel π
β¨ SYNOPSIS β¨
int mei_minor_get (struct mei_device *dev );
Bestie, that's the whole signature, copy it exactly, no cap π
π¦ ARGUMENTS π¦
devβ device pointer. Just your regular old pointer to the device, nothing weird, nothing extra π
β RETURN β
It hands you back the allocated minor. That's the good ending π
But if there's no free minor left? You get -ENOSPC. Yep. Not your fave, but it is what it is π
Lowkey important: the return value is either the allocated minor or -ENOSPC. Check it, bestie, don't just assume it slayed π
π SEE ALSO π
Kernel file ./drivers/misc/mei/main.c plus literally the whole friend group:
mei_open(9)mei_cl_vtag_remove_by_fp(9)mei_release(9)mei_read(9)mei_cl_vtag_by_fp(9)mei_write(9)mei_ioctl_connect_client(9)mei_vt_support_check(9)mei_ioctl_connect_vtag(9)mei_ioctl_client_notify_request(9)mei_ioctl_client_notify_get(9)mei_ioctl(9)mei_poll(9)mei_cl_is_write_queued(9)mei_fsync(9)mei_fasync(9)trc_show(9)fw_status_show(9)hbm_ver_show(9)hbm_ver_drv_show(9)fw_ver_show(9)dev_state_show(9)mei_set_devstate(9)kind_show(9)mei_minor_free(9)
All of them, in order, no skips π (iykyk β you will be clicking through half of these at 2am, sorry not sorry π)
Sign-off era: this iconic little page lives under ./drivers/misc/mei, dated October 2026, and it's filed as mei_minor_get(9) β periodt ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms