mirror of
https://github.com/sheumann/hush.git
synced 2025-04-28 00:38:25 +00:00
Stuf
This commit is contained in:
parent
cb41c2e83b
commit
394f764e7d
@ -6,6 +6,10 @@
|
|||||||
* Several options are now moved into busybox.defs.h
|
* Several options are now moved into busybox.defs.h
|
||||||
* Now 'rm -R' and 'rm -r' both work.
|
* Now 'rm -R' and 'rm -r' both work.
|
||||||
* dd now properly handles input beyond 1 block from stdin.
|
* dd now properly handles input beyond 1 block from stdin.
|
||||||
|
* Fixed a bug where tar unpacked everything a directories. Moved some code
|
||||||
|
from createPath into mkdir where it belonged, thereby making tar work properly.
|
||||||
|
* Fixed an off-by-one bug in cat. Given a list of file it wouldn't cat out the
|
||||||
|
last file in the list.
|
||||||
|
|
||||||
-Erik Andrsen
|
-Erik Andrsen
|
||||||
|
|
||||||
|
9
TODO
Normal file
9
TODO
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
TODO list for busybox in no particular order
|
||||||
|
|
||||||
|
* Add in a mini syslogd
|
||||||
|
* Allow tar to create archives with sockets, devices, and other special files
|
||||||
|
* Add in a mini modprobe, insmod, rmmod
|
||||||
|
* poweroff
|
||||||
|
* Change init so halt, reboot (and poweroff) work with an initrd
|
||||||
|
when init is not PID 1
|
||||||
|
*
|
4
cat.c
4
cat.c
@ -49,14 +49,12 @@ extern int cat_main(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
|
|
||||||
while (argc-- > 0) {
|
while (argc-- > 0) {
|
||||||
file = fopen(*argv, "r");
|
file = fopen(*(argv++), "r");
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
perror(*argv);
|
perror(*argv);
|
||||||
exit(FALSE);
|
exit(FALSE);
|
||||||
}
|
}
|
||||||
print_file( file);
|
print_file( file);
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
}
|
||||||
exit(TRUE);
|
exit(TRUE);
|
||||||
}
|
}
|
||||||
|
@ -49,14 +49,12 @@ extern int cat_main(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
|
|
||||||
while (argc-- > 0) {
|
while (argc-- > 0) {
|
||||||
file = fopen(*argv, "r");
|
file = fopen(*(argv++), "r");
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
perror(*argv);
|
perror(*argv);
|
||||||
exit(FALSE);
|
exit(FALSE);
|
||||||
}
|
}
|
||||||
print_file( file);
|
print_file( file);
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
}
|
||||||
exit(TRUE);
|
exit(TRUE);
|
||||||
}
|
}
|
||||||
|
@ -193,27 +193,34 @@ static void list_single(const char *name, struct stat *info, const char *fullnam
|
|||||||
fputs(" ", stdout);
|
fputs(" ", stdout);
|
||||||
#ifdef BB_FEATURE_LS_USERNAME
|
#ifdef BB_FEATURE_LS_USERNAME
|
||||||
if (!(opts & DISP_NUMERIC)) {
|
if (!(opts & DISP_NUMERIC)) {
|
||||||
scratch[8]='\0';
|
scratch[0]='\0';
|
||||||
my_getpwuid( scratch, info->st_uid);
|
my_getpwuid( scratch, info->st_uid);
|
||||||
|
scratch[8]='\0';
|
||||||
if (*scratch)
|
if (*scratch)
|
||||||
fputs(scratch, stdout);
|
wr(scratch,8);
|
||||||
else
|
else {
|
||||||
writenum((long)info->st_uid,(short)0);
|
writenum((long) info->st_uid,(short)8);
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
writenum((long)info->st_uid,(short)0);
|
{
|
||||||
|
writenum((long) info->st_uid,(short)8);
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
tab(16);
|
tab(16);
|
||||||
#ifdef BB_FEATURE_LS_USERNAME
|
#ifdef BB_FEATURE_LS_USERNAME
|
||||||
if (!(opts & DISP_NUMERIC)) {
|
if (!(opts & DISP_NUMERIC)) {
|
||||||
scratch[8]='\0';
|
scratch[0]='\0';
|
||||||
my_getgrgid( scratch, info->st_gid);
|
my_getgrgid( scratch, info->st_gid);
|
||||||
|
scratch[8]='\0';
|
||||||
if (*scratch)
|
if (*scratch)
|
||||||
fputs(scratch, stdout);
|
wr(scratch,8);
|
||||||
else
|
else
|
||||||
writenum((long)info->st_gid,(short)0);
|
writenum((long) info->st_gid,(short)8);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
writenum((long)info->st_gid,(short)0);
|
writenum((long) info->st_gid,(short)8);
|
||||||
tab(17);
|
tab(17);
|
||||||
if (S_ISBLK(mode) || S_ISCHR(mode)) {
|
if (S_ISBLK(mode) || S_ISCHR(mode)) {
|
||||||
writenum((long)MAJOR(info->st_rdev),(short)3);
|
writenum((long)MAJOR(info->st_rdev),(short)3);
|
||||||
|
27
ls.c
27
ls.c
@ -193,27 +193,34 @@ static void list_single(const char *name, struct stat *info, const char *fullnam
|
|||||||
fputs(" ", stdout);
|
fputs(" ", stdout);
|
||||||
#ifdef BB_FEATURE_LS_USERNAME
|
#ifdef BB_FEATURE_LS_USERNAME
|
||||||
if (!(opts & DISP_NUMERIC)) {
|
if (!(opts & DISP_NUMERIC)) {
|
||||||
scratch[8]='\0';
|
scratch[0]='\0';
|
||||||
my_getpwuid( scratch, info->st_uid);
|
my_getpwuid( scratch, info->st_uid);
|
||||||
|
scratch[8]='\0';
|
||||||
if (*scratch)
|
if (*scratch)
|
||||||
fputs(scratch, stdout);
|
wr(scratch,8);
|
||||||
else
|
else {
|
||||||
writenum((long)info->st_uid,(short)0);
|
writenum((long) info->st_uid,(short)8);
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
writenum((long)info->st_uid,(short)0);
|
{
|
||||||
|
writenum((long) info->st_uid,(short)8);
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
tab(16);
|
tab(16);
|
||||||
#ifdef BB_FEATURE_LS_USERNAME
|
#ifdef BB_FEATURE_LS_USERNAME
|
||||||
if (!(opts & DISP_NUMERIC)) {
|
if (!(opts & DISP_NUMERIC)) {
|
||||||
scratch[8]='\0';
|
scratch[0]='\0';
|
||||||
my_getgrgid( scratch, info->st_gid);
|
my_getgrgid( scratch, info->st_gid);
|
||||||
|
scratch[8]='\0';
|
||||||
if (*scratch)
|
if (*scratch)
|
||||||
fputs(scratch, stdout);
|
wr(scratch,8);
|
||||||
else
|
else
|
||||||
writenum((long)info->st_gid,(short)0);
|
writenum((long) info->st_gid,(short)8);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
writenum((long)info->st_gid,(short)0);
|
writenum((long) info->st_gid,(short)8);
|
||||||
tab(17);
|
tab(17);
|
||||||
if (S_ISBLK(mode) || S_ISCHR(mode)) {
|
if (S_ISBLK(mode) || S_ISCHR(mode)) {
|
||||||
writenum((long)MAJOR(info->st_rdev),(short)3);
|
writenum((long)MAJOR(info->st_rdev),(short)3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user