📄 x173.html
字号:
<!DOCTYPE HTML PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"><HTML><HEAD><TITLE>USB Device Filesystem</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet"><LINKREL="HOME"TITLE="The Linux USB sub-system"HREF="book1.html"><LINKREL="UP"TITLE="How to get USB devices working under Linux"HREF="c122.html"><LINKREL="PREVIOUS"TITLE="How to get USB devices working under Linux"HREF="c122.html"><LINKREL="NEXT"TITLE="USB Human Interface Device (HID) Configuration"HREF="x194.html"></HEAD><BODY><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The Linux USB sub-system</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="c122.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 2. How to get USB devices working under Linux</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x194.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN173">USB Device Filesystem</A></H1><P>The USB device filesystem is a dynamically generated filesystem, similar tothe <TTCLASS="FILENAME">/proc</TT> filesystem. This filesystem can be mountedjust about anywhere, however it is customarily mounted on<TTCLASS="FILENAME">/proc/bus/usb</TT>,which is an entry node created by the USB code, intended to be used as amount point for this system. Mounting in other locations may breakuser space utilities, but should not affect the kernel support.</P><P>You need to select "Preliminary USB Device Filesystem" to make this work.You also need to enable general <TTCLASS="FILENAME">/proc</TT> support, andto have it mounted (normally automatic).</P><P>To mount the filesystem, you need to be root. Use the mountcommand: <TTCLASS="USERINPUT"><B>mount -t usbdevfs none /proc/bus/usb</B></TT>.Note that the <TTCLASS="USERINPUT"><B>none</B></TT> keyword is arbitrary - youcan use anything, and some people prefer to use <TTCLASS="USERINPUT"><B>usbdevfs</B></TT>, as it makes the mount output look better.</P><P>If you do not want to have to mount the filesystem each time you rebootthe system, you can add the following to <TTCLASS="FILENAME">/etc/fstab</TT>after the <TTCLASS="FILENAME">/proc</TT> entry:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="SCREEN">none /proc/bus/usb usbdevfs defaults 0 0</PRE></TD></TR></TABLE>This has the same effect as the mount command.</P><P>After you have mounted the filesystem, the contents of<TTCLASS="FILENAME">/proc/bus/usb</TT> should look something like:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="SCREEN">dr-xr-xr-x 1 root root 0 Jan 26 10:40 001-r--r--r-- 1 root root 0 Jan 26 10:40 devices-r--r--r-- 1 root root 0 Jan 26 10:40 drivers</PRE></TD></TR></TABLE>.You may have more than one numbered directory entry if your machinehas more than one universal serial bus controller.</P><P>Full interpretation of the <TTCLASS="FILENAME">devices</TT> and<TTCLASS="FILENAME">drivers</TT> files is provided later in this guide, in theuser's section. The numbered entries are machine readable, but are notusually of any use to a user.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="c122.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x194.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">How to get USB devices working under Linux</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="c122.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">USB Human Interface Device (HID) Configuration</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -