diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-10-20 22:08:37 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-10-20 22:08:37 +0000 |
commit | c49960189a04b73e033016bd0f43fbb950f800e1 (patch) | |
tree | 6447b860dad6dd3a463547fa048a4c635d8864c8 | |
parent | 887991c78a1e62beee123d58f6a47f93278f03c9 (diff) | |
download | busybox-w32-c49960189a04b73e033016bd0f43fbb950f800e1.tar.gz busybox-w32-c49960189a04b73e033016bd0f43fbb950f800e1.tar.bz2 busybox-w32-c49960189a04b73e033016bd0f43fbb950f800e1.zip |
Fixed up copyright notices and such
-rw-r--r-- | Changelog | 8 | ||||
-rw-r--r-- | LICENSE | 5 | ||||
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | README | 13 | ||||
-rwxr-xr-x | applets/busybox.mkll | 2 | ||||
-rw-r--r-- | archival/tar.c | 22 | ||||
-rw-r--r-- | busybox.def.h | 12 | ||||
-rwxr-xr-x | busybox.mkll | 2 | ||||
-rw-r--r-- | cat.c | 2 | ||||
-rw-r--r-- | chmod_chown_chgrp.c | 6 | ||||
-rw-r--r-- | chroot.c | 4 | ||||
-rw-r--r-- | clear.c | 4 | ||||
-rw-r--r-- | console-tools/clear.c | 4 | ||||
-rw-r--r-- | console-tools/loadkmap.c | 21 | ||||
-rw-r--r-- | coreutils/cat.c | 2 | ||||
-rw-r--r-- | coreutils/chroot.c | 4 | ||||
-rw-r--r-- | coreutils/cp.c | 4 | ||||
-rw-r--r-- | coreutils/date.c | 2 | ||||
-rw-r--r-- | coreutils/dd.c | 47 | ||||
-rw-r--r-- | coreutils/df.c | 225 | ||||
-rw-r--r-- | coreutils/ln.c | 4 | ||||
-rw-r--r-- | coreutils/mkdir.c | 4 | ||||
-rw-r--r-- | coreutils/mknod.c | 21 | ||||
-rw-r--r-- | coreutils/mv.c | 4 | ||||
-rw-r--r-- | coreutils/pwd.c | 24 | ||||
-rw-r--r-- | coreutils/rm.c | 4 | ||||
-rw-r--r-- | coreutils/rmdir.c | 4 | ||||
-rw-r--r-- | coreutils/sleep.c | 22 | ||||
-rw-r--r-- | coreutils/sync.c | 22 | ||||
-rw-r--r-- | coreutils/touch.c | 4 | ||||
-rw-r--r-- | cp.c | 4 | ||||
-rw-r--r-- | date.c | 2 | ||||
-rw-r--r-- | dd.c | 47 | ||||
-rw-r--r-- | df.c | 225 | ||||
-rw-r--r-- | fdflush.c | 4 | ||||
-rw-r--r-- | find.c | 4 | ||||
-rw-r--r-- | findutils/find.c | 4 | ||||
-rw-r--r-- | findutils/grep.c | 4 | ||||
-rw-r--r-- | grep.c | 4 | ||||
-rw-r--r-- | halt.c | 22 | ||||
-rw-r--r-- | init.c | 23 | ||||
-rw-r--r-- | init/halt.c | 22 | ||||
-rw-r--r-- | init/init.c | 23 | ||||
-rw-r--r-- | init/reboot.c | 22 | ||||
-rw-r--r-- | internal.h | 3 | ||||
-rw-r--r-- | kill.c | 22 | ||||
-rw-r--r-- | ln.c | 4 | ||||
-rw-r--r-- | loadkmap.c | 21 | ||||
-rw-r--r-- | miscutils/update.c | 22 | ||||
-rw-r--r-- | mkdir.c | 4 | ||||
-rw-r--r-- | mknod.c | 21 | ||||
-rw-r--r-- | more.c | 6 | ||||
-rw-r--r-- | mount.c | 10 | ||||
-rw-r--r-- | mv.c | 4 | ||||
-rw-r--r-- | procps/kill.c | 22 | ||||
-rw-r--r-- | procps/ps.c | 4 | ||||
-rw-r--r-- | ps.c | 4 | ||||
-rw-r--r-- | pwd.c | 24 | ||||
-rw-r--r-- | reboot.c | 22 | ||||
-rw-r--r-- | rm.c | 4 | ||||
-rw-r--r-- | rmdir.c | 4 | ||||
-rw-r--r-- | sleep.c | 22 | ||||
-rw-r--r-- | swaponoff.c | 4 | ||||
-rw-r--r-- | sync.c | 22 | ||||
-rw-r--r-- | tar.c | 22 | ||||
-rw-r--r-- | touch.c | 4 | ||||
-rw-r--r-- | true_false.c | 4 | ||||
-rw-r--r-- | umount.c | 4 | ||||
-rw-r--r-- | update.c | 22 | ||||
-rw-r--r-- | util-linux/fdflush.c | 4 | ||||
-rw-r--r-- | util-linux/more.c | 6 | ||||
-rw-r--r-- | util-linux/mount.c | 10 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 4 | ||||
-rw-r--r-- | util-linux/umount.c | 4 | ||||
-rw-r--r-- | utility.c | 5 |
75 files changed, 947 insertions, 322 deletions
@@ -1,3 +1,9 @@ | |||
1 | 0.30 | ||
2 | Major changes -- lots of stuff rewritten. Many thanks to Lineo for | ||
3 | paying me to make these updates. If you have any problems with busybox, | ||
4 | or notice any bugs -- please let me know so I can fix it. | ||
5 | -Erik Andersen | ||
6 | |||
1 | 0.28 | 7 | 0.28 |
2 | mini-netcat (mnc) rewritten. | 8 | mini-netcat (mnc) rewritten. |
3 | 9 | ||
@@ -8,4 +14,4 @@ | |||
8 | Printf added as module. | 14 | Printf added as module. |
9 | 0.26 | 15 | 0.26 |
10 | Touch now creates files. -c option for no create. | 16 | Touch now creates files. -c option for no create. |
11 | \ No newline at end of file | 17 | |
@@ -18,7 +18,10 @@ mini-gzip(gzip), mini-netcat(mnc) | |||
18 | Copyright 1998 Charles P. Wright <cpwright@villagenet.com> | 18 | Copyright 1998 Charles P. Wright <cpwright@villagenet.com> |
19 | 19 | ||
20 | 20 | ||
21 | Please see the top of the source files for more precise indivigual | 21 | bunches of stuff as noted in header files |
22 | Copyright (C) 1999 by Lineo, inc. and written by | ||
23 | Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
24 | |||
22 | copyright and license info. | 25 | copyright and license info. |
23 | 26 | ||
24 | This program suite may be distributed under the GNU General Public License. | 27 | This program suite may be distributed under the GNU General Public License. |
@@ -1,6 +1,23 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # This program is free software; you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation; either version 2 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | # | ||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
11 | # General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with this program; if not, write to the Free Software | ||
15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
16 | # | ||
17 | |||
1 | 18 | ||
2 | PROG=busybox | 19 | PROG=busybox |
3 | VERSION=0.29alpha1 | 20 | VERSION=0.30 |
4 | BUILDTIME=$(shell date "+%Y%m%d-%H%M") | 21 | BUILDTIME=$(shell date "+%Y%m%d-%H%M") |
5 | 22 | ||
6 | # Comment out the following to make a debuggable build | 23 | # Comment out the following to make a debuggable build |
@@ -3,9 +3,10 @@ Please see the LICENSE file for copyright information. | |||
3 | Busybox is a multicall binary used to provide a minimal subset of | 3 | Busybox is a multicall binary used to provide a minimal subset of |
4 | POSIX style commands and specialized functions. | 4 | POSIX style commands and specialized functions. |
5 | 5 | ||
6 | It is geared toward 'mini-systems' like boot floppies. Specifically | 6 | It is geared toward the very small, i.e. boot floppies, embedded- |
7 | it is used in the Debian Rescue/Install system (which caused the | 7 | systems, etc. Specifically it is used in the Debian Rescue/Install |
8 | original busybox to be made), the Linux Router Project, and others. | 8 | system (which caused the original busybox to be made), the Linux Router |
9 | Project, and others. | ||
9 | 10 | ||
10 | As of version 0.20 there is a version number. : ) | 11 | As of version 0.20 there is a version number. : ) |
11 | Also as of version 0.20, BB is modularized to allow an easy build of | 12 | Also as of version 0.20, BB is modularized to allow an easy build of |
@@ -23,9 +24,3 @@ to figure out by trial and error. | |||
23 | 24 | ||
24 | Please feed patches back to: | 25 | Please feed patches back to: |
25 | Erik Andersen <andersee@deban.org> | 26 | Erik Andersen <andersee@deban.org> |
26 | and | ||
27 | Bruce Perens <bruce@perens.com> | ||
28 | and | ||
29 | Dave Cinege <dcinege@psychosis.com> | ||
30 | and: | ||
31 | Enrique Zanardi <ezanardi@ull.es> | ||
diff --git a/applets/busybox.mkll b/applets/busybox.mkll index f79462b7f..facb6e8ac 100755 --- a/applets/busybox.mkll +++ b/applets/busybox.mkll | |||
@@ -7,7 +7,7 @@ MF="busybox.c" | |||
7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" | 7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" |
8 | 8 | ||
9 | for def in ${LIST}; do | 9 | for def in ${LIST}; do |
10 | i=`sed -n 's/^#ifdef '$def'.*\/\/\(.*$\)/\/\1\//gp' $MF` | 10 | i=`sed -n 's/^#ifdef \<'$def'\>.*\/\/\(.*$\)/\/\1\//gp' $MF` |
11 | j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` | 11 | j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` |
12 | for k in $j; do | 12 | for k in $j; do |
13 | echo $i$k | 13 | echo $i$k |
diff --git a/archival/tar.c b/archival/tar.c index b404ab025..c7ef3851c 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -1,13 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Mini tar implementation for busybox based on code taken from sash. | ||
3 | * | ||
2 | * Copyright (c) 1999 by David I. Bell | 4 | * Copyright (c) 1999 by David I. Bell |
3 | * Permission is granted to use, distribute, or modify this source, | 5 | * Permission is granted to use, distribute, or modify this source, |
4 | * provided that this copyright notice remains intact. | 6 | * provided that this copyright notice remains intact. |
5 | * | 7 | * |
6 | * The "tar" command, taken from sash. | ||
7 | * This allows creation, extraction, and listing of tar files. | ||
8 | * | ||
9 | * Permission to distribute this code under the GPL has been granted. | 8 | * Permission to distribute this code under the GPL has been granted. |
9 | * | ||
10 | * Modified for busybox by Erik Andersen <andersee@debian.org> | 10 | * Modified for busybox by Erik Andersen <andersee@debian.org> |
11 | * Adjusted to grok stdin/stdout options. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | * General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | * | ||
11 | */ | 27 | */ |
12 | 28 | ||
13 | 29 | ||
diff --git a/busybox.def.h b/busybox.def.h index 09379965c..692f24e49 100644 --- a/busybox.def.h +++ b/busybox.def.h | |||
@@ -14,12 +14,12 @@ | |||
14 | #define BB_DF | 14 | #define BB_DF |
15 | #define BB_DMESG | 15 | #define BB_DMESG |
16 | //#define BB_DUTMP | 16 | //#define BB_DUTMP |
17 | #define BB_FDFLUSH | 17 | //#define BB_FDFLUSH |
18 | #define BB_FIND | 18 | #define BB_FIND |
19 | #define BB_FSCK_MINIX | 19 | //#define BB_FSCK_MINIX |
20 | #define BB_MKFS_MINIX | 20 | //#define BB_MKFS_MINIX |
21 | #define BB_GREP | 21 | #define BB_GREP |
22 | #define BB_HALT | 22 | //#define BB_HALT |
23 | #define BB_INIT | 23 | #define BB_INIT |
24 | #define BB_KILL | 24 | #define BB_KILL |
25 | //#define BB_LENGTH | 25 | //#define BB_LENGTH |
@@ -35,7 +35,7 @@ | |||
35 | //#define BB_MNC | 35 | //#define BB_MNC |
36 | #define BB_MORE | 36 | #define BB_MORE |
37 | #define BB_MOUNT | 37 | #define BB_MOUNT |
38 | #define BB_MT | 38 | //#define BB_MT |
39 | #define BB_MV | 39 | #define BB_MV |
40 | //#define BB_PRINTF | 40 | //#define BB_PRINTF |
41 | #define BB_PS | 41 | #define BB_PS |
@@ -43,7 +43,7 @@ | |||
43 | #define BB_REBOOT | 43 | #define BB_REBOOT |
44 | #define BB_RM | 44 | #define BB_RM |
45 | #define BB_RMDIR | 45 | #define BB_RMDIR |
46 | #define BB_SFDISK | 46 | //#define BB_SFDISK |
47 | #define BB_SLEEP | 47 | #define BB_SLEEP |
48 | #define BB_SWAPONOFF | 48 | #define BB_SWAPONOFF |
49 | #define BB_SYNC | 49 | #define BB_SYNC |
diff --git a/busybox.mkll b/busybox.mkll index f79462b7f..facb6e8ac 100755 --- a/busybox.mkll +++ b/busybox.mkll | |||
@@ -7,7 +7,7 @@ MF="busybox.c" | |||
7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" | 7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" |
8 | 8 | ||
9 | for def in ${LIST}; do | 9 | for def in ${LIST}; do |
10 | i=`sed -n 's/^#ifdef '$def'.*\/\/\(.*$\)/\/\1\//gp' $MF` | 10 | i=`sed -n 's/^#ifdef \<'$def'\>.*\/\/\(.*$\)/\/\1\//gp' $MF` |
11 | j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` | 11 | j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` |
12 | for k in $j; do | 12 | for k in $j; do |
13 | echo $i$k | 13 | echo $i$k |
@@ -2,7 +2,7 @@ | |||
2 | * Mini Cat implementation for busybox | 2 | * Mini Cat implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Lineo, inc. | 4 | * Copyright (C) 1999 by Lineo, inc. |
5 | * Written by Erik Andersen <andersee@lineo.com>, <andersee@debian.org> | 5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c index 85ba247b8..8bda06861 100644 --- a/chmod_chown_chgrp.c +++ b/chmod_chown_chgrp.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini chown/chmod/chgrp implementation for busybox | 2 | * Mini chown/chmod/chgrp implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -107,7 +109,7 @@ int chmod_chown_chgrp_main(int argc, char **argv) | |||
107 | } else { | 109 | } else { |
108 | 110 | ||
109 | /* Find the selected group */ | 111 | /* Find the selected group */ |
110 | if ( whichApp==CHGRP_APP && groupName ) { | 112 | if ( whichApp==CHGRP_APP ) { |
111 | groupName = *argv; | 113 | groupName = *argv; |
112 | gid = my_getgrnam(groupName); | 114 | gid = my_getgrnam(groupName); |
113 | if (gid == -1) | 115 | if (gid == -1) |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini chroot implementation for busybox | 2 | * Mini chroot implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini clear implementation for busybox | 2 | * Mini clear implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/console-tools/clear.c b/console-tools/clear.c index bc813064e..67a3af983 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini clear implementation for busybox | 2 | * Mini clear implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 27865d58e..a228ca460 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
@@ -1,3 +1,24 @@ | |||
1 | /* | ||
2 | * Mini loadkmap implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1998 Enrique Zanardi <ezanardi@ull.es> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
1 | #include "internal.h" | 22 | #include "internal.h" |
2 | #include <errno.h> | 23 | #include <errno.h> |
3 | #include <fcntl.h> | 24 | #include <fcntl.h> |
diff --git a/coreutils/cat.c b/coreutils/cat.c index da91d1db9..1f4ef4af8 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Mini Cat implementation for busybox | 2 | * Mini Cat implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Lineo, inc. | 4 | * Copyright (C) 1999 by Lineo, inc. |
5 | * Written by Erik Andersen <andersee@lineo.com>, <andersee@debian.org> | 5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 15f446881..8e432b36c 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini chroot implementation for busybox | 2 | * Mini chroot implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/cp.c b/coreutils/cp.c index 34c12922d..9dac2afbc 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini cp implementation for busybox | 2 | * Mini cp implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/date.c b/coreutils/date.c index 51194848b..501ccc28f 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Mini date implementation for busybox | 2 | * Mini date implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Erik Andersen <andersee@debian.org> | 4 | * by Matthew Grant <grantma@anathoth.gen.nz> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 1cf731664..33c45940e 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -1,30 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * Mini dd implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * based in part on code taken from sash. | ||
7 | * | ||
2 | * Copyright (c) 1999 by David I. Bell | 8 | * Copyright (c) 1999 by David I. Bell |
3 | * Permission is granted to use, distribute, or modify this source, | 9 | * Permission is granted to use, distribute, or modify this source, |
4 | * provided that this copyright notice remains intact. | 10 | * provided that this copyright notice remains intact. |
5 | * | 11 | * |
6 | * The "dd" command, originally taken from sash. | ||
7 | * | ||
8 | * Permission to distribute this code under the GPL has been granted. | 12 | * Permission to distribute this code under the GPL has been granted. |
9 | * Mostly rewritten and bugs fixed for busybox by Erik Andersen <andersee@debian.org> | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
22 | * General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | * | ||
10 | */ | 28 | */ |
11 | 29 | ||
30 | |||
12 | #include "internal.h" | 31 | #include "internal.h" |
13 | #include <stdio.h> | 32 | #include <stdio.h> |
14 | #include <fcntl.h> | 33 | #include <fcntl.h> |
15 | #include <errno.h> | 34 | #include <errno.h> |
16 | 35 | ||
17 | static const char dd_usage[] = | 36 | static const char dd_usage[] = |
18 | "Copy a file, converting and formatting according to options\n\ | 37 | "dd [if=name] [of=name] [bs=n] [count=n]\n" |
19 | \n\ | 38 | "Copy a file, converting and formatting according to options\n\n" |
20 | usage: [if=name] [of=name] [bs=n] [count=n]\n\ | 39 | "\tif=FILE\tread from FILE instead of stdin\n" |
21 | \tif=FILE\tread from FILE instead of stdin\n\ | 40 | "\tof=FILE\twrite to FILE instead of stout\n" |
22 | \tof=FILE\twrite to FILE instead of stout\n\ | 41 | "\tbs=n\tread and write N BYTES at a time\n" |
23 | \tbs=n\tread and write N BYTES at a time\n\ | 42 | "\tcount=n\tcopy only n input blocks\n" |
24 | \tcount=n\tcopy only n input blocks\n\ | 43 | //"\tskip=n\tskip n input blocks\n" |
25 | \tskip=n\tskip n input blocks\n\ | 44 | "\n" |
26 | \n\ | 45 | "BYTES may be suffixed: by k for x1024, b for x512, and w for x2.\n"; |
27 | BYTES may be suffixed: by k for x1024, b for x512, and w for x2.\n"; | ||
28 | 46 | ||
29 | 47 | ||
30 | 48 | ||
@@ -118,6 +136,7 @@ extern int dd_main (int argc, char **argv) | |||
118 | goto usage; | 136 | goto usage; |
119 | } | 137 | } |
120 | } | 138 | } |
139 | #if 0 | ||
121 | else if (strncmp(*argv, "skip", 4) == 0) { | 140 | else if (strncmp(*argv, "skip", 4) == 0) { |
122 | skipBlocks = atoi( *argv); | 141 | skipBlocks = atoi( *argv); |
123 | if (skipBlocks <= 0) { | 142 | if (skipBlocks <= 0) { |
@@ -126,8 +145,8 @@ extern int dd_main (int argc, char **argv) | |||
126 | } | 145 | } |
127 | 146 | ||
128 | } | 147 | } |
148 | #endif | ||
129 | else { | 149 | else { |
130 | fprintf (stderr, "Got here. argv=%s\n", *argv); | ||
131 | goto usage; | 150 | goto usage; |
132 | } | 151 | } |
133 | argc--; | 152 | argc--; |
diff --git a/coreutils/df.c b/coreutils/df.c index 7a72bf8fd..f8a953f7d 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -1,3 +1,26 @@ | |||
1 | /* | ||
2 | * Mini df implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * based on original code by (I think) Bruce Perens <bruce@pixar.com>. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
1 | #include "internal.h" | 24 | #include "internal.h" |
2 | #include <stdio.h> | 25 | #include <stdio.h> |
3 | #include <mntent.h> | 26 | #include <mntent.h> |
@@ -5,42 +28,38 @@ | |||
5 | #include <sys/vfs.h> | 28 | #include <sys/vfs.h> |
6 | #include <fstab.h> | 29 | #include <fstab.h> |
7 | 30 | ||
8 | static const char df_usage[] = "df [filesystem ...]\n" | 31 | static const char df_usage[] = "df [filesystem ...]\n" |
9 | "\n" | 32 | "\n" "\tPrint the filesystem space used and space available.\n"; |
10 | "\tPrint the filesystem space used and space available.\n"; | ||
11 | 33 | ||
12 | 34 | ||
13 | static int | 35 | static int df(char *device, const char *mountPoint) |
14 | df(char* device, const char * mountPoint) | ||
15 | { | 36 | { |
16 | struct statfs s; | 37 | struct statfs s; |
17 | long blocks_used; | 38 | long blocks_used; |
18 | long blocks_percent_used; | 39 | long blocks_percent_used; |
19 | 40 | ||
20 | if ( statfs(mountPoint, &s) != 0 ) { | 41 | if (statfs(mountPoint, &s) != 0) { |
21 | perror(mountPoint); | 42 | perror(mountPoint); |
22 | return 1; | 43 | return 1; |
23 | } | 44 | } |
24 | 45 | ||
25 | if ( s.f_blocks > 0 ) { | 46 | if (s.f_blocks > 0) { |
26 | blocks_used = s.f_blocks - s.f_bfree; | 47 | blocks_used = s.f_blocks - s.f_bfree; |
27 | blocks_percent_used = (long) | 48 | blocks_percent_used = (long) |
28 | (blocks_used * 100.0 / (blocks_used + s.f_bavail) + 0.5); | 49 | (blocks_used * 100.0 / (blocks_used + s.f_bavail) + 0.5); |
29 | if ( strcmp(device, "/dev/root")==0) | 50 | if (strcmp(device, "/dev/root") == 0) |
30 | device=(getfsfile ("/"))->fs_spec; | 51 | device = (getfsfile("/"))->fs_spec; |
31 | 52 | ||
32 | printf( | 53 | printf("%-20s %9ld %9ld %9ld %3ld%% %s\n", |
33 | "%-20s %9ld %9ld %9ld %3ld%% %s\n", | 54 | device, |
34 | device, | 55 | (long) (s.f_blocks * (s.f_bsize / 1024.0)), |
35 | (long)(s.f_blocks * (s.f_bsize / 1024.0)), | 56 | (long) ((s.f_blocks - s.f_bfree) * (s.f_bsize / 1024.0)), |
36 | (long)((s.f_blocks - s.f_bfree) * (s.f_bsize / 1024.0)), | 57 | (long) (s.f_bavail * (s.f_bsize / 1024.0)), |
37 | (long)(s.f_bavail * (s.f_bsize / 1024.0)), | 58 | blocks_percent_used, mountPoint); |
38 | blocks_percent_used, | 59 | |
39 | mountPoint); | 60 | } |
40 | 61 | ||
41 | } | 62 | return 0; |
42 | |||
43 | return 0; | ||
44 | } | 63 | } |
45 | 64 | ||
46 | /* | 65 | /* |
@@ -50,87 +69,79 @@ df(char* device, const char * mountPoint) | |||
50 | * Given any other file (or directory), find the mount table entry for its | 69 | * Given any other file (or directory), find the mount table entry for its |
51 | * filesystem. | 70 | * filesystem. |
52 | */ | 71 | */ |
53 | extern struct mntent * | 72 | extern struct mntent *findMountPoint(const char *name, const char *table) |
54 | findMountPoint(const char* name, const char* table) | ||
55 | { | 73 | { |
56 | struct stat s; | 74 | struct stat s; |
57 | dev_t mountDevice; | 75 | dev_t mountDevice; |
58 | FILE * mountTable; | 76 | FILE *mountTable; |
59 | struct mntent * mountEntry; | 77 | struct mntent *mountEntry; |
60 | 78 | ||
61 | if ( stat(name, &s) != 0 ) | 79 | if (stat(name, &s) != 0) |
62 | return 0; | 80 | return 0; |
63 | 81 | ||
64 | if ( (s.st_mode & S_IFMT) == S_IFBLK ) | 82 | if ((s.st_mode & S_IFMT) == S_IFBLK) |
65 | mountDevice = s.st_rdev; | 83 | mountDevice = s.st_rdev; |
66 | else | 84 | else |
67 | mountDevice = s.st_dev; | 85 | mountDevice = s.st_dev; |
68 | 86 | ||
69 | 87 | ||
70 | if ( (mountTable = setmntent(table, "r")) == 0 ) | 88 | if ((mountTable = setmntent(table, "r")) == 0) |
71 | return 0; | 89 | return 0; |
72 | 90 | ||
73 | while ( (mountEntry = getmntent(mountTable)) != 0 ) { | 91 | while ((mountEntry = getmntent(mountTable)) != 0) { |
74 | if ( strcmp(name, mountEntry->mnt_dir) == 0 | 92 | if (strcmp(name, mountEntry->mnt_dir) == 0 |
75 | || strcmp(name, mountEntry->mnt_fsname) == 0 ) /* String match. */ | 93 | || strcmp(name, mountEntry->mnt_fsname) == 0) /* String match. */ |
76 | break; | 94 | break; |
77 | if ( stat(mountEntry->mnt_fsname, &s) == 0 | 95 | if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */ |
78 | && s.st_rdev == mountDevice ) /* Match the device. */ | 96 | break; |
79 | break; | 97 | if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice) /* Match the directory's mount point. */ |
80 | if ( stat(mountEntry->mnt_dir, &s) == 0 | 98 | break; |
81 | && s.st_dev == mountDevice ) /* Match the directory's mount point. */ | 99 | } |
82 | break; | 100 | endmntent(mountTable); |
83 | } | 101 | return mountEntry; |
84 | endmntent(mountTable); | ||
85 | return mountEntry; | ||
86 | } | 102 | } |
87 | 103 | ||
88 | 104 | ||
89 | 105 | ||
90 | extern int | 106 | extern int df_main(int argc, char **argv) |
91 | df_main(int argc, char * * argv) | ||
92 | { | 107 | { |
93 | printf("%-20s %-14s %s %s %s %s\n", "Filesystem", | 108 | printf("%-20s %-14s %s %s %s %s\n", "Filesystem", |
94 | "1k-blocks", "Used", "Available", "Use%", "Mounted on"); | 109 | "1k-blocks", "Used", "Available", "Use%", "Mounted on"); |
95 | 110 | ||
96 | if ( argc > 1 ) { | 111 | if (argc > 1) { |
97 | struct mntent* mountEntry; | 112 | struct mntent *mountEntry; |
98 | int status; | 113 | int status; |
99 | 114 | ||
100 | while ( argc > 1 ) { | 115 | while (argc > 1) { |
101 | if ( (mountEntry = findMountPoint(argv[1], "/proc/mounts")) == 0 ) | 116 | if ((mountEntry = findMountPoint(argv[1], "/proc/mounts")) == |
102 | { | 117 | 0) { |
103 | fprintf(stderr, "%s: can't find mount point.\n" ,argv[1]); | 118 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); |
104 | return 1; | 119 | return 1; |
105 | } | 120 | } |
106 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | 121 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); |
107 | if ( status != 0 ) | 122 | if (status != 0) |
108 | return status; | 123 | return status; |
109 | argc--; | 124 | argc--; |
110 | argv++; | 125 | argv++; |
111 | } | ||
112 | return 0; | ||
113 | } | ||
114 | else { | ||
115 | FILE * mountTable; | ||
116 | struct mntent * mountEntry; | ||
117 | |||
118 | mountTable = setmntent("/proc/mounts", "r"); | ||
119 | if ( mountTable == 0) { | ||
120 | perror("/proc/mounts"); | ||
121 | exit( FALSE); | ||
122 | } | ||
123 | |||
124 | while ( (mountEntry = getmntent (mountTable))) { | ||
125 | int status=df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | ||
126 | if (status) | ||
127 | return status; | ||
128 | } | ||
129 | endmntent(mountTable); | ||
130 | } | 126 | } |
131 | |||
132 | return 0; | 127 | return 0; |
133 | } | 128 | } else { |
134 | 129 | FILE *mountTable; | |
130 | struct mntent *mountEntry; | ||
131 | |||
132 | mountTable = setmntent("/proc/mounts", "r"); | ||
133 | if (mountTable == 0) { | ||
134 | perror("/proc/mounts"); | ||
135 | exit(FALSE); | ||
136 | } | ||
135 | 137 | ||
138 | while ((mountEntry = getmntent(mountTable))) { | ||
139 | int status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | ||
140 | if (status) | ||
141 | return status; | ||
142 | } | ||
143 | endmntent(mountTable); | ||
144 | } | ||
136 | 145 | ||
146 | return 0; | ||
147 | } | ||
diff --git a/coreutils/ln.c b/coreutils/ln.c index 8f7719fa4..1e30e2b29 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini ln implementation for busybox | 2 | * Mini ln implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index cf65f272f..98c8d8f08 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mkdir implementation for busybox | 2 | * Mini mkdir implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index ea2331fa3..81c846b98 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -1,3 +1,24 @@ | |||
1 | /* | ||
2 | * Mini mknod implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
1 | #include "internal.h" | 22 | #include "internal.h" |
2 | #include <stdio.h> | 23 | #include <stdio.h> |
3 | #include <errno.h> | 24 | #include <errno.h> |
diff --git a/coreutils/mv.c b/coreutils/mv.c index ab3fc2bd5..e502250ec 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mv implementation for busybox | 2 | * Mini mv implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 2ad019d50..c5ce6ff89 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -1,9 +1,29 @@ | |||
1 | /* | ||
2 | * Mini pwd implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <dirent.h> | 25 | #include <dirent.h> |
4 | 26 | ||
5 | const char pwd_usage[] = "Print the current directory.\n"; | ||
6 | |||
7 | extern int | 27 | extern int |
8 | pwd_main(int argc, char * * argv) | 28 | pwd_main(int argc, char * * argv) |
9 | { | 29 | { |
diff --git a/coreutils/rm.c b/coreutils/rm.c index dd8dfa4e6..f49ada5e1 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini rm implementation for busybox | 2 | * Mini rm implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 666e0476a..56b838736 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini rmdir implementation for busybox | 2 | * Mini rmdir implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 7e38a3667..826697824 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini sleep implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | 25 | ||
diff --git a/coreutils/sync.c b/coreutils/sync.c index 8800f2e76..b9f52c8b0 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini sync implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | 25 | ||
diff --git a/coreutils/touch.c b/coreutils/touch.c index d882a6319..b98a2e4c8 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini touch implementation for busybox | 2 | * Mini touch implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini cp implementation for busybox | 2 | * Mini cp implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Mini date implementation for busybox | 2 | * Mini date implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Erik Andersen <andersee@debian.org> | 4 | * by Matthew Grant <grantma@anathoth.gen.nz> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -1,30 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * Mini dd implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * based in part on code taken from sash. | ||
7 | * | ||
2 | * Copyright (c) 1999 by David I. Bell | 8 | * Copyright (c) 1999 by David I. Bell |
3 | * Permission is granted to use, distribute, or modify this source, | 9 | * Permission is granted to use, distribute, or modify this source, |
4 | * provided that this copyright notice remains intact. | 10 | * provided that this copyright notice remains intact. |
5 | * | 11 | * |
6 | * The "dd" command, originally taken from sash. | ||
7 | * | ||
8 | * Permission to distribute this code under the GPL has been granted. | 12 | * Permission to distribute this code under the GPL has been granted. |
9 | * Mostly rewritten and bugs fixed for busybox by Erik Andersen <andersee@debian.org> | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
22 | * General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | * | ||
10 | */ | 28 | */ |
11 | 29 | ||
30 | |||
12 | #include "internal.h" | 31 | #include "internal.h" |
13 | #include <stdio.h> | 32 | #include <stdio.h> |
14 | #include <fcntl.h> | 33 | #include <fcntl.h> |
15 | #include <errno.h> | 34 | #include <errno.h> |
16 | 35 | ||
17 | static const char dd_usage[] = | 36 | static const char dd_usage[] = |
18 | "Copy a file, converting and formatting according to options\n\ | 37 | "dd [if=name] [of=name] [bs=n] [count=n]\n" |
19 | \n\ | 38 | "Copy a file, converting and formatting according to options\n\n" |
20 | usage: [if=name] [of=name] [bs=n] [count=n]\n\ | 39 | "\tif=FILE\tread from FILE instead of stdin\n" |
21 | \tif=FILE\tread from FILE instead of stdin\n\ | 40 | "\tof=FILE\twrite to FILE instead of stout\n" |
22 | \tof=FILE\twrite to FILE instead of stout\n\ | 41 | "\tbs=n\tread and write N BYTES at a time\n" |
23 | \tbs=n\tread and write N BYTES at a time\n\ | 42 | "\tcount=n\tcopy only n input blocks\n" |
24 | \tcount=n\tcopy only n input blocks\n\ | 43 | //"\tskip=n\tskip n input blocks\n" |
25 | \tskip=n\tskip n input blocks\n\ | 44 | "\n" |
26 | \n\ | 45 | "BYTES may be suffixed: by k for x1024, b for x512, and w for x2.\n"; |
27 | BYTES may be suffixed: by k for x1024, b for x512, and w for x2.\n"; | ||
28 | 46 | ||
29 | 47 | ||
30 | 48 | ||
@@ -118,6 +136,7 @@ extern int dd_main (int argc, char **argv) | |||
118 | goto usage; | 136 | goto usage; |
119 | } | 137 | } |
120 | } | 138 | } |
139 | #if 0 | ||
121 | else if (strncmp(*argv, "skip", 4) == 0) { | 140 | else if (strncmp(*argv, "skip", 4) == 0) { |
122 | skipBlocks = atoi( *argv); | 141 | skipBlocks = atoi( *argv); |
123 | if (skipBlocks <= 0) { | 142 | if (skipBlocks <= 0) { |
@@ -126,8 +145,8 @@ extern int dd_main (int argc, char **argv) | |||
126 | } | 145 | } |
127 | 146 | ||
128 | } | 147 | } |
148 | #endif | ||
129 | else { | 149 | else { |
130 | fprintf (stderr, "Got here. argv=%s\n", *argv); | ||
131 | goto usage; | 150 | goto usage; |
132 | } | 151 | } |
133 | argc--; | 152 | argc--; |
@@ -1,3 +1,26 @@ | |||
1 | /* | ||
2 | * Mini df implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * based on original code by (I think) Bruce Perens <bruce@pixar.com>. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
1 | #include "internal.h" | 24 | #include "internal.h" |
2 | #include <stdio.h> | 25 | #include <stdio.h> |
3 | #include <mntent.h> | 26 | #include <mntent.h> |
@@ -5,42 +28,38 @@ | |||
5 | #include <sys/vfs.h> | 28 | #include <sys/vfs.h> |
6 | #include <fstab.h> | 29 | #include <fstab.h> |
7 | 30 | ||
8 | static const char df_usage[] = "df [filesystem ...]\n" | 31 | static const char df_usage[] = "df [filesystem ...]\n" |
9 | "\n" | 32 | "\n" "\tPrint the filesystem space used and space available.\n"; |
10 | "\tPrint the filesystem space used and space available.\n"; | ||
11 | 33 | ||
12 | 34 | ||
13 | static int | 35 | static int df(char *device, const char *mountPoint) |
14 | df(char* device, const char * mountPoint) | ||
15 | { | 36 | { |
16 | struct statfs s; | 37 | struct statfs s; |
17 | long blocks_used; | 38 | long blocks_used; |
18 | long blocks_percent_used; | 39 | long blocks_percent_used; |
19 | 40 | ||
20 | if ( statfs(mountPoint, &s) != 0 ) { | 41 | if (statfs(mountPoint, &s) != 0) { |
21 | perror(mountPoint); | 42 | perror(mountPoint); |
22 | return 1; | 43 | return 1; |
23 | } | 44 | } |
24 | 45 | ||
25 | if ( s.f_blocks > 0 ) { | 46 | if (s.f_blocks > 0) { |
26 | blocks_used = s.f_blocks - s.f_bfree; | 47 | blocks_used = s.f_blocks - s.f_bfree; |
27 | blocks_percent_used = (long) | 48 | blocks_percent_used = (long) |
28 | (blocks_used * 100.0 / (blocks_used + s.f_bavail) + 0.5); | 49 | (blocks_used * 100.0 / (blocks_used + s.f_bavail) + 0.5); |
29 | if ( strcmp(device, "/dev/root")==0) | 50 | if (strcmp(device, "/dev/root") == 0) |
30 | device=(getfsfile ("/"))->fs_spec; | 51 | device = (getfsfile("/"))->fs_spec; |
31 | 52 | ||
32 | printf( | 53 | printf("%-20s %9ld %9ld %9ld %3ld%% %s\n", |
33 | "%-20s %9ld %9ld %9ld %3ld%% %s\n", | 54 | device, |
34 | device, | 55 | (long) (s.f_blocks * (s.f_bsize / 1024.0)), |
35 | (long)(s.f_blocks * (s.f_bsize / 1024.0)), | 56 | (long) ((s.f_blocks - s.f_bfree) * (s.f_bsize / 1024.0)), |
36 | (long)((s.f_blocks - s.f_bfree) * (s.f_bsize / 1024.0)), | 57 | (long) (s.f_bavail * (s.f_bsize / 1024.0)), |
37 | (long)(s.f_bavail * (s.f_bsize / 1024.0)), | 58 | blocks_percent_used, mountPoint); |
38 | blocks_percent_used, | 59 | |
39 | mountPoint); | 60 | } |
40 | 61 | ||
41 | } | 62 | return 0; |
42 | |||
43 | return 0; | ||
44 | } | 63 | } |
45 | 64 | ||
46 | /* | 65 | /* |
@@ -50,87 +69,79 @@ df(char* device, const char * mountPoint) | |||
50 | * Given any other file (or directory), find the mount table entry for its | 69 | * Given any other file (or directory), find the mount table entry for its |
51 | * filesystem. | 70 | * filesystem. |
52 | */ | 71 | */ |
53 | extern struct mntent * | 72 | extern struct mntent *findMountPoint(const char *name, const char *table) |
54 | findMountPoint(const char* name, const char* table) | ||
55 | { | 73 | { |
56 | struct stat s; | 74 | struct stat s; |
57 | dev_t mountDevice; | 75 | dev_t mountDevice; |
58 | FILE * mountTable; | 76 | FILE *mountTable; |
59 | struct mntent * mountEntry; | 77 | struct mntent *mountEntry; |
60 | 78 | ||
61 | if ( stat(name, &s) != 0 ) | 79 | if (stat(name, &s) != 0) |
62 | return 0; | 80 | return 0; |
63 | 81 | ||
64 | if ( (s.st_mode & S_IFMT) == S_IFBLK ) | 82 | if ((s.st_mode & S_IFMT) == S_IFBLK) |
65 | mountDevice = s.st_rdev; | 83 | mountDevice = s.st_rdev; |
66 | else | 84 | else |
67 | mountDevice = s.st_dev; | 85 | mountDevice = s.st_dev; |
68 | 86 | ||
69 | 87 | ||
70 | if ( (mountTable = setmntent(table, "r")) == 0 ) | 88 | if ((mountTable = setmntent(table, "r")) == 0) |
71 | return 0; | 89 | return 0; |
72 | 90 | ||
73 | while ( (mountEntry = getmntent(mountTable)) != 0 ) { | 91 | while ((mountEntry = getmntent(mountTable)) != 0) { |
74 | if ( strcmp(name, mountEntry->mnt_dir) == 0 | 92 | if (strcmp(name, mountEntry->mnt_dir) == 0 |
75 | || strcmp(name, mountEntry->mnt_fsname) == 0 ) /* String match. */ | 93 | || strcmp(name, mountEntry->mnt_fsname) == 0) /* String match. */ |
76 | break; | 94 | break; |
77 | if ( stat(mountEntry->mnt_fsname, &s) == 0 | 95 | if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */ |
78 | && s.st_rdev == mountDevice ) /* Match the device. */ | 96 | break; |
79 | break; | 97 | if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice) /* Match the directory's mount point. */ |
80 | if ( stat(mountEntry->mnt_dir, &s) == 0 | 98 | break; |
81 | && s.st_dev == mountDevice ) /* Match the directory's mount point. */ | 99 | } |
82 | break; | 100 | endmntent(mountTable); |
83 | } | 101 | return mountEntry; |
84 | endmntent(mountTable); | ||
85 | return mountEntry; | ||
86 | } | 102 | } |
87 | 103 | ||
88 | 104 | ||
89 | 105 | ||
90 | extern int | 106 | extern int df_main(int argc, char **argv) |
91 | df_main(int argc, char * * argv) | ||
92 | { | 107 | { |
93 | printf("%-20s %-14s %s %s %s %s\n", "Filesystem", | 108 | printf("%-20s %-14s %s %s %s %s\n", "Filesystem", |
94 | "1k-blocks", "Used", "Available", "Use%", "Mounted on"); | 109 | "1k-blocks", "Used", "Available", "Use%", "Mounted on"); |
95 | 110 | ||
96 | if ( argc > 1 ) { | 111 | if (argc > 1) { |
97 | struct mntent* mountEntry; | 112 | struct mntent *mountEntry; |
98 | int status; | 113 | int status; |
99 | 114 | ||
100 | while ( argc > 1 ) { | 115 | while (argc > 1) { |
101 | if ( (mountEntry = findMountPoint(argv[1], "/proc/mounts")) == 0 ) | 116 | if ((mountEntry = findMountPoint(argv[1], "/proc/mounts")) == |
102 | { | 117 | 0) { |
103 | fprintf(stderr, "%s: can't find mount point.\n" ,argv[1]); | 118 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); |
104 | return 1; | 119 | return 1; |
105 | } | 120 | } |
106 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | 121 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); |
107 | if ( status != 0 ) | 122 | if (status != 0) |
108 | return status; | 123 | return status; |
109 | argc--; | 124 | argc--; |
110 | argv++; | 125 | argv++; |
111 | } | ||
112 | return 0; | ||
113 | } | ||
114 | else { | ||
115 | FILE * mountTable; | ||
116 | struct mntent * mountEntry; | ||
117 | |||
118 | mountTable = setmntent("/proc/mounts", "r"); | ||
119 | if ( mountTable == 0) { | ||
120 | perror("/proc/mounts"); | ||
121 | exit( FALSE); | ||
122 | } | ||
123 | |||
124 | while ( (mountEntry = getmntent (mountTable))) { | ||
125 | int status=df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | ||
126 | if (status) | ||
127 | return status; | ||
128 | } | ||
129 | endmntent(mountTable); | ||
130 | } | 126 | } |
131 | |||
132 | return 0; | 127 | return 0; |
133 | } | 128 | } else { |
134 | 129 | FILE *mountTable; | |
130 | struct mntent *mountEntry; | ||
131 | |||
132 | mountTable = setmntent("/proc/mounts", "r"); | ||
133 | if (mountTable == 0) { | ||
134 | perror("/proc/mounts"); | ||
135 | exit(FALSE); | ||
136 | } | ||
135 | 137 | ||
138 | while ((mountEntry = getmntent(mountTable))) { | ||
139 | int status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | ||
140 | if (status) | ||
141 | return status; | ||
142 | } | ||
143 | endmntent(mountTable); | ||
144 | } | ||
136 | 145 | ||
146 | return 0; | ||
147 | } | ||
@@ -1,8 +1,8 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Mini fdflush implementation for busybox | 2 | * Mini fdflush implementation for busybox |
4 | * | 3 | * |
5 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini find implementation for busybox | 2 | * Mini find implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/findutils/find.c b/findutils/find.c index 51b8707da..1db332297 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini find implementation for busybox | 2 | * Mini find implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/findutils/grep.c b/findutils/grep.c index 108c879af..a495c62ae 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini grep implementation for busybox | 2 | * Mini grep implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini grep implementation for busybox | 2 | * Mini grep implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini halt implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <signal.h> | 24 | #include <signal.h> |
3 | 25 | ||
@@ -1,3 +1,26 @@ | |||
1 | /* | ||
2 | * Mini init implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * Adjusted by so many folks, it's impossible to keep track. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
1 | #include "internal.h" | 24 | #include "internal.h" |
2 | #include <stdio.h> | 25 | #include <stdio.h> |
3 | #include <stdlib.h> | 26 | #include <stdlib.h> |
diff --git a/init/halt.c b/init/halt.c index 0dbdc55f1..ecc6e8f30 100644 --- a/init/halt.c +++ b/init/halt.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini halt implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <signal.h> | 24 | #include <signal.h> |
3 | 25 | ||
diff --git a/init/init.c b/init/init.c index 62865451a..c32124dd0 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -1,3 +1,26 @@ | |||
1 | /* | ||
2 | * Mini init implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * Adjusted by so many folks, it's impossible to keep track. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
1 | #include "internal.h" | 24 | #include "internal.h" |
2 | #include <stdio.h> | 25 | #include <stdio.h> |
3 | #include <stdlib.h> | 26 | #include <stdlib.h> |
diff --git a/init/reboot.c b/init/reboot.c index f915205ea..53a3520e1 100644 --- a/init/reboot.c +++ b/init/reboot.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini reboot implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <signal.h> | 24 | #include <signal.h> |
3 | 25 | ||
diff --git a/internal.h b/internal.h index f2c2d8a7d..d23dca31e 100644 --- a/internal.h +++ b/internal.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Busybox main header file | 2 | * Busybox main internal header file |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | ||
5 | * | 4 | * |
6 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini kill implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <stdlib.h> | 25 | #include <stdlib.h> |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini ln implementation for busybox | 2 | * Mini ln implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/loadkmap.c b/loadkmap.c index 27865d58e..a228ca460 100644 --- a/loadkmap.c +++ b/loadkmap.c | |||
@@ -1,3 +1,24 @@ | |||
1 | /* | ||
2 | * Mini loadkmap implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1998 Enrique Zanardi <ezanardi@ull.es> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
1 | #include "internal.h" | 22 | #include "internal.h" |
2 | #include <errno.h> | 23 | #include <errno.h> |
3 | #include <fcntl.h> | 24 | #include <fcntl.h> |
diff --git a/miscutils/update.c b/miscutils/update.c index 3a8cd37ee..5a7c755ff 100644 --- a/miscutils/update.c +++ b/miscutils/update.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini update implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <linux/unistd.h> | 24 | #include <linux/unistd.h> |
3 | 25 | ||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mkdir implementation for busybox | 2 | * Mini mkdir implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,24 @@ | |||
1 | /* | ||
2 | * Mini mknod implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
1 | #include "internal.h" | 22 | #include "internal.h" |
2 | #include <stdio.h> | 23 | #include <stdio.h> |
3 | #include <errno.h> | 24 | #include <errno.h> |
@@ -1,7 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Mini more implementation for busybox | 2 | * Mini more implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Blended by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
7 | * based on the original more implementation and code from the Debian | ||
8 | * boot-floppies team. | ||
5 | * | 9 | * |
6 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mount implementation for busybox | 2 | * Mini mount implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Erik Andersen <andersee@debian.org> | 4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -22,8 +22,12 @@ | |||
22 | * will try mounting stuff with all fses when passed -t auto | 22 | * will try mounting stuff with all fses when passed -t auto |
23 | * | 23 | * |
24 | * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab. | 24 | * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab. |
25 | * 1999-10-07 Erik Andersen. Rewrote of a lot of code. Removed mtab | 25 | * |
26 | * usage, major adjustments, and some serious dieting all around. | 26 | * 1999-10-07 Erik Andersen <andersen@lineo.com>, <andersee@debian.org>. |
27 | * Rewrote of a lot of code. Removed mtab usage (I plan on | ||
28 | * putting it back as a compile-time option some time), | ||
29 | * major adjustments to option parsing, and some serious | ||
30 | * dieting all around. | ||
27 | */ | 31 | */ |
28 | 32 | ||
29 | #include "internal.h" | 33 | #include "internal.h" |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mv implementation for busybox | 2 | * Mini mv implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/procps/kill.c b/procps/kill.c index e89f913d0..2fabf56d2 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini kill implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <stdlib.h> | 25 | #include <stdlib.h> |
diff --git a/procps/ps.c b/procps/ps.c index 97a5d6ba2..d8a4233da 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini ps implementation for busybox | 2 | * Mini ps implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini ps implementation for busybox | 2 | * Mini ps implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,9 +1,29 @@ | |||
1 | /* | ||
2 | * Mini pwd implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | #include <dirent.h> | 25 | #include <dirent.h> |
4 | 26 | ||
5 | const char pwd_usage[] = "Print the current directory.\n"; | ||
6 | |||
7 | extern int | 27 | extern int |
8 | pwd_main(int argc, char * * argv) | 28 | pwd_main(int argc, char * * argv) |
9 | { | 29 | { |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini reboot implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <signal.h> | 24 | #include <signal.h> |
3 | 25 | ||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini rm implementation for busybox | 2 | * Mini rm implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini rmdir implementation for busybox | 2 | * Mini rmdir implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini sleep implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | 25 | ||
diff --git a/swaponoff.c b/swaponoff.c index 5a2d735ad..8eaf9797c 100644 --- a/swaponoff.c +++ b/swaponoff.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini swapon/swapoff implementation for busybox | 2 | * Mini swapon/swapoff implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini sync implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <stdio.h> | 24 | #include <stdio.h> |
3 | 25 | ||
@@ -1,13 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Mini tar implementation for busybox based on code taken from sash. | ||
3 | * | ||
2 | * Copyright (c) 1999 by David I. Bell | 4 | * Copyright (c) 1999 by David I. Bell |
3 | * Permission is granted to use, distribute, or modify this source, | 5 | * Permission is granted to use, distribute, or modify this source, |
4 | * provided that this copyright notice remains intact. | 6 | * provided that this copyright notice remains intact. |
5 | * | 7 | * |
6 | * The "tar" command, taken from sash. | ||
7 | * This allows creation, extraction, and listing of tar files. | ||
8 | * | ||
9 | * Permission to distribute this code under the GPL has been granted. | 8 | * Permission to distribute this code under the GPL has been granted. |
9 | * | ||
10 | * Modified for busybox by Erik Andersen <andersee@debian.org> | 10 | * Modified for busybox by Erik Andersen <andersee@debian.org> |
11 | * Adjusted to grok stdin/stdout options. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | * General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | * | ||
11 | */ | 27 | */ |
12 | 28 | ||
13 | 29 | ||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini touch implementation for busybox | 2 | * Mini touch implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/true_false.c b/true_false.c index e0ea95946..feaa9297d 100644 --- a/true_false.c +++ b/true_false.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini true/false implementation for busybox | 2 | * Mini true/false implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini umount implementation for busybox | 2 | * Mini umount implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,3 +1,25 @@ | |||
1 | /* | ||
2 | * Mini update implementation for busybox | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
1 | #include "internal.h" | 23 | #include "internal.h" |
2 | #include <linux/unistd.h> | 24 | #include <linux/unistd.h> |
3 | 25 | ||
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c index 58b8b37d6..51b0c2bac 100644 --- a/util-linux/fdflush.c +++ b/util-linux/fdflush.c | |||
@@ -1,8 +1,8 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Mini fdflush implementation for busybox | 2 | * Mini fdflush implementation for busybox |
4 | * | 3 | * |
5 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | ||
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/more.c b/util-linux/more.c index 72d58a6f4..bc3850510 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -1,7 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Mini more implementation for busybox | 2 | * Mini more implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Blended by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
7 | * based on the original more implementation and code from the Debian | ||
8 | * boot-floppies team. | ||
5 | * | 9 | * |
6 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/mount.c b/util-linux/mount.c index a7d5aed2d..562b7e821 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Mini mount implementation for busybox | 2 | * Mini mount implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1999 by Erik Andersen <andersee@debian.org> | 4 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -22,8 +22,12 @@ | |||
22 | * will try mounting stuff with all fses when passed -t auto | 22 | * will try mounting stuff with all fses when passed -t auto |
23 | * | 23 | * |
24 | * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab. | 24 | * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab. |
25 | * 1999-10-07 Erik Andersen. Rewrote of a lot of code. Removed mtab | 25 | * |
26 | * usage, major adjustments, and some serious dieting all around. | 26 | * 1999-10-07 Erik Andersen <andersen@lineo.com>, <andersee@debian.org>. |
27 | * Rewrote of a lot of code. Removed mtab usage (I plan on | ||
28 | * putting it back as a compile-time option some time), | ||
29 | * major adjustments to option parsing, and some serious | ||
30 | * dieting all around. | ||
27 | */ | 31 | */ |
28 | 32 | ||
29 | #include "internal.h" | 33 | #include "internal.h" |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 5a2d735ad..8eaf9797c 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini swapon/swapoff implementation for busybox | 2 | * Mini swapon/swapoff implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 48efbd349..95f7dfb3c 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Mini umount implementation for busybox | 2 | * Mini umount implementation for busybox |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * |
5 | * Copyright (C) 1999 by Lineo, inc. | ||
6 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Utility routines. | 2 | * Utility routines. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | 4 | * Copyright (C) tons of folks. Tracking down who wrote what |
5 | * isn't something I'm going to worry about... If you wrote something | ||
6 | * here, please feel free to acknowledge your work. | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -86,6 +88,7 @@ int isDirectory(const char *name) | |||
86 | * and modes. Returns TRUE if successful, or FALSE on a failure with an | 88 | * and modes. Returns TRUE if successful, or FALSE on a failure with an |
87 | * error message output. (Failure is not indicted if the attributes cannot | 89 | * error message output. (Failure is not indicted if the attributes cannot |
88 | * be set.) | 90 | * be set.) |
91 | * -Erik Andersen | ||
89 | */ | 92 | */ |
90 | int | 93 | int |
91 | copyFile( const char *srcName, const char *destName, | 94 | copyFile( const char *srcName, const char *destName, |