frosten 发表于 2003-5-15 21:44:14

问几个问题,哪位老大指点一下

请问一下:
1.shell下cp函数的源代码在哪里能找到?
2.在shell下增加一个类似cp的函数可以吗,怎么加上去?
3.在shell下的函数能直接调用内核函数吗,比如说ext2_get_block?
4.buffer_head这个结构里的page指什么?另外buffer_head里记录buffer长度的项是哪个,怎么找不到?
谢谢先。

Dragonfly 发表于 2003-5-15 22:34:05

1) cp is user spcae code. it can be found from fileutils-xxx.src.rpm
2) u write a program, compile it, and then put in u path.
3) no, can not.
4) which one? b_page? Pointer to the descriptor of the page that stores the buffer.
the buffer length is b_size. it record in byte. u need >>9 to get# in sector unit.

frosten 发表于 2003-5-15 23:40:43

谢谢cheungming的回复,能不能说一下fileutils-xxx.src.rpm 在哪里能找到,我在源码下找了一下没找到。另外b_page指向内存中的一个物理页还只是一个内存中一个虚拟的结构?

Dragonfly 发表于 2003-5-16 01:07:50

point to a page descriptor.

www.rpmfind.net or redhat.com
but i bet u can find it from u rh cd. not installation cd, but source cd.
页: [1]
查看完整版本: 问几个问题,哪位老大指点一下