- 'grep *foo file' segfaults
- ps dirent race bug (need to stat the file before attempting chdir)
+
+/busybox tar tvf
+Segmentation fault (core dumped)
+
+
-----------
* Make insmod actually work
usage(tar_usage);
/* Parse any options */
- while (--argc > 0 && **(++argv) == '-') {
+ while (--argc > 0 && strspn(*(++argv), "-cxt") >0 ) {
stopIt=FALSE;
while (stopIt==FALSE && *(++(*argv))) {
switch (**argv) {
#else
exit(writeTarFile(tarName, tostdoutFlag, verboseFlag, argc, argv, excludeList));
#endif
- } else {
+ }
+ if (listFlag == TRUE || extractFlag == TRUE) {
exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag, verboseFlag, excludeList));
}
/* Current termio and the previous termio before starting sh */
struct termios initial_settings, new_settings;
+
+
+#ifndef _POSIX_VDISABLE
+#define _POSIX_VDISABLE '\0'
+#endif
+
#endif
#include <termios.h>
#include <mntent.h>
#include <sys/stat.h>
+#include <sys/param.h>
#include <linux/fs.h>
#include <linux/minix_fs.h>
char **extra_opts, char **mount_opts, int running_bg);
#endif
-#if defined (BB_FSCK_MINIX) || defined (BB_MKFS_MINIX)
-/* Bit map related macros. */
-#ifndef setbit
-#define CHAR_BITS 8 /* Number of bits in a `char'. */
-#define setbit(a,i) ((a)[(i)/CHAR_BITS] |= 1<<((i)%CHAR_BITS))
-#define clrbit(a,i) ((a)[(i)/CHAR_BITS] &= ~(1<<((i)%CHAR_BITS)))
-#define isset(a,i) ((a)[(i)/CHAR_BITS] & (1<<((i)%CHAR_BITS)))
-#define isclr(a,i) (((a)[(i)/CHAR_BITS] & (1<<((i)%CHAR_BITS))) == 0)
-#endif
-#endif
-
-
#ifndef RB_POWER_OFF
/* Stop system and switch power off if possable. */
#define RB_POWER_OFF 0x4321fedc
#include <termios.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <mntent.h>
#include <linux/fs.h>
#define HAVE_MINIX2 1
#endif
-#ifndef __GNUC__
-#error "needs gcc for the bitop-__asm__'s"
-#endif
-
#ifndef __linux__
#define volatile
#endif
/* Current termio and the previous termio before starting sh */
struct termios initial_settings, new_settings;
+
+
+#ifndef _POSIX_VDISABLE
+#define _POSIX_VDISABLE '\0'
+#endif
+
#endif
usage(tar_usage);
/* Parse any options */
- while (--argc > 0 && **(++argv) == '-') {
+ while (--argc > 0 && strspn(*(++argv), "-cxt") >0 ) {
stopIt=FALSE;
while (stopIt==FALSE && *(++(*argv))) {
switch (**argv) {
#else
exit(writeTarFile(tarName, tostdoutFlag, verboseFlag, argc, argv, excludeList));
#endif
- } else {
+ }
+ if (listFlag == TRUE || extractFlag == TRUE) {
exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag, verboseFlag, excludeList));
}
#include <termios.h>
#include <mntent.h>
#include <sys/stat.h>
+#include <sys/param.h>
#include <linux/fs.h>
#include <linux/minix_fs.h>
#include <termios.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <mntent.h>
#include <linux/fs.h>
#define HAVE_MINIX2 1
#endif
-#ifndef __GNUC__
-#error "needs gcc for the bitop-__asm__'s"
-#endif
-
#ifndef __linux__
#define volatile
#endif