Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
f0721f1b
提交
f0721f1b
8月 22, 2007
创建
作者:
rsc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweaks
上级
eaea18cb
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
23 行删除
+23
-23
BUGS
BUGS
+4
-0
fs.c
fs.c
+18
-22
runoff.list
runoff.list
+1
-1
没有找到文件。
BUGS
浏览文件 @
f0721f1b
...
@@ -12,3 +12,7 @@ formatting:
...
@@ -12,3 +12,7 @@ formatting:
file.c filewrite leaks onto next page
file.c filewrite leaks onto next page
need to fix PAGEBREAK mechanism
need to fix PAGEBREAK mechanism
fs.c: grep XXX
sysfile.c: why does mknod take a type argument?
fs.c
浏览文件 @
f0721f1b
...
@@ -524,11 +524,11 @@ dirlink(struct inode *dp, char *name, uint ino)
...
@@ -524,11 +524,11 @@ dirlink(struct inode *dp, char *name, uint ino)
{
{
int
off
;
int
off
;
struct
dirent
de
;
struct
dirent
de
;
struct
uinode
*
ip
;
struct
uinode
*
ip
u
;
// Check that name is not present.
// Check that name is not present.
if
((
ip
=
dirlookup
(
dp
,
name
,
0
))
!=
0
){
if
((
ip
u
=
dirlookup
(
dp
,
name
,
0
))
!=
0
){
iput
(
ip
);
iput
(
ip
u
);
return
-
1
;
return
-
1
;
}
}
...
@@ -593,43 +593,39 @@ skipelem(char *path, char *name)
...
@@ -593,43 +593,39 @@ skipelem(char *path, char *name)
static
struct
uinode
*
static
struct
uinode
*
_namei
(
char
*
path
,
int
parent
,
char
*
name
)
_namei
(
char
*
path
,
int
parent
,
char
*
name
)
{
{
struct
uinode
*
dp
,
*
ip
;
struct
uinode
*
dp
u
,
*
ipu
;
struct
inode
*
dp
l
;
struct
inode
*
dp
;
uint
off
;
uint
off
;
if
(
*
path
==
'/'
)
if
(
*
path
==
'/'
)
dp
=
iget
(
ROOTDEV
,
1
);
dp
u
=
iget
(
ROOTDEV
,
1
);
else
else
dp
=
idup
(
cp
->
cwd
);
dp
u
=
idup
(
cp
->
cwd
);
while
((
path
=
skipelem
(
path
,
name
))
!=
0
){
while
((
path
=
skipelem
(
path
,
name
))
!=
0
){
dpl
=
ilock
(
dp
);
dp
=
ilock
(
dpu
);
if
(
dpl
->
type
!=
T_DIR
){
if
(
dp
->
type
!=
T_DIR
){
iunlock
(
dpl
);
iput
(
iunlock
(
dp
));
iput
(
dp
);
return
0
;
return
0
;
}
}
if
(
parent
&&
*
path
==
'\0'
){
if
(
parent
&&
*
path
==
'\0'
){
// Stop one level early.
// Stop one level early.
iunlock
(
dp
l
);
iunlock
(
dp
);
return
dp
;
return
dp
u
;
}
}
if
((
ip
=
dirlookup
(
dpl
,
name
,
&
off
))
==
0
){
if
((
ipu
=
dirlookup
(
dp
,
name
,
&
off
))
==
0
){
iunlock
(
dpl
);
iput
(
iunlock
(
dp
));
iput
(
dp
);
iput
(
ipu
);
iput
(
ip
);
return
0
;
return
0
;
}
}
iput
(
iunlock
(
dp
));
iunlock
(
dpl
);
dpu
=
ipu
;
iput
(
dp
);
dp
=
ip
;
}
}
if
(
parent
)
if
(
parent
)
return
0
;
return
0
;
return
dp
;
return
dp
u
;
}
}
struct
uinode
*
struct
uinode
*
...
...
runoff.list
浏览文件 @
f0721f1b
...
@@ -46,9 +46,9 @@ fsvar.h
...
@@ -46,9 +46,9 @@ fsvar.h
ide.c
ide.c
bio.c
bio.c
fs.c
fs.c
exec.c
file.c
file.c
sysfile.c
sysfile.c
exec.c
# pipes
# pipes
pipe.c
pipe.c
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论