summaryrefslogtreecommitdiff
path: root/coreutils/ln.c
Commit message (Collapse)AuthorAgeFilesLines
* ln: support -T and -vSimon B2012-05-061-6/+22
| | | | | | | | | function old new delta ln_main 445 524 +79 packed_usage 29182 29179 -3 Signed-off-by: Simon B <sburnet@hotmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: remove is_directory's argument which is always NULLDenys Vlasenko2011-12-181-2/+2
| | | | | | | | | | | | function old new delta send_cgi_and_exit 892 890 -2 ln_main 447 445 -2 handle_incoming_and_exit 2784 2780 -4 is_directory 66 59 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to coreutils/*.cPere Orga2011-03-311-0/+16
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ln: explain why we use xstrdupDenys Vlasenko2011-03-211-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove a few more cases of argc usage. -89 bytes.Denys Vlasenko2009-11-281-11/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-3/+3
| | | | | 263 bytes saved.
* *: kill bb_get_last_path_component, replace with two functionsDenis Vlasenko2007-09-241-2/+2
| | | | | | | | | (one which strips trailing slash and one which does not) wget: straighten out as a result of above change text data bss dec hex filename 5056 1 0 5057 13c1 busybox.t4/networking/wget.o 5022 0 0 5022 139e busybox.t5/networking/wget.o
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* whitespace fixes, no code changesDenis Vlasenko2007-08-161-1/+2
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* audit small applets and mark some of them as NOFORK.Denis Vlasenko2007-04-101-0/+3
| | | | | Put big scary warnings in relevant places.
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #1Denis Vlasenko2007-01-291-1/+1
|
* cp: add support for -s, -l. Fix free(nonmalloc) bug.Denis Vlasenko2006-10-211-20/+23
| | | | | Add doc on POSIX's rules on -i and -f (insane!). ln: make "ln dangling_symlink new_link" work.
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-1/+1
| | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-7/+3
| | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
* Add one-line GPL boilerplate to numerous (but not all yet) source files."Robert P. J. Day"2006-07-121-14/+1
|
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* printf() arguments shouldn't be passed straight from user supplied data.Rob Landley2005-12-121-1/+1
| | | | (Security thingy.)
* change interface to bb_xasprintf() - more perfect for me."Vladimir N. Oleynik"2005-09-291-4/+4
| | | | | ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
* Patch from Matthew S. Wood:Rob Landley2005-04-291-8/+24
| | | | | | | | | | | | | | | | | | | | | | > The following patch adds support for the -S and -b flags to `ln'. These > flags [especially -b] are used extensively in Debian pre and post > installation scripts. Comments from Vladimir Oleynik influenced the final patch, and I also ripped out the in-file changelog since it belongs here. At the time, it said: /* Apr 15, 2004 Matthew S. Wood (mwood@realmsys.com) * * Implement '-b' (backup) flag. * Implement '-S' (backup suffix) flag. * * * Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) * * Fixed bug involving -n option. Essentially, -n was always in effect. */
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-3/+3
|
* Patch from Bastian Blank to fix debian bug #226722, test case: Glenn L McGrath2004-01-081-12/+1
| | | | | | mkdir foo touch foo/bar ln -s bar foo/baz
* Batch from Bastian Blank to fix debian bug #216435;Glenn L McGrath2003-12-311-4/+12
| | | | | When linking a non existing file busybox ln will report the target missind and not the source:
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Major coreutils update.Manuel Novoa III2003-03-191-95/+68
|
* Applied vodz' patches #49 and #50 (with a small correction in runshell.c)Robert Griebl2002-07-191-15/+17
| | | | | | | | | #49: I found one memory overflow and memory leak in "ln" applet. Last patch reduced also 54 bytes. ;) #50: I found bug in loginutils/Makefile.in. New patch have also new function to libbb and aplied this to applets and other cosmetic changes.
* Apply lash_patch35 from vodz, which brings several nice size_optimizations.Eric Andersen2002-04-061-1/+1
|
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-2/+2
| | | | -Erik
* Move messages.c to libbb. Make each string in messages.c be its own .o file.Eric Andersen2001-04-251-3/+0
| | | | | | | This way, we can new get rid of all that tedious #define rubbish we used to need to enable specific messages. This way is enormously simpler, and as a bonus also ends up saving us 96 bytes. -Erik
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-5/+5
| | | | | | header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik
* use perror_msg instead of perror to print the applet name.Eric Andersen2001-02-151-18/+31
| | | | -Erik
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-1/+1
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Fix up copyright msgs. Bump version to 0.49 in preparation for0_49Eric Andersen2001-01-271-1/+1
| | | | | a release. Update the website with release details. -Erik
* Fix header file usage -- there were many unnecessary header files included inEric Andersen2001-01-271-0/+3
| | | | | | | busybox.h which slowed compiles. I left only what was needed and then fixed up all the apps to include their own header files. I also fixed naming for pwd.h and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc. -Erik
* #define -> static const int. Also got rid of some big static buffers.Mark Whitley2001-01-231-3/+3
|
* Changed names of functions in utility.c and all affected files, to makeMark Whitley2000-12-071-2/+2
| | | | compliant with the style guide. Everybody rebuild your tags file!
* Patch from Matt Kraai: "When it encounters a problem creating a link, lnEric Andersen2000-10-041-2/+3
| | | | | shouldn't give up entirely but instead continue processing the rest of its arguments. The attached patch does this."
* Rewrite to use getopt and return instead of exit, a seperate function ↵Glenn L McGrath2000-10-041-83/+69
| | | | (fs_link) does the actual work.
* Renamed "internal.h" to the more sensible "busybox.h".Eric Andersen2000-09-251-1/+1
| | | | -Erik
* Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead ofMatt Kraai2000-09-131-1/+1
| | | | segfaulting or handling errors the same way themselves.
* Extract usage information into a separate file.Matt Kraai2000-07-161-13/+0
|
* Use errorMsg rather than fprintf.Matt Kraai2000-07-141-2/+1
|
* Re-enable ln -n in the help.Eric Andersen2000-07-111-2/+0
| | | | -Erik
* Another patch from Matt Kraai <kraai@alumni.carnegiemellon.edu>:Eric Andersen2000-07-111-27/+2
| | | | | | | | | | > > The following patch allows ln -n to function like GNU. It also fixes a > typo with my previous patch to add support for ln FILE DIRECTORY. And > it removes some code that checks the maximum length of the filenames. I > can't figure out why that code is necessary. Anyone know? > > Matt
* Remove yet more kernel header dependancies.Eric Andersen2000-07-101-1/+1
| | | | -Erik
* From Matt Kraai <kraai@alumni.carnegiemellon.edu>:Eric Andersen2000-07-101-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Howdy, Bug #1006 reports that ln -s /tmp/foo . does not work correctly. In fact, it appears that any instantiation of ln -s FILE... DIRECTORY does not work. The following patch adds support for this form, which then fixes the particular instance noted in the bug report. In the process, I needed the basename function. This appears in the string.h provided by glibc, but not uC-libc. So I wrote my own to go in utility.c, called get_last_path_component. I also modified the basename utility to use this function. At some point it might be desirous to use the basename from the library if it exists, and otherwise compile our own. But I don't know how to do this. Matt