Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
f0721f1b
Commit
f0721f1b
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
tweaks
parent
eaea18cb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
BUGS
+4
-0
4 additions, 0 deletions
BUGS
fs.c
+18
-22
18 additions, 22 deletions
fs.c
runoff.list
+1
-1
1 addition, 1 deletion
runoff.list
with
23 additions
and
23 deletions
BUGS
+
4
−
0
View file @
f0721f1b
...
...
@@ -12,3 +12,7 @@ formatting:
file.c filewrite leaks onto next page
need to fix PAGEBREAK mechanism
fs.c: grep XXX
sysfile.c: why does mknod take a type argument?
This diff is collapsed.
Click to expand it.
fs.c
+
18
−
22
View file @
f0721f1b
...
...
@@ -524,11 +524,11 @@ dirlink(struct inode *dp, char *name, uint ino)
{
int
off
;
struct
dirent
de
;
struct
uinode
*
ip
;
struct
uinode
*
ip
u
;
// Check that name is not present.
if
((
ip
=
dirlookup
(
dp
,
name
,
0
))
!=
0
){
iput
(
ip
);
if
((
ip
u
=
dirlookup
(
dp
,
name
,
0
))
!=
0
){
iput
(
ip
u
);
return
-
1
;
}
...
...
@@ -593,43 +593,39 @@ skipelem(char *path, char *name)
static
struct
uinode
*
_namei
(
char
*
path
,
int
parent
,
char
*
name
)
{
struct
uinode
*
dp
,
*
ip
;
struct
inode
*
dp
l
;
struct
uinode
*
dp
u
,
*
ip
u
;
struct
inode
*
dp
;
uint
off
;
if
(
*
path
==
'/'
)
dp
=
iget
(
ROOTDEV
,
1
);
dp
u
=
iget
(
ROOTDEV
,
1
);
else
dp
=
idup
(
cp
->
cwd
);
dp
u
=
idup
(
cp
->
cwd
);
while
((
path
=
skipelem
(
path
,
name
))
!=
0
){
dpl
=
ilock
(
dp
);
if
(
dpl
->
type
!=
T_DIR
){
iunlock
(
dpl
);
iput
(
dp
);
dp
=
ilock
(
dpu
);
if
(
dp
->
type
!=
T_DIR
){
iput
(
iunlock
(
dp
));
return
0
;
}
if
(
parent
&&
*
path
==
'\0'
){
// Stop one level early.
iunlock
(
dp
l
);
return
dp
;
iunlock
(
dp
);
return
dp
u
;
}
if
((
ip
=
dirlookup
(
dpl
,
name
,
&
off
))
==
0
){
iunlock
(
dpl
);
iput
(
dp
);
iput
(
ip
);
if
((
ipu
=
dirlookup
(
dp
,
name
,
&
off
))
==
0
){
iput
(
iunlock
(
dp
));
iput
(
ipu
);
return
0
;
}
iunlock
(
dpl
);
iput
(
dp
);
dp
=
ip
;
iput
(
iunlock
(
dp
));
dpu
=
ipu
;
}
if
(
parent
)
return
0
;
return
dp
;
return
dp
u
;
}
struct
uinode
*
...
...
This diff is collapsed.
Click to expand it.
runoff.list
+
1
−
1
View file @
f0721f1b
...
...
@@ -46,9 +46,9 @@ fsvar.h
ide.c
bio.c
fs.c
exec.c
file.c
sysfile.c
exec.c
# pipes
pipe.c
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment