linux 光驱 sr sg,linx 设备名字来由 sd sr sg st
> > On Tue, Nov 3, 2009 at 9:34 AM, Derek Broughton
> > Translation - I don‘t know either... lol
> Actually, I‘d already said that - and suggested "raw" as a
> wild guess. But
> I was intrigued that Detlef thought that knowing what it stood
> for would
> prevent errors, since I really can‘t imagine how most of us
> would need to
> know it.
> --
> derek
>
> And knowing the acronym definitions probably won‘t help the learning
> too much, either.
> But, according to the Linux SCSI sub-system documentation I have, it
> would have to stand for _SCSI_ _READ_ since it is a cd drive that is
> designated read-only. For generic operations on the same device, it
> would map to sg0 (_SCSI_ _GENERIC_)in order to gain the write perm.
> Apparently all of the devices like /dev/sr0, /dev/st0, /dev/nst0x map
> to an sg device for generic operations.
> Although _raw_ seems to be a good logical choice.
Lo?c had it right.
But you should read the code from orbit. It‘s the only way to make sure.
>From a 2.4 kernel source
drivers/scsi/sd.c
staticstruct Scsi_Device_Template sd_template = {
name:"disk",
tag:"sd",
scsi_type:TYPE_DISK, <== "d" for disk
major:SCSI_DISK0_MAJOR,
/*
* Secondary range of majors that this driver handles.
*/
min_major:SCSI_DISK1_MAJOR,
max_major:SCSI_DISK7_MAJOR,
blk:1,
detect:sd_detect,
init:sd_init,
finish:sd_finish,
attach:sd_attach,
detach:sd_detach,
init_command:sd_init_command,
};
drivers/scsi/st.c
staticstruct Scsi_Device_Template st_template =
{
name:"tape",
tag:"st",
scsi_type:TYPE_TAPE, <== "t" for tape
major:SCSI_TAPE_MAJOR,
detect:st_detect,
init:st_init,
attach:st_attach,
detach:st_detach
};
drivers/scsi/sr.c
staticstruct Scsi_Device_Template sr_template =
{
name:"cdrom",
tag:"sr",
scsi_type:TYPE_ROM, <== "r" for ROM
major:SCSI_CDROM_MAJOR,
blk:1,
detect:sr_detect,
init:sr_init,
finish:sr_finish,
attach:sr_attach,
detach:sr_detach,
init_command:sr_init_command
};
>From a 2.6 kernel source
drivers/scsi/sr.c
MODULE_DESCRIPTION("SCSI cdrom (sr) driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR);
MODULE_ALIAS_SCSI_DEVICE(TYPE_ROM);
MODULE_ALIAS_SCSI_DEVICE(TYPE_WORM);
--
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
linux 光驱 sr sg,linx 设备名字来由 sd sr sg st相关推荐
- 【转】linx 设备名字来由 sd sr sg st
转自:/dev/sr0 与/dev/cdrom_luoweifeng1989的博客-CSDN博客_/dev/sr0 一直不知道 sda sdb sr0 这些名字的前两两个字母是什么意思 > &g ...
- linux usb设备名 ks,在Linux系统里识别USB设备名字的4种方法
对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今,使用 U ...
- linux查看usb设备文件,技术|在 Linux 系统里识别 USB 设备名字的 4 种方法
对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今,使用 U ...
- linux 查询usb端口名称,在Linux系统里识别USB设备名字的4种方法
对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今,使用 U ...
- Linux 中识别 USB 设备名字的 4 种方法
对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今,使用 U ...
- linux中usb设备名,Linux 中识别 USB 设备名字的 4 种方法
摘要: 对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今, ...
- Linux CentOS 8(磁盘设备与硬盘设备的概述与管理)
Linux CentOS 8(磁盘设备与硬盘设备的概述与管理) 目录 一.项目介绍 二.相关概念 2.1 磁盘设备 2.2 磁盘的接口 2.3 硬盘的设备名称 2.4 文件系统 2.5 RAID独立冗 ...
- 著名IT公司名字来由
著名IT公司名字来由 Yahoo! <格列佛游记>的作者Jonathan Swift发明了yahoo这个单词.在小说里,它代表了一个在外表和行为举止上都令人厌恶的家伙,简直都不能算是一个人 ...
- 从需求的角度去理解Linux系列:总线、设备和驱动
<从需求的角度去理解Linux系列:总线.设备和驱动>是一篇有关如何学习嵌入式Linux系统的方法论文章,也是从需求的角度去理解Linux系统软件的开篇.这是作者精心撰写的经验总结,希望嵌 ...
最新文章
- python 实现可以一直输入内容直到某个特定的值退出循环的操作
- 最新DynamipsGUI2.8[模拟器]发布!(中文版-英文版下载)
- 这是一个不完整的详细Java多线程,但对于初学者足够了,相信我,你会爱上她的
- python django-forbidden-csrf-cookie-not-set问题
- C语言 将程序运行的时间记录在记事本中,下次运行进行读取
- mysql.max links_Mysql的max_allowed_packet设定
- Flowable基础二十一 Flowable springboot 集成
- 开发人员能力不足的情况下如何推进敏捷开发?
- VMware Workstation 网络连接配置
- 博客使用的CSS代码备份
- 最长公共子序列-dp
- 如何掌握openGauss数据库核心技术?秘诀一:拿捏SQL引擎(3)
- 卷积,DFT,FFT,图像FFT,FIR 和 IIR 的物理意义。
- MongoDB下载安装教程 全
- android使用xml定义背景边框
- 运用yolov5人脸识别模型生成标准的一寸照视频
- 火爆到把服务器搞瘫痪,一款小游戏,合成大西瓜
- 灯塔 (数据结构)
- 锂矿降龙十八掌之时乘六龙:盛新锂能
- Zabbix 5.4.12 源码编译安装