blob: ec7ecdca544768c23eb9e9e89c6f06f343d1f2e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// kiss-readlink --- a utility replacement for readlink
// See LICENSE for copyright information
// This is basically a 'readlink -f' command.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char buf[512];
if (argc != 2) {
printf("usage: %s FILE\n", argv[0]);
return(1);
}
if (!realpath(argv[1], buf)) {
perror("realpath");
return(1);
}
printf("%s\n", buf);
return(0);
}
|