mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
19 lines
320 B
C++
19 lines
320 B
C++
|
|
#include <stdio.h>
|
||
|
|
#include <errno.h>
|
||
|
|
#include <unistd.h>
|
||
|
|
|
||
|
|
int main(int argc, char** argv)
|
||
|
|
{
|
||
|
|
if (argc != 3) {
|
||
|
|
fprintf(stderr, "usage: ln <old-path> <new-path>\n");
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
int rc = link(argv[1], argv[2]);
|
||
|
|
if (rc < 0) {
|
||
|
|
perror("link");
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|