Page MenuHomeFreeBSD

Create aliases for xbd and vtbd to appropriate pages
Needs ReviewPublic

Authored by felix.the.red_gmail.com on Jul 2 2025, 11:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 6:47 PM
Unknown Object (File)
Sep 12 2025, 3:33 AM
Unknown Object (File)
Sep 12 2025, 12:16 AM
Unknown Object (File)
Sep 11 2025, 9:23 PM
Unknown Object (File)
Sep 11 2025, 7:39 AM
Unknown Object (File)
Sep 6 2025, 6:30 PM
Unknown Object (File)
Aug 25 2025, 4:58 PM
Unknown Object (File)
Aug 14 2025, 7:19 PM
Subscribers

Details

Reviewers
None
Group Reviewers
manpages
Summary

share/man/man4/virtio_blk.4: Add vtbd to the list of .Nm macros
share/man/man4/xbd.4: New file, redirects to xen(4).

From the original PR:
Most device drivers have a man page. Type "man ed" and you get a page.
That's not true for vtbd and xbd.
Seems these should alias to virtio_blk(4) and xen(4) if nothing else?
Or they need a man page?

PR:221365

Test Plan

Although mandoc -Tlint had some warnings, I noticed the output changed when I fixed them.
This commit does not fix lint errors.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

To do what you're trying to do, you actually want to use the Makefile for this like I showed you in sched_getaffinity.3. As far as "is this the right approach", I am not familiar with the underlying topics to know.

For xbd is xen block device, implemented in xen(4) (sys/dev/xen/blkfront).
I could use the alias file like in the commit, or I could create a short manual page.
Maybe stub page for Xen netfront (shows up as xnN) as well?
I would like to know what to do in this situation.

Example manual page, doesn't say much:
.Dd July 1, 2025
.Dt XBD 4
.Os
.Sh NAME
.Nm xbd
.Nd Xen paravirtualized block device frontend driver
.Sh DESCRIPTION
The
.Nm
driver provides support for block devices presented to a Xen guest via the
.Xr xen 4
virtual I/O framework.
These devices appear as
.Pa /dev/xbd0 ,
.Pa /dev/xbd1 ,
etc.
.Sh SEE ALSO
.Xr xen 4 ,
.Xr camcontrol 8 ,
.Xr diskinfo 8

I think a stub manual is great, I write them all the time when it's the only information I have. It's better than nothing and gives people something to build off further.

I think .so is to be avoided at all costs. However, you can link to xen instead, but using .so is incorrect, if you want to do that you need to use the Makefile.