/*
* Mini ln implementation for busybox
*
- * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
free(src_name);
src_name = src;
}
-
- if (stat(*argv, &statbuf)) {
+ if (!(flag & LN_SYMLINK) && stat(*argv, &statbuf)) {
bb_perror_msg(*argv);
status = EXIT_FAILURE;
free(src_name);
if (flag & LN_SYMLINK) {
link_func = symlink;
}
-
+
if (link_func(*argv, src) != 0) {
bb_perror_msg(src);
status = EXIT_FAILURE;
}
free(src_name);
-
+
} while ((++argv)[1]);
return status;
}
-
-
-
-
-
-
-
-
-
-