HUGETLBFS_TEST_PATH(3)

✨ NAME ✨

hugetlbfs_test_path β€” bestie, this is the girl who tells you whether a mount point is hugetlbfs or not πŸ’…


🌸 SYNOPSIS 🌸

#include <hugetlbfs.h>

int hugetlbfs_test_path(const char *mount);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. The hugetlbfs_test_path() function is literally just doing a vibe check on a pathname β€” it figures out whether that given pathname lives inside a hugetlbfs filesystem or not. That's it. That's the whole job. She's not complicated, she just knows things πŸ’–


πŸŽ€ RETURN VALUE πŸŽ€

So here's the tea on what she hands back to you:

  • 1 β€” slay, it is a hugetlbfs filesystem ✨
  • 0 β€” nope, it's a non-hugetlbfs filesystem πŸ™ˆ
  • -1 β€” it went wrong 😭 and errno gets set appropriately, so go check on her

πŸ’€ ERRORS πŸ’€

Not me listing them all out here β€” please go peek at statfs(3) for the possible values of errno, that's where the whole saga lives. πŸ‘‘


🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list. Group project energy, but like, the iconic kind 🫢


k bye bestie, mwah πŸ’‹ this page came from the Library Functions Manual and the original was dated March 7, 2012 β€” yeah she's an elder but she still ate πŸ”₯