summary refs log tree commit diff
path: root/pkgs/os-specific/linux/minimal-bootstrap/ln-boot/ln.c
blob: b7a681f8270cf77d04d76ce847c6014728631f36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char** argv)
{
  if (argc != 4 || strcmp(argv[1], "-s")) {
    fputs("Usage: ", stdout);
    fputs(argv[0], stdout);
    fputs(" -s TARGET LINK_NAME\n", stdout);
    exit(EXIT_FAILURE);
  }

  symlink(argv[2], argv[3]);
  exit(EXIT_SUCCESS);
}