shoelace源代码分析之disktab
来源:互联网 发布:恶喵的奶爸 知乎 编辑:程序博客网 时间:2024/06/05 21:55
下面是disktab.doc文件中的一部分说明
The following entries are used:
Name Type Description
se num Number of bytes per sector
ns num Number of sectors per track
nt num Number of tracks per cylinder
md num Media description byte
fp str Floppy parameter table
下面是/etc/disktab文件
#| Floppy disks
#|
#| 5.25 inch double sided double density 360kb disks
f0|5.25dsdd|5.25 inch double sided double density 360kb disks:\
:nt#2:se#512:ns#9:md#253:\
:fp=0xdf 0x2 0x25 0x2 0x9 0x2a 0xff 0x50 0xf6 0x1 0x8:
#|
#| 5.25 inch double sided quad density 720kb disks
f1|5.25dsqd|5.25 inch double sided quad density 720kb disks:\
:nt#2:se#512:ns#9:md#240:\
:fp=0xdf 0x2 0x25 0x2 0x9 0x2a 0xff 0x50 0xf6 0x1 0x8:
#|
#| 3.5 inch double sided double density 720kb disks
#| duplicated from 5.25dsqd - this seems to work
f2|3.5dsdd|3.5 inch double sided double density 720kb disks:\
:nt#2:se#512:ns#9:md#240:\
:fp=0xdf 0x2 0x25 0x2 0x9 0x2a 0xff 0x50 0xf6 0x1 0x8:
#|
#| 5.25 inch double sided high density 1200kb disks
f3|5.25dshd|5.25 inch double sided high density 1200kb disks:\
:nt#2:se#512:ns#15:md#249:\
:fp=0xdf 0x2 0x25 0x2 0xf 0x1b 0xff 0x54 0xf6 0x1 0x8:
#|
#|
#| Generic hard disk
#|
#| Hard disk parameters are obtained from the controller
#| at boot time. These values are dummy values to make
#| the installation procedure the same for both hard
#| and soft disks.
w0|wini|Generic hard disk:\
:nt#0:se#512:ns#0:md#248:\
:fp=0 0 0 0 0 0 0 0 0 0 0:
可见对于硬盘来说,shoelace支持的硬盘有一些限制:se为512既是每扇区为512字节。
下面是laceup.c文件中和disktab文件相关的代码:
disktabfilename = findfile(DISKTABFILE);
if ((fake_env[0] = (char *) malloc(sizeof(termcapenv)-1 +
strlen(disktabfilename) + 1)) == 0) {
fputs("No room for termcap environment entry\n", stderr);
exit(1);
}
strcpy(fake_env[0], termcapenv);
strcat(fake_env[0], disktabfilename);
environ = &fake_env[0];
switch (tgetent(disktab, disktype)) {
case 0:
fprintf(stderr, "Disk type %s not found in %s\n",
disktype, strchr(fake_env[0], '=')+1);
exit(1);
case -1:
fprintf(stderr, "%s not found\n", strchr(fake_env[0], '=')+1);
exit(1);
}
- shoelace源代码分析之disktab
- shoelace源代码分析之winiboot
- shoelace源代码分析之bootlace
- shoelace源代码分析之shoe.c
- shoelace源代码分析之shoebfs -scanzone()函数分析
- shoelace源代码分析,bochs调试过程
- shoelace源代码分析,bochs调试 readkernel()函数
- shoelace源代码分析,bochs调试-67870
- shoelace源代码分析,bochs调试winiboot
- shoelace源代码分析,bochs调试过程 -- loadbuilt()函数
- shoelace源代码分析,bochs调试过程,setup.s
- shoelace源代码分析,bochs调试过程,setup.s 中do_move
- shoelace源代码分析,bochs调试winiboot2,int0x13的算法
- telnetd源代码分析之如何调试源代码?
- Tomcat 源代码分析之ClassLoader
- Openstack源代码分析之开篇
- Openstack源代码分析之Eventlet
- opencv之HOG源代码分析
- <Unity3D>Unity3D入门篇——第五讲 GUI控件(三)
- 在ubuntu上安裝ascii查詢表
- IOS 6 自动布局 入门-1
- 小程序(1)
- Jetty简介
- shoelace源代码分析之disktab
- sysctl.conf 优化方案
- Oracle Shrink Tablespace
- Fedora内核编译
- Markov Chain Monte Carlo
- java百问
- Android NDK开发环境搭建
- Axis2用法(2)客户端和服务端
- Java精确测量代码运行时间 代码执行时间 纳秒 nanoTime