diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-11-23 21:38:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-11-23 21:38:12 +0000 |
commit | 394f764e7d059e979f72ba88c31f4fa94a252ebf (patch) | |
tree | 3663c1184286a33a63f1cc88cebe4c7a79f38314 | |
parent | cb41c2e83b9e9997b9737d7061d53f7c11a463a8 (diff) | |
download | busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.tar.gz busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.tar.bz2 busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.zip |
Stuf
-rw-r--r-- | Changelog | 4 | ||||
-rw-r--r-- | TODO | 9 | ||||
-rw-r--r-- | cat.c | 4 | ||||
-rw-r--r-- | coreutils/cat.c | 4 | ||||
-rw-r--r-- | coreutils/ls.c | 27 | ||||
-rw-r--r-- | ls.c | 27 |
6 files changed, 49 insertions, 26 deletions
@@ -6,6 +6,10 @@ | |||
6 | * Several options are now moved into busybox.defs.h | 6 | * Several options are now moved into busybox.defs.h |
7 | * Now 'rm -R' and 'rm -r' both work. | 7 | * Now 'rm -R' and 'rm -r' both work. |
8 | * dd now properly handles input beyond 1 block from stdin. | 8 | * dd now properly handles input beyond 1 block from stdin. |
9 | * Fixed a bug where tar unpacked everything a directories. Moved some code | ||
10 | from createPath into mkdir where it belonged, thereby making tar work properly. | ||
11 | * Fixed an off-by-one bug in cat. Given a list of file it wouldn't cat out the | ||
12 | last file in the list. | ||
9 | 13 | ||
10 | -Erik Andrsen | 14 | -Erik Andrsen |
11 | 15 | ||
@@ -0,0 +1,9 @@ | |||
1 | TODO list for busybox in no particular order | ||
2 | |||
3 | * Add in a mini syslogd | ||
4 | * Allow tar to create archives with sockets, devices, and other special files | ||
5 | * Add in a mini modprobe, insmod, rmmod | ||
6 | * poweroff | ||
7 | * Change init so halt, reboot (and poweroff) work with an initrd | ||
8 | when init is not PID 1 | ||
9 | * | ||
@@ -49,14 +49,12 @@ extern int cat_main(int argc, char **argv) | |||
49 | argv++; | 49 | argv++; |
50 | 50 | ||
51 | while (argc-- > 0) { | 51 | while (argc-- > 0) { |
52 | file = fopen(*argv, "r"); | 52 | file = fopen(*(argv++), "r"); |
53 | if (file == NULL) { | 53 | if (file == NULL) { |
54 | perror(*argv); | 54 | perror(*argv); |
55 | exit(FALSE); | 55 | exit(FALSE); |
56 | } | 56 | } |
57 | print_file( file); | 57 | print_file( file); |
58 | argc--; | ||
59 | argv++; | ||
60 | } | 58 | } |
61 | exit(TRUE); | 59 | exit(TRUE); |
62 | } | 60 | } |
diff --git a/coreutils/cat.c b/coreutils/cat.c index 1f4ef4af8..758a83e6b 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -49,14 +49,12 @@ extern int cat_main(int argc, char **argv) | |||
49 | argv++; | 49 | argv++; |
50 | 50 | ||
51 | while (argc-- > 0) { | 51 | while (argc-- > 0) { |
52 | file = fopen(*argv, "r"); | 52 | file = fopen(*(argv++), "r"); |
53 | if (file == NULL) { | 53 | if (file == NULL) { |
54 | perror(*argv); | 54 | perror(*argv); |
55 | exit(FALSE); | 55 | exit(FALSE); |
56 | } | 56 | } |
57 | print_file( file); | 57 | print_file( file); |
58 | argc--; | ||
59 | argv++; | ||
60 | } | 58 | } |
61 | exit(TRUE); | 59 | exit(TRUE); |
62 | } | 60 | } |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 3b380671d..571c962c7 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -193,27 +193,34 @@ static void list_single(const char *name, struct stat *info, const char *fullnam | |||
193 | fputs(" ", stdout); | 193 | fputs(" ", stdout); |
194 | #ifdef BB_FEATURE_LS_USERNAME | 194 | #ifdef BB_FEATURE_LS_USERNAME |
195 | if (!(opts & DISP_NUMERIC)) { | 195 | if (!(opts & DISP_NUMERIC)) { |
196 | scratch[8]='\0'; | 196 | scratch[0]='\0'; |
197 | my_getpwuid( scratch, info->st_uid); | 197 | my_getpwuid( scratch, info->st_uid); |
198 | scratch[8]='\0'; | ||
198 | if (*scratch) | 199 | if (*scratch) |
199 | fputs(scratch, stdout); | 200 | wr(scratch,8); |
200 | else | 201 | else { |
201 | writenum((long)info->st_uid,(short)0); | 202 | writenum((long) info->st_uid,(short)8); |
203 | fputs(" ", stdout); | ||
204 | } | ||
202 | } else | 205 | } else |
203 | #endif | 206 | #endif |
204 | writenum((long)info->st_uid,(short)0); | 207 | { |
208 | writenum((long) info->st_uid,(short)8); | ||
209 | fputs(" ", stdout); | ||
210 | } | ||
205 | tab(16); | 211 | tab(16); |
206 | #ifdef BB_FEATURE_LS_USERNAME | 212 | #ifdef BB_FEATURE_LS_USERNAME |
207 | if (!(opts & DISP_NUMERIC)) { | 213 | if (!(opts & DISP_NUMERIC)) { |
208 | scratch[8]='\0'; | 214 | scratch[0]='\0'; |
209 | my_getgrgid( scratch, info->st_gid); | 215 | my_getgrgid( scratch, info->st_gid); |
216 | scratch[8]='\0'; | ||
210 | if (*scratch) | 217 | if (*scratch) |
211 | fputs(scratch, stdout); | 218 | wr(scratch,8); |
212 | else | 219 | else |
213 | writenum((long)info->st_gid,(short)0); | 220 | writenum((long) info->st_gid,(short)8); |
214 | } else | 221 | } else |
215 | #endif | 222 | #endif |
216 | writenum((long)info->st_gid,(short)0); | 223 | writenum((long) info->st_gid,(short)8); |
217 | tab(17); | 224 | tab(17); |
218 | if (S_ISBLK(mode) || S_ISCHR(mode)) { | 225 | if (S_ISBLK(mode) || S_ISCHR(mode)) { |
219 | writenum((long)MAJOR(info->st_rdev),(short)3); | 226 | writenum((long)MAJOR(info->st_rdev),(short)3); |
@@ -193,27 +193,34 @@ static void list_single(const char *name, struct stat *info, const char *fullnam | |||
193 | fputs(" ", stdout); | 193 | fputs(" ", stdout); |
194 | #ifdef BB_FEATURE_LS_USERNAME | 194 | #ifdef BB_FEATURE_LS_USERNAME |
195 | if (!(opts & DISP_NUMERIC)) { | 195 | if (!(opts & DISP_NUMERIC)) { |
196 | scratch[8]='\0'; | 196 | scratch[0]='\0'; |
197 | my_getpwuid( scratch, info->st_uid); | 197 | my_getpwuid( scratch, info->st_uid); |
198 | scratch[8]='\0'; | ||
198 | if (*scratch) | 199 | if (*scratch) |
199 | fputs(scratch, stdout); | 200 | wr(scratch,8); |
200 | else | 201 | else { |
201 | writenum((long)info->st_uid,(short)0); | 202 | writenum((long) info->st_uid,(short)8); |
203 | fputs(" ", stdout); | ||
204 | } | ||
202 | } else | 205 | } else |
203 | #endif | 206 | #endif |
204 | writenum((long)info->st_uid,(short)0); | 207 | { |
208 | writenum((long) info->st_uid,(short)8); | ||
209 | fputs(" ", stdout); | ||
210 | } | ||
205 | tab(16); | 211 | tab(16); |
206 | #ifdef BB_FEATURE_LS_USERNAME | 212 | #ifdef BB_FEATURE_LS_USERNAME |
207 | if (!(opts & DISP_NUMERIC)) { | 213 | if (!(opts & DISP_NUMERIC)) { |
208 | scratch[8]='\0'; | 214 | scratch[0]='\0'; |
209 | my_getgrgid( scratch, info->st_gid); | 215 | my_getgrgid( scratch, info->st_gid); |
216 | scratch[8]='\0'; | ||
210 | if (*scratch) | 217 | if (*scratch) |
211 | fputs(scratch, stdout); | 218 | wr(scratch,8); |
212 | else | 219 | else |
213 | writenum((long)info->st_gid,(short)0); | 220 | writenum((long) info->st_gid,(short)8); |
214 | } else | 221 | } else |
215 | #endif | 222 | #endif |
216 | writenum((long)info->st_gid,(short)0); | 223 | writenum((long) info->st_gid,(short)8); |
217 | tab(17); | 224 | tab(17); |
218 | if (S_ISBLK(mode) || S_ISCHR(mode)) { | 225 | if (S_ISBLK(mode) || S_ISCHR(mode)) { |
219 | writenum((long)MAJOR(info->st_rdev),(short)3); | 226 | writenum((long)MAJOR(info->st_rdev),(short)3); |