diff options
Diffstat (limited to 'coreutils')
-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 |
16 files changed, 264 insertions, 133 deletions
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 |