Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xv6-19au
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
csep551
xv6-19au
Commits
6bf2e5c8
Commit
6bf2e5c8
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
add ln
parent
c88bf235
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+5
-1
5 additions, 1 deletion
Makefile
ln.c
+15
-0
15 additions, 0 deletions
ln.c
with
20 additions
and
1 deletion
Makefile
+
5
−
1
View file @
6bf2e5c8
...
...
@@ -105,6 +105,10 @@ _rm : rm.o $(ULIB)
$(
LD
)
-N
-e
main
-Ttext
0
-o
_rm rm.o
$(
ULIB
)
$(
OBJDUMP
)
-S
_rm
>
rm.asm
_ln
:
ln.o $(ULIB)
$(
LD
)
-N
-e
main
-Ttext
0
-o
_ln ln.o
$(
ULIB
)
$(
OBJDUMP
)
-S
_ln
>
ln.asm
_sh
:
sh.o $(ULIB)
$(
LD
)
-N
-e
main
-Ttext
0
-o
_sh sh.o
$(
ULIB
)
$(
OBJDUMP
)
-S
_sh
>
sh.asm
...
...
@@ -116,7 +120,7 @@ _zombie: zombie.o $(ULIB)
mkfs
:
mkfs.c fs.h
cc
-o
mkfs mkfs.c
UPROGS
=
usertests _echo _cat _init _kill _ls _mkdir _rm _sh _zombie
UPROGS
=
usertests _echo _cat _init _kill
_ln
_ls _mkdir _rm _sh _zombie
fs.img
:
mkfs README $(UPROGS)
./mkfs fs.img README
$(
UPROGS
)
...
...
This diff is collapsed.
Click to expand it.
ln.c
0 → 100644
+
15
−
0
View file @
6bf2e5c8
#include
"types.h"
#include
"stat.h"
#include
"user.h"
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
3
){
printf
(
2
,
"Usage: ln old new
\n
"
);
exit
();
}
if
(
link
(
argv
[
1
],
argv
[
2
])
<
0
)
printf
(
2
,
"link %s %s: failed
\n
"
,
argv
[
1
],
argv
[
2
]);
exit
();
}
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