亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cdrom-standard.tex

?? Linux內核源代碼 為壓縮文件 是<<Linux內核>>一書中的源代碼
?? TEX
?? 第 1 頁 / 共 4 頁
字號:
\documentclass{article}\def\version{$Id: cdrom-standard.tex,v 1.9 1997/12/28 15:42:49 david Exp $}\newcommand{\newsection}[1]{\newpage\section{#1}}\evensidemargin=0pt\oddsidemargin=0pt\topmargin=-\headheight \advance\topmargin by -\headsep\textwidth=15.99cm \textheight=24.62cm % normal A4, 1'' margin\def\linux{{\sc Linux}}\def\cdrom{{\sc cd-rom}}\def\UCD{{\sc Uniform cd-rom Driver}}\def\cdromc{{\tt {cdrom.c}}}\def\cdromh{{\tt {cdrom.h}}}\def\fo{\sl}                    % foreign words\def\ie{{\fo i.e.}}\def\eg{{\fo e.g.}}\everymath{\it} \everydisplay{\it}\catcode `\_=\active \def_{\_\penalty100 }\catcode`\<=\active \def<#1>{{\langle\hbox{\rm#1}\rangle}}\begin{document}\title{A \linux\ \cdrom\ standard}\author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl}\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}}\date{12 March 1999}\maketitle\newsection{Introduction}\linux\ is probably the Unix-like operating system that supportsthe widest variety of hardware devices. The reasons for this arepresumably \begin{itemize} \item   The large list of hardware devices available for the many platforms  that \linux\ now supports (\ie, i386-PCs, Sparc Suns, etc.)\item   The open design of the operating system, such that anybody can write a  driver for \linux.\item   There is plenty of source code around as examples of how to write a driver.\end{itemize}The openness of \linux, and the many different types of availablehardware has allowed \linux\ to support many different hardware devices.Unfortunately, the very openness that has allowed \linux\ to supportall these different devices has also allowed the behavior of eachdevice driver to differ significantly from one device to another.This divergence of behavior has been very significant for \cdrom\devices; the way a particular drive reacts to a `standard' $ioctl()$call varies greatly from one device driver to another. To avoid makingtheir drivers totally inconsistent, the writers of \linux\ \cdrom\drivers generally created new device drivers by understanding, copying,and then changing an existing one. Unfortunately, this practice did notmaintain uniform behavior across all the \linux\ \cdrom\ drivers. This document describes an effort to establish Uniform behavior acrossall the different \cdrom\ device drivers for \linux. This document alsodefines the various $ioctl$s, and how the low-level \cdrom\ devicedrivers should implement them. Currently (as of the \linux\ 2.1.$x$development kernels) several low-level \cdrom\ device drivers, includingboth IDE/ATAPI and SCSI, now use this Uniform interface.When the \cdrom\ was developed, the interface between the \cdrom\ driveand the computer was not specified in the standards. As a result, manydifferent \cdrom\ interfaces were developed. Some of them had theirown proprietary design (Sony, Mitsumi, Panasonic, Philips), othermanufacturers adopted an existing electrical interface and changedthe functionality (CreativeLabs/SoundBlaster, Teac, Funai) or simplyadapted their drives to one or more of the already existing electricalinterfaces (Aztech, Sanyo, Funai, Vertos, Longshine, Optics Storage andmost of the `NoName' manufacturers). In cases where a new drive reallybrought its own interface or used its own command set and flow controlscheme, either a separate driver had to be written, or an existingdriver had to be enhanced. History has delivered us \cdrom\ support formany of these different interfaces. Nowadays, almost all new \cdrom\drives are either IDE/ATAPI or SCSI, and it is very unlikely that anymanufacturer will create a new interface. Even finding drives for theold proprietary interfaces is getting difficult.When (in the 1.3.70's) I looked at the existing software interface,which was expressed through \cdromh, it appeared to be a rather wildset of commands and data formats.\footnote{I cannot recollect whatkernel version I looked at, then, presumably 1.2.13 and 1.3.34---thelatest kernel that I was indirectly involved in.} It seemed that manyfeatures of the software interface had been added to accommodate thecapabilities of a particular drive, in an {\fo ad hoc\/} manner. Moreimportantly, it appeared that the behavior of the `standard' commandswas different for most of the different drivers: \eg, some driversclose the tray if an $open()$ call occurs when the tray is open, whileothers do not. Some drivers lock the door upon opening the device, toprevent an incoherent file system, but others don't, to allow softwareejection. Undoubtedly, the capabilities of the different drives vary,but even when two drives have the same capability their drivers'behavior was usually different.I decided to start a discussion on how to make all the \linux\ \cdrom\drivers behave more uniformly. I began by contacting the developers ofthe many \cdrom\ drivers found in the \linux\ kernel. Their reactionsencouraged me to write the \UCD\ which this document is intended todescribe. The implementation of the \UCD\ is in the file \cdromc. Thisdriver is intended to be an additional software layer that sits on topof the low-level device drivers for each \cdrom\ drive. By adding thisadditional layer, it is possible to have all the different \cdrom\devices behave {\em exactly\/} the same (insofar as the underlyinghardware will allow).The goal of the \UCD\ is {\em not\/} to alienate driver developers whohave not yet taken steps to support this effort. The goal of \UCD\ issimply to give people writing application programs for \cdrom\ drives{\em one\/} \linux\ \cdrom\ interface with consistent behavior for all\cdrom\ devices. In addition, this also provides a consistent interfacebetween the low-level device driver code and the \linux\ kernel. Careis taken that 100\,\% compatibility exists with the data structures andprogrammer's interface defined in \cdromh. This guide was written tohelp \cdrom\ driver developers adapt their code to use the \UCD\ codedefined in \cdromc.Personally, I think that the most important hardware interfaces arethe IDE/ATAPI drives and, of course, the SCSI drives, but as pricesof hardware drop continuously, it is also likely that people may havemore than one \cdrom\ drive, possibly of mixed types. It is importantthat these drives behave in the same way. In December 1994, one of thecheapest \cdrom\ drives was a Philips cm206, a double-speed proprietarydrive. In the months that I was busy writing a \linux\ driver for it,proprietary drives became obsolete and IDE/ATAPI drives became thestandard. At the time of the last update to this document (November1997) it is becoming difficult to even {\em find} anything less than a16 speed \cdrom\ drive, and 24 speed drives are common.\newsection{Standardizing through another software level}\label{cdrom.c}At the time this document was conceived, all drivers directlyimplemented the \cdrom\ $ioctl()$ calls through their own routines. Thisled to the danger of different drivers forgetting to do important thingslike checking that the user was giving the driver valid data. Moreimportantly, this led to the divergence of behavior, which has alreadybeen discussed.For this reason, the \UCD\ was created to enforce consistent \cdrom\drive behavior, and to provide a common set of services to the variouslow-level \cdrom\ device drivers. The \UCD\ now provides anothersoftware-level, that separates the $ioctl()$ and $open()$ implementationfrom the actual hardware implementation. Note that this effort hasmade few changes which will affect a user's application programs. Thegreatest change involved moving the contents of the various low-level\cdrom\ drivers' header files to the kernel's cdrom directory. This wasdone to help ensure that the user is only presented with only one cdrominterface, the interface defined in \cdromh.\cdrom\ drives are specific enough (\ie, different from otherblock-devices such as floppy or hard disc drives), to define a setof common {\em \cdrom\ device operations}, $<cdrom-device>_dops$.These operations are different from the classical block-device fileoperations, $<block-device>_fops$.The routines for the \UCD\ interface level are implemented in the file\cdromc. In this file, the \UCD\ interfaces with the kernel as a blockdevice by registering the following general $struct\ file_operations$:$$\halign{$#$\ \hfil&$#$\ \hfil&$/*$ \rm# $*/$\hfil\crstruct& file_operations\ cdrom_fops = \{\hidewidth\cr        &NULL,                  & lseek \cr        &block_read,            & read---general block-dev read \cr        &block_write,           & write---general block-dev write \cr        &NULL,                  & readdir \cr        &NULL,                  & select \cr        &cdrom_ioctl,           & ioctl \cr        &NULL,                  & mmap \cr        &cdrom_open,            & open \cr        &cdrom_release,         & release \cr        &NULL,                  & fsync \cr        &NULL,                  & fasync \cr        &cdrom_media_changed,   & media change \cr        &NULL                   & revalidate \cr\};\cr}$$ Every active \cdrom\ device shares this $struct$. The routinesdeclared above are all implemented in \cdromc, since this file is theplace where the behavior of all \cdrom-devices is defined andstandardized. The actual interface to the various types of \cdrom\ hardware is still performed by various low-level \cdrom-devicedrivers. These routines simply implement certain {\em capabilities\/}that are common to all \cdrom\ (and really, all removable-mediadevices).Registration of a low-level \cdrom\ device driver is now done throughthe general routines in \cdromc, not through the Virtual File System(VFS) any more. The interface implemented in \cdromc\ is carried outthrough two general structures that contain information about thecapabilities of the driver, and the specific drives on which thedriver operates. The structures are:\begin{description}\item[$cdrom_device_ops$]   This structure contains information about the low-level driver for a  \cdrom\ device. This structure is conceptually connected to the major  number of the device (although some drivers may have different  major numbers, as is the case for the IDE driver).\item[$cdrom_device_info$]   This structure contains information about a particular \cdrom\ drive,  such as its device name, speed, etc. This structure is conceptually  connected to the minor number of the device.\end{description}Registering a particular \cdrom\ drive with the \UCD\ is done by thelow-level device driver though a call to:$$register_cdrom(struct\ cdrom_device_info * <device>_info)  $$The device information structure, $<device>_info$, contains all theinformation needed for the kernel to interface with the low-level\cdrom\ device driver. One of the most important entries in thisstructure is a pointer to the $cdrom_device_ops$ structure of thelow-level driver.The device operations structure, $cdrom_device_ops$, contains a listof pointers to the functions which are implemented in the low-leveldevice driver. When \cdromc\ accesses a \cdrom\ device, it does itthrough the functions in this structure. It is impossible to know allthe capabilities of future \cdrom\ drives, so it is expected that thislist may need to be expanded from time to time as new technologies aredeveloped. For example, CD-R and CD-R/W drives are beginning to becomepopular, and support will soon need to be added for them. For now, thecurrent $struct$ is:$$\halign{$#$\ \hfil&$#$\ \hfil&\hbox to 10em{$#$\hss}&  $/*$ \rm# $*/$\hfil\crstruct& cdrom_device_ops\ \{ \hidewidth\cr  &int& (* open)(struct\ cdrom_device_info *, int)\cr  &void& (* release)(struct\ cdrom_device_info *);\cr   &int& (* drive_status)(struct\ cdrom_device_info *, int);\cr       &int& (* media_changed)(struct\ cdrom_device_info *, int);\cr   &int& (* tray_move)(struct\ cdrom_device_info *, int);\cr  &int& (* lock_door)(struct\ cdrom_device_info *, int);\cr  &int& (* select_speed)(struct\ cdrom_device_info *, int);\cr  &int& (* select_disc)(struct\ cdrom_device_info *, int);\cr  &int& (* get_last_session) (struct\ cdrom_device_info *,         struct\ cdrom_multisession *{});\cr  &int& (* get_mcn)(struct\ cdrom_device_info *, struct\ cdrom_mcn *{});\cr  &int& (* reset)(struct\ cdrom_device_info *);\cr  &int& (* audio_ioctl)(struct\ cdrom_device_info *, unsigned\ int,         void *{});\cr   &int& (* dev_ioctl)(struct\ cdrom_device_info *, unsigned\ int,         unsigned\ long);\cr\noalign{\medskip}  &const\ int& capability;& capability flags \cr  &int& n_minors;& number of active minor devices \cr\};\cr}$$When a low-level device driver implements one of these capabilities,it should add a function pointer to this $struct$. When a particularfunction is not implemented, however, this $struct$ should contain aNULL instead. The $capability$ flags specify the capabilities of the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区中文字幕在线| 色综合天天综合网天天狠天天| 国产91精品精华液一区二区三区| 色综合av在线| 国产欧美日韩卡一| 麻豆91在线播放| 欧美调教femdomvk| 亚洲品质自拍视频| 国产成人免费在线视频| 91麻豆精品国产91久久久资源速度 | 日韩av网站免费在线| 九色|91porny| 在线播放欧美女士性生活| 亚洲欧美一区二区三区孕妇| 国产精品综合久久| 精品国产一区二区精华| 天堂一区二区在线免费观看| 91麻豆123| 亚洲欧美二区三区| 一本久久综合亚洲鲁鲁五月天| 中文欧美字幕免费| 国产成人精品亚洲777人妖| 精品毛片乱码1区2区3区| 日本午夜精品一区二区三区电影| 欧美色图天堂网| 亚洲制服欧美中文字幕中文字幕| bt欧美亚洲午夜电影天堂| 国产三级精品三级在线专区| 国产一区在线不卡| 国产欧美在线观看一区| 国产精品69久久久久水密桃| 337p粉嫩大胆噜噜噜噜噜91av| 免费欧美在线视频| 日韩美女一区二区三区| 国产在线精品一区二区不卡了 | 精品一区二区三区蜜桃| 日韩欧美在线综合网| 美女视频一区二区三区| 日韩久久久精品| 国产精品一区专区| 国产精品青草久久| 91蜜桃在线观看| 午夜精品一区二区三区电影天堂 | 一本大道久久精品懂色aⅴ | 中文字幕国产精品一区二区| 成人一区二区三区在线观看| 中文字幕制服丝袜一区二区三区| 成人av电影在线观看| 一区二区三区中文在线| 欧美妇女性影城| 精品一区二区三区香蕉蜜桃| 久久久亚洲欧洲日产国码αv| 国产成人亚洲综合a∨婷婷图片| 中文字幕精品一区 | 成人午夜电影久久影院| 一区在线中文字幕| 欧美三级午夜理伦三级中视频| 亚洲超碰精品一区二区| 久久综合色综合88| 91在线精品秘密一区二区| 丝袜美腿亚洲综合| 国产欧美精品一区二区色综合 | 欧美一区二区视频网站| 国产一区二区三区美女| 亚洲黄一区二区三区| 欧美美女一区二区三区| 丁香一区二区三区| 亚洲h在线观看| 欧美激情一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 精品国产乱码久久久久久蜜臀| 国产91精品一区二区麻豆亚洲| 一区二区在线免费观看| 精品福利二区三区| 欧美性淫爽ww久久久久无| 国产在线视频精品一区| 亚洲444eee在线观看| 欧美国产日韩a欧美在线观看 | 日本伦理一区二区| 国产一区二区三区免费在线观看| 亚洲一二三四在线| 久久久美女艺术照精彩视频福利播放| 色综合久久88色综合天天| 国产精品亚洲第一区在线暖暖韩国| 亚洲精品国产第一综合99久久 | 国产成a人亚洲| 免费观看91视频大全| 亚洲在线中文字幕| 国产精品久久久久影院亚瑟| 精品国产乱码久久久久久影片| 色猫猫国产区一区二在线视频| 国产乱对白刺激视频不卡| 五月天婷婷综合| 一区二区在线免费观看| 欧美极品少妇xxxxⅹ高跟鞋| 精品理论电影在线| 7777精品久久久大香线蕉| 色丁香久综合在线久综合在线观看| 国产一区二区91| 蜜桃av噜噜一区| 日韩**一区毛片| 亚洲高清免费在线| 亚洲午夜一二三区视频| 一区二区三区在线看| 亚洲精品第1页| 亚洲欧美激情小说另类| 亚洲同性同志一二三专区| 国产精品免费视频观看| 国产欧美中文在线| 欧美激情一区二区三区蜜桃视频 | 91在线porny国产在线看| 黑人巨大精品欧美黑白配亚洲| 秋霞电影一区二区| 日产国产高清一区二区三区| 国产99精品在线观看| 国产精品一二三四区| 国产精品自拍毛片| 国产成人午夜99999| 成人免费视频一区二区| 97久久人人超碰| 欧洲日韩一区二区三区| 欧美自拍偷拍午夜视频| 欧美日韩国产另类一区| 欧美一级免费观看| 日韩美女主播在线视频一区二区三区| 日韩美女一区二区三区四区| www日韩大片| 日本一区二区视频在线| 自拍偷拍欧美激情| 亚洲自拍偷拍麻豆| 三级成人在线视频| 久久国产夜色精品鲁鲁99| 国产麻豆午夜三级精品| 99这里只有久久精品视频| 欧美在线免费播放| 日韩精品一区二区三区老鸭窝| 久久精品网站免费观看| 亚洲人午夜精品天堂一二香蕉| 亚洲国产一二三| 久久精品国产亚洲aⅴ| 成人一级视频在线观看| 在线视频你懂得一区| 日韩免费电影网站| 中文字幕一区三区| 日本三级亚洲精品| 懂色av噜噜一区二区三区av| 日本二三区不卡| 精品福利在线导航| 国产精品成人午夜| 美女网站在线免费欧美精品| 国产精品中文字幕日韩精品| 色婷婷精品大在线视频| 亚洲精品一区在线观看| 中文字幕一区二区三区乱码在线| av不卡在线观看| 91精品国产综合久久福利软件| 国产日本欧美一区二区| 亚洲6080在线| 成人精品电影在线观看| 欧美疯狂做受xxxx富婆| 中文字幕av一区二区三区| 天堂一区二区在线| 波多野结衣在线一区| 91精品国产综合久久精品图片| 国产精品久久久久久久岛一牛影视| 亚洲一区二区黄色| 成人av免费网站| 精品日韩一区二区三区免费视频| 亚洲免费在线播放| 激情综合网最新| 欧美日韩精品免费| 亚洲欧美综合色| 国产精品1024| 欧美一级黄色录像| 五月天视频一区| 色婷婷av一区| 中文字幕制服丝袜一区二区三区| 久久精品国产亚洲高清剧情介绍 | 99在线精品观看| 欧美精品一区二区三区在线 | 麻豆国产精品一区二区三区| 97久久精品人人做人人爽 | 欧美电影免费观看高清完整版在线 | 国产农村妇女毛片精品久久麻豆| 亚洲成av人片在线观看无码| 91偷拍与自偷拍精品| 国产欧美精品日韩区二区麻豆天美| 日本不卡123| 亚洲国产日产av| 91网址在线看| 亚洲人成亚洲人成在线观看图片| 国产成+人+日韩+欧美+亚洲| 久久奇米777| 国产乱人伦偷精品视频不卡| 精品久久久三级丝袜| 捆绑变态av一区二区三区| 欧美一区二区三区色| 免费观看久久久4p| 欧美mv日韩mv| 国产一区二区三区黄视频|