pdcspath_hwpath_write(9)
β¨ pdcspath_hwpath_write(9) β¨
okay bestie, buckle up π
this is a page from the Kernel API Manual and it's all about pdcspath_hwpath_write β the little function that handles hardware path modifying. yes, that's literally its whole job and honestly? iconic.
π¦ SYNOPSIS π¦
ssize_t pdcspath_hwpath_write (struct pdcspath_entry *entry , const char
*buf , size_t count );
πΈ ARGUMENTS πΈ
entryβ an allocated and populatedpdscpath_entrystruct. (yes, spelled exactly like that in the original, no cap β don't come for me π)bufβ the input buffer we're reading from, the little source of truth π₯countβ how many bytes are gonna be read, fr fr
π DESCRIPTION π
so the way this works: we call this function when we want to change the current hardware path. simple as that, main character energy only β¨
hardware paths have to be given '/'-delimited, without brackets. write that down π
now here's the vibe check part β we do make sure the provided path actually maps to an existing device, BUT π nothing would stop some foolish user from setting the path to some PCI bridge or even a CPU... like, why would you do that. we can't stop you.
a better work around would be to make sure we're at the end of a device tree for instance, but that would be IMHO beyond the simple scope of that driver. the whole aim here is to provide a facility β data correctness is left to userland, bestie. we hand you the tool, you don't hurt yourself with it π«Ά
lowkey a "we provide the facility, you provide the common sense" situation π
π SEE ALSO π
kernel file ./drivers/parisc/pdc_stable.c and all these lovelies:
pdcspath_fetch(9)pdcspath_store(9)pdcspath_hwpath_read(9)pdcspath_layer_read(9)pdcspath_layer_write(9)pdcspath_attr_show(9)pdcspath_attr_store(9)pdcs_size_read(9)pdcs_auto_read(9)pdcs_autoboot_read(9)pdcs_autosearch_read(9)pdcs_timer_read(9)pdcs_osid_read(9)pdcs_osdep1_read(9)pdcs_diagnostic_read(9)pdcs_fastsize_read(9)pdcs_osdep2_read(9)pdcs_auto_write(9)pdcs_autoboot_write(9)pdcs_autosearch_write(9)pdcs_osdep1_write(9)pdcs_osdep2_write(9)pdcs_register_pathentries(9)pdcs_unregister_pathentries(9)
that's the whole page, and honestly it ate π this one lives over in ./drivers/parisc and it's dated October 2026 in the Kernel API Manual β so yeah, a little time-travel moment, we love that for us π bye bestie, go be normal about hardware paths π
π¦ 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