Review, suggests, help for linsysfs man page

Doug Ambrisko ambrisko at ambrisko.com
Thu May 4 19:24:17 UTC 2006


I started a man page for linsysfs which is another Linux procfs like
compat file-system.  The file-system on one of my machines looks like:

%ls -lR sys
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 class
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 devices

sys/class:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 scsi_host

sys/class/scsi_host:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 host0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 host1

sys/class/scsi_host/host0:
total 0
lr--r--r--  1 root  wheel  0 May  4 13:16 device -> ../../../devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:0e.0/host0
-r--r--r--  1 root  wheel  0 May  4 13:16 proc_name

sys/class/scsi_host/host1:
total 0
lr--r--r--  1 root  wheel  0 May  4 13:16 device -> ../../../devices/pci0000:00/0000:00:1f.1/host1
-r--r--r--  1 root  wheel  0 May  4 13:16 proc_name

sys/devices:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 pci0000:00

sys/devices/pci0000:00:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:00.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:02.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:03.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:04.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:05.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:06.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:07.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:10.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:10.1
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:10.2
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:11.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:13.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:15.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:16.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1c.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1d.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1d.1
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1d.2
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1d.7
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1e.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1f.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:00:1f.1

sys/devices/pci0000:00/0000:00:00.0:
total 0

sys/devices/pci0000:00/0000:00:02.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:06:00.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:06:00.3

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:07:00.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:07:01.0

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.0/0000:07:00.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:08:00.0

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.0/0000:07:00.0/0000:08:00.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:09:00.0

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.0/0000:07:00.0/0000:08:00.0/0000:09:00.0:
total 0

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.0/0000:07:01.0:
total 0

sys/devices/pci0000:00/0000:00:02.0/0000:06:00.3:
total 0

sys/devices/pci0000:00/0000:00:03.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:01:00.0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:01:00.2

sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:02:0e.0

sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:0e.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 host0

sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:0e.0/host0:
total 0

sys/devices/pci0000:00/0000:00:03.0/0000:01:00.2:
total 0

sys/devices/pci0000:00/0000:00:04.0:
total 0

sys/devices/pci0000:00/0000:00:05.0:
total 0

sys/devices/pci0000:00/0000:00:06.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:0e:00.0

sys/devices/pci0000:00/0000:00:06.0/0000:0e:00.0:
total 0

sys/devices/pci0000:00/0000:00:07.0:
total 0

sys/devices/pci0000:00/0000:00:10.0:
total 0

sys/devices/pci0000:00/0000:00:10.1:
total 0

sys/devices/pci0000:00/0000:00:10.2:
total 0

sys/devices/pci0000:00/0000:00:11.0:
total 0

sys/devices/pci0000:00/0000:00:13.0:
total 0

sys/devices/pci0000:00/0000:00:15.0:
total 0

sys/devices/pci0000:00/0000:00:16.0:
total 0

sys/devices/pci0000:00/0000:00:1c.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:04:00.0

sys/devices/pci0000:00/0000:00:1c.0/0000:04:00.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:05:00.0

sys/devices/pci0000:00/0000:00:1c.0/0000:04:00.0/0000:05:00.0:
total 0

sys/devices/pci0000:00/0000:00:1d.0:
total 0

sys/devices/pci0000:00/0000:00:1d.1:
total 0

sys/devices/pci0000:00/0000:00:1d.2:
total 0

sys/devices/pci0000:00/0000:00:1d.7:
total 0

sys/devices/pci0000:00/0000:00:1e.0:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 0000:10:0d.0

sys/devices/pci0000:00/0000:00:1e.0/0000:10:0d.0:
total 0

sys/devices/pci0000:00/0000:00:1f.0:
total 0

sys/devices/pci0000:00/0000:00:1f.1:
total 0
dr-xr-xr-x  1 root  wheel  0 May  4 13:16 host1

sys/devices/pci0000:00/0000:00:1f.1/host1:
total 0

This is the minimum required to make LSI MegaCli Linux binary run on FreeBSD.

This is the man page I started copying the linprocfs.5 as the template:

.\" $FreeBSD$
.\" Written by Garrett Wollman
.\" This file is in the public domain.
.\"
.Dd August 10, 1994
.Dt LINSYSFS 5
.Os
.Sh NAME
.Nm linsysfs
.Nd Linux system file system
.Sh SYNOPSIS
.Bd -literal
linsys		/compat/linux/sys	linsysfs	rw 0 0
.Ed
.Sh DESCRIPTION
The Linux system file system, or
.Nm ,
emulates a subset of Linux' sys file system and is required for
the complete operation of some Linux binaries.
.Pp
The
.Nm
provides a two-level view of device.
At the highest level, PCI devices themselves are named, according to
their bus, slot and function in the system hierachy.  PCI storage
devices are list in the scsi_host class with a device sym-link to the
devices PCI directory.
.Pp
Each device node is a directory containing some files and directories:
.Bl -tag -width status
.It Pa host
A place holder for storage
.Pa host
information.
.It Pa pci_id
A directory for the
.Pa pci_id
that contains either the device information or another directory structure
for a PCI bridge.
.El
.Pp
Each host node of scsi_host is a directory containing some files and directories:
.Bl -tag -width proc_name
.It Pa proc_name
The Linux registered driver name for this devices.
.It Pa device
A sym-link to the PCI
.Pa device
directory.
.El
.Sh FILES
.Bl -tag -width /compat/linux/sys/devices/pci0000:00 -compact
.It Pa /compat/linux/sys
The normal mount point for the
.Nm .
.It Pa /compat/linux/sys/class/scsi_host
The storage host node.
.It Pa /compat/linux/sys/devices/pci0000:00
The PCI device hierachy node.
.El
.Sh SEE ALSO
.Xr mount 2 ,
.Xr unmount 2 ,
.Xr procfs 5 ,
.Xr pseudofs 9
.Sh HISTORY
The
.Nm
first appeared in
.Fx 7.0 .
.Sh AUTHORS
.An -nosplit
The
.Nm
was derived from
.Nm linprocfs
by
.An Doug Ambrisko.
This manual page was editted by
.An Doug Ambrisko ,
based on the
.Xr linprocfs 5
manual page by
.An Garrett Wollman .

Please show me the error of my ways :-)  This file system, the changes to
the the Linux emulator and the mfi(4) driver will let us configure an LSI 
SAS RAID card via FreeBSD.

Thanks,

Doug A.



More information about the freebsd-doc mailing list