Changeset 1772 in MondoRescue
- Timestamp:
- Nov 6, 2007, 9:23:18 PM (17 years ago)
- Location:
- branches/2.2.5/mindi-busybox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi-busybox/Makefile
r1768 r1772 1 1 VERSION = 1 2 2 PATCHLEVEL = 7 3 SUBLEVEL = 23 SUBLEVEL = 3 4 4 EXTRAVERSION = -rPBREV 5 5 NAME = Unnamed -
branches/2.2.5/mindi-busybox/coreutils/tail.c
r1765 r1772 48 48 { 49 49 ssize_t r; 50 off_t current , end;50 off_t current; 51 51 struct stat sbuf; 52 52 53 end = current = lseek(fd, 0, SEEK_CUR); 54 if (!fstat(fd, &sbuf)) 55 end = sbuf.st_size; 56 lseek(fd, end < current ? 0 : current, SEEK_SET); 53 /* (A good comment is missing here) */ 54 current = lseek(fd, 0, SEEK_CUR); 55 /* /proc files report zero st_size, don't lseek them. */ 56 if (fstat(fd, &sbuf) == 0 && sbuf.st_size) 57 if (sbuf.st_size < current) 58 lseek(fd, 0, SEEK_SET); 59 57 60 r = safe_read(fd, buf, count); 58 61 if (r < 0) { … … 68 71 static unsigned eat_num(const char *p) 69 72 { 70 if (*p == '-') p++; 71 else if (*p == '+') { p++; G.status = EXIT_FAILURE; } 73 if (*p == '-') 74 p++; 75 else if (*p == '+') { 76 p++; 77 G.status = EXIT_FAILURE; 78 } 72 79 return xatou_sfx(p, tail_suffixes); 73 80 } -
branches/2.2.5/mindi-busybox/include/libbb.h
r1765 r1772 777 777 extern void change_identity(const struct passwd *pw); 778 778 extern const char *change_identity_e2str(const struct passwd *pw); 779 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ;779 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN; 780 780 #if ENABLE_SELINUX 781 781 extern void renew_current_security_context(void); -
branches/2.2.5/mindi-busybox/networking/httpd.c
r1765 r1772 1186 1186 * and send it to the peer. So please no SIGPIPEs! */ 1187 1187 signal(SIGPIPE, SIG_IGN); 1188 1189 /* Accound for POSTDATA already in hdr_buf */ 1190 bodyLen -= hdr_cnt; 1188 1191 1189 1192 /* This loop still looks messy. What is an exit criteria? -
branches/2.2.5/mindi-busybox/networking/inetd.c
r1765 r1772 735 735 /* goto more; */ 736 736 737 sep->se_server = xxstrdup(skip(&cp)); 737 arg = skip(&cp); 738 sep->se_server = xxstrdup(arg); 738 739 if (strcmp(sep->se_server, "internal") == 0) { 739 740 #ifdef INETD_FEATURE_ENABLED … … 760 761 #endif 761 762 argc = 0; 762 for ( arg = skip(&cp); cp; arg = skip(&cp)) {763 for (; cp; arg = skip(&cp)) { 763 764 if (argc < MAXARGV) 764 765 sep->se_argv[argc++] = xxstrdup(arg); -
branches/2.2.5/mindi-busybox/networking/libiproute/iptunnel.c
r1765 r1772 242 242 NEXT_ARG(); 243 243 key = index_in_strings(keywords, *argv); 244 if (key == ARG_any)244 if (key != ARG_any) 245 245 p->iph.daddr = get_addr32(*argv); 246 246 } else if (key == ARG_local) { 247 247 NEXT_ARG(); 248 248 key = index_in_strings(keywords, *argv); 249 if (key == ARG_any)249 if (key != ARG_any) 250 250 p->iph.saddr = get_addr32(*argv); 251 251 } else if (key == ARG_dev) { -
branches/2.2.5/mindi-busybox/shell/ash.c
r1765 r1772 4380 4380 /* Lives far away from here, needed for forkchild */ 4381 4381 static void closescript(void); 4382 4382 4383 /* Called after fork(), in child */ 4383 4384 static void … … 4424 4425 setsignal(SIGTERM); 4425 4426 } 4426 #if JOBS4427 /* For "jobs | cat" to work like in bash, we must retain list of jobs4428 * in child, but we do need to remove ourself */4429 if (jp)4430 freejob(jp);4431 #else4432 4427 for (jp = curjob; jp; jp = jp->prev_job) 4433 4428 freejob(jp); 4434 #endif4435 4429 jobless = 0; 4436 4430 } -
branches/2.2.5/mindi-busybox/sysklogd/logger.c
r1765 r1772 108 108 if (!argc) { 109 109 #define strbuf bb_common_bufsiz1 110 while (fgets(strbuf, BUFSIZ, stdin)) {110 while (fgets(strbuf, COMMON_BUFSIZE, stdin)) { 111 111 if (strbuf[0] 112 112 && NOT_LONE_CHAR(strbuf, '\n') … … 118 118 } else { 119 119 char *message = NULL; 120 int len = 1; /* for NUL */120 int len = 0; 121 121 int pos = 0; 122 122 do { 123 123 len += strlen(*argv) + 1; 124 message = xrealloc(message, len );124 message = xrealloc(message, len + 1); 125 125 sprintf(message + pos, " %s", *argv), 126 126 pos = len;
Note:
See TracChangeset
for help on using the changeset viewer.