d_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

d_path β€” return the path of a dentry πŸ›£οΈβœ¨

(hi bestie, this is d_path(9) from the Kernel API Manual β€” we're gonna get you fluent, fr fr πŸ’…)

✨ SYNOPSIS ✨

char * d_path (const struct path *path , char *buf , int buflen );

πŸŽ€ ARGUMENTS πŸŽ€

  • path β€” path to report πŸ›£οΈ
  • buf β€” buffer to return value in πŸ“₯
  • buflen β€” buffer length πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so d_path converts a dentry into an ASCII path name ✨. if the entry has been deleted, the string " (deleted)" gets appended β€” and the manpage literally says note that this is ambiguous πŸ™ˆ. that's not us being vague, that's the actual warning, bestie.

it returns a pointer into the buffer, or an error code if the path was too long 😭. important: callers should use the returned pointer, not the passed-in buffer, to use the name! fr fr. the implementation often starts at an offset into the buffer, and may leave 0 bytes at the start πŸ’€.

also buflen should be positive β€” periodt πŸ‘‘.

🌈 SEE ALSO 🌈

Kernel file ./fs/d_path.c β€” also peep prepend_name(9), prepend_path(9), and __d_path(9) 🫢


stay iconic, bestie πŸ’– β€” source ./fs, dated October 2026, page d_path(9) πŸŽ€

πŸ“¦ where this page comes from