uclogic_par...ith_opt_desc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… uclogic_par...ith_opt_desc(9) β€” like, the Kernel API Manual, but make it make sense ✨

okay bestie, so this one lives in the Kernel API Manual and its whole vibe is: initialize tablet interface parameters with an optional replacement report descriptor. and the tiny little plot twist? It only touches the report descriptor if the original one matches the expected size πŸŽ€ like, it does a vibe check on the size first, no cap.


🌸 NAME 🌸

uclogic_params_init_with_opt_desc β€” initialize tablet interface parameters with an optional replacement report descriptor. It only modifies the report descriptor if the original report descriptor matches the expected size. periodt πŸ’…


✨ SYNOPSIS ✨

int uclogic_params_init_with_opt_desc (struct uclogic_params *params ,
struct hid_device *hdev , unsigned int orig_desc_size , const __u8
*desc_ptr , unsigned int desc_size );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • params β€” the parameters you're initializing, bestie. (heads up: these get cleaned with uclogic_params_cleanup.) If something goes wrong it's not modified, so no half-done mess πŸ™ˆ and it cannot be NULL, fr fr.
  • hdev β€” the HID device of the tablet interface you're creating the parameters for. also cannot be NULL πŸ’€
  • orig_desc_size β€” the expected size of the original report descriptor that's getting replaced. like the bouncer checking IDs at the door πŸ‘‘
  • desc_ptr β€” pointer to the replacement report descriptor. it can be NULL, but only if desc_size is zero. them's the rules 🀝
  • desc_size β€” size of the replacement report descriptor. literally that's it πŸ’–

πŸ”₯ RETURN πŸ”₯

  • Zero β€” slay, it worked, successful ✨
  • -EINVAL β€” an invalid argument was passed 😭
  • -ENOMEM β€” failed to allocate memory, tragic, the malloc said no πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/hid/hid-uclogic-params.c β€” go read it, it's giving main character energy 🫢

and the whole friend group:

uclogic_params_pen_inrange_to_str(9), uclogic_params_pen_hid_dbg(9), uclogic_params_frame_hid_dbg(9), uclogic_params_hid_dbg(9), uclogic_params_get_str_desc(9), uclogic_params_pen_cleanup(9), uclogic_params_pen_init_v1(9), uclogic_params_get_le24(9), uclogic_params_pen_init_v2(9), uclogic_params_frame_cleanup(9), uclogic_params_frame_init_with_desc(9), uclogic_params_frame_init_v1(9), uclogic_params_cleanup_event_hooks(9), uclogic_params_cleanup(9), uclogic_params_get_desc(9), uclogic_params_init_invalid(9), uclogic_params_huion_init(9), uclogic_probe_interface(9), uclogic_params_parse_ugee_v2_desc(9), uclogic_params_ugee_v2_init_frame_buttons(9), uclogic_params_ugee_v2_init_frame_dial(9), uclogic_params_ugee_v2_init_frame_mouse(9), uclogic_params_ugee_v2_has_battery(9), uclogic_params_ugee_v2_init_battery(9), uclogic_params_ugee_v2_reconnect_work(9), uclogic_params_ugee_v2_init_event_hooks(9), uclogic_params_ugee_v2_init(9), uclogic_params_init(9)


okay that's the whole page, mwah πŸ’‹ this icon of a manpage comes to you from ./drivers/hid, dated October 2026 β€” drink some water, go touch grass, and remember: if the size doesn't match, the descriptor does NOT get replaced πŸŽ€πŸ’œ

πŸ“¦ where this page comes from