GETDISKBYNAME(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

🌸 NAME 🌸

bestie, welcome to the getdiskbyname(3) page β€” it's from the Library Functions Manual, and it's literally about this:

getdiskbyname β€” get generic disk description by its name 🫢


πŸ’– LIBRARY πŸ’–

Standard C Library (libc, -lc) ✨


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's the summoning spell, copy it exactly:

#include <sys/disklabel.h>

struct disklabel *
getdiskbyname(const char *name);

πŸ¦‹ DESCRIPTION πŸ¦‹

so getdiskbyname() takes a disk name β€” like rm03 β€” and returns a prototype disk label describing its geometry information and the standard disk partition tables πŸ’…βœ¨. that's the whole vibe.

all of that info is obtained from the disktab(5) file, no cap πŸ“πŸ’–


🌈 SEE ALSO 🌈

go read these too, bestie:


πŸ‘‘ HISTORY πŸ‘‘

getdiskbyname() appeared in 4.3BSD ⭐ iconic origin story, honestly.


and that's the tea πŸ“: this page is from Debian, dated June 4, 1993 β€” mwah πŸ’‹

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms