1 | // SPDX-License-Identifier: GPL-3.0-or-later |
---|---|
2 | |
3 | #include <mos_stdio.h> |
4 | #include <mosapi.h> |
5 | |
6 | int main(int argc, char *argv[]) |
7 | { |
8 | if (argc < 3) |
9 | { |
10 | puts(s: "Usage: symlink <link> <target>"); |
11 | return 1; |
12 | } |
13 | |
14 | if (syscall_vfs_symlink(link_path: argv[1], target: argv[2])) |
15 | { |
16 | printf(format: "Failed to create symlink %s -> %s\n", argv[1], argv[2]); |
17 | return 1; |
18 | } |
19 | |
20 | printf(format: "Created symlink %s -> %s\n", argv[1], argv[2]); |
21 | return 0; |
22 | } |
23 |