parent
e2c94324e7
commit
1233a57f74
@ -0,0 +1,67 @@ |
||||
# |
||||
# For a description of the syntax of this configuration file, |
||||
# see scripts/kbuild/config-language.txt. |
||||
# |
||||
|
||||
menu "Linux Ext2 FS Progs" |
||||
|
||||
config BUSYBOX_CONFIG_CHATTR |
||||
bool "chattr" |
||||
default n |
||||
help |
||||
chattr changes the file attributes on a second extended file system. |
||||
|
||||
config BUSYBOX_CONFIG_E2FSCK |
||||
bool "e2fsck" |
||||
default n |
||||
help |
||||
e2fsck is used to check Linux second extended file systems (ext2fs). |
||||
e2fsck also supports ext2 filesystems countaining a journal (ext3). |
||||
The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also |
||||
provided. |
||||
|
||||
config BUSYBOX_CONFIG_FSCK |
||||
bool "fsck" |
||||
default n |
||||
help |
||||
fsck is used to check and optionally repair one or more filesystems. |
||||
In actuality, fsck is simply a front-end for the various file system |
||||
checkers (fsck.fstype) available under Linux. |
||||
|
||||
config BUSYBOX_CONFIG_LSATTR |
||||
bool "lsattr" |
||||
default n |
||||
help |
||||
lsattr lists the file attributes on a second extended file system. |
||||
|
||||
config BUSYBOX_CONFIG_MKE2FS |
||||
bool "mke2fs" |
||||
default n |
||||
help |
||||
mke2fs is used to create an ext2/ext3 filesystem. The normal compat |
||||
symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. |
||||
|
||||
config BUSYBOX_CONFIG_TUNE2FS |
||||
bool "tune2fs" |
||||
default n |
||||
help |
||||
tune2fs allows the system administrator to adjust various tunable |
||||
filesystem parameters on Linux ext2/ext3 filesystems. |
||||
|
||||
config BUSYBOX_CONFIG_E2LABEL |
||||
bool "e2label" |
||||
default n |
||||
depends on BUSYBOX_CONFIG_TUNE2FS |
||||
help |
||||
e2label will display or change the filesystem label on the ext2 |
||||
filesystem located on device. |
||||
|
||||
config BUSYBOX_CONFIG_FINDFS |
||||
bool "findfs" |
||||
default n |
||||
depends on BUSYBOX_CONFIG_TUNE2FS |
||||
help |
||||
findfs will search the disks in the system looking for a filesystem |
||||
which has a label matching label or a UUID equal to uuid. |
||||
|
||||
endmenu |
@ -0,0 +1,11 @@ |
||||
--- busybox-1.4.0/libbb/xreadlink.c Fri Jan 19 22:23:06 2007
|
||||
+++ busybox-1.4.0-syslogd-n/libbb/xreadlink.c Tue Jan 23 22:35:45 2007
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
char *xmalloc_realpath(const char *path)
|
||||
{
|
||||
-#ifdef __GLIBC__
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
/* glibc provides a non-standard extension */
|
||||
return realpath(path, NULL);
|
||||
#else
|
@ -1,230 +0,0 @@ |
||||
--- busybox-1.3.1/include/libbb.h Wed Dec 27 05:56:18 2006
|
||||
+++ busybox-1.3.1.shadow/include/libbb.h Sat Dec 30 15:24:07 2006
|
||||
@@ -46,11 +46,13 @@
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
#include <locale.h>
|
||||
#else
|
||||
-#define setlocale(x,y)
|
||||
+#define setlocale(x,y) ((void)0)
|
||||
#endif
|
||||
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
+/* ifdef it out, because it may include <shadow.h> */
|
||||
+/* and we may not even _have_ <shadow.h>! */
|
||||
#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
#include "shadow_.h"
|
||||
#endif
|
||||
@@ -59,7 +61,7 @@
|
||||
#include <limits.h>
|
||||
#include <sys/param.h>
|
||||
#ifndef PATH_MAX
|
||||
-#define PATH_MAX 256
|
||||
+#define PATH_MAX 256
|
||||
#endif
|
||||
|
||||
/* Tested to work correctly (IIRC :]) */
|
||||
--- busybox-1.3.1/libpwdgrp/pwd_grp.c Wed Dec 27 05:56:32 2006
|
||||
+++ busybox-1.3.1.shadow/libpwdgrp/pwd_grp.c Sat Dec 30 15:24:07 2006
|
||||
@@ -52,7 +52,9 @@
|
||||
|
||||
extern int __parsepwent(void *pw, char *line);
|
||||
extern int __parsegrent(void *gr, char *line);
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
extern int __parsespent(void *sp, char *line);
|
||||
+#endif
|
||||
|
||||
extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
|
||||
char *__restrict line_buff, size_t buflen, FILE *f);
|
||||
@@ -103,6 +105,7 @@
|
||||
return rv;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct spwd **__restrict result)
|
||||
@@ -117,6 +120,7 @@
|
||||
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* For the various fget??ent funcs, return NULL on failure and a
|
||||
@@ -144,6 +148,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
extern int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct spwd **__restrict result);
|
||||
@@ -184,6 +189,7 @@
|
||||
DONE:
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
@@ -207,6 +213,7 @@
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_GROUP
|
||||
#include "pwd_grp_internal.c"
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
#define GETXXKEY_R_FUNC getspnam_R
|
||||
#define GETXXKEY_R_PARSER __parsespent
|
||||
#define GETXXKEY_R_ENTTYPE struct spwd
|
||||
@@ -214,6 +221,7 @@
|
||||
#define DO_GETXXKEY_R_KEYTYPE const char *__restrict
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_SHADOW
|
||||
#include "pwd_grp_internal.c"
|
||||
+#endif
|
||||
|
||||
#define GETXXKEY_R_FUNC getpwuid_R
|
||||
#define GETXXKEY_R_PARSER __parsepwent
|
||||
@@ -253,6 +261,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+#if 0 //ENABLE_USE_BB_SHADOW
|
||||
/* This function is non-standard and is currently not built. It seems
|
||||
* to have been created as a reentrant version of the non-standard
|
||||
* functions getspuid. Why getspuid was added, I do not know. */
|
||||
@@ -286,6 +295,7 @@
|
||||
getspuid_r(uid, &resultbuf, buffer, sizeof(buffer), &result);
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
struct passwd *getpwnam(const char *name)
|
||||
{
|
||||
@@ -307,6 +317,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
struct spwd *getspnam(const char *name)
|
||||
{
|
||||
static char buffer[PWD_BUFFER_SIZE];
|
||||
@@ -316,6 +327,7 @@
|
||||
getspnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int getpw(uid_t uid, char *buf)
|
||||
{
|
||||
@@ -444,6 +456,7 @@
|
||||
return rv;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
static FILE *spf /*= NULL*/;
|
||||
void setspent(void)
|
||||
{
|
||||
@@ -488,6 +501,7 @@
|
||||
UNLOCK;
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
struct passwd *getpwent(void)
|
||||
{
|
||||
@@ -509,6 +523,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
struct spwd *getspent(void)
|
||||
{
|
||||
static char line_buff[PWD_BUFFER_SIZE];
|
||||
@@ -528,6 +543,7 @@
|
||||
sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), &result);
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int initgroups(const char *user, gid_t gid)
|
||||
{
|
||||
@@ -643,6 +659,7 @@
|
||||
return rv;
|
||||
}
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
static const unsigned char _sp_off[] = {
|
||||
offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */
|
||||
offsetof(struct spwd, sp_min), /* 3 - not a char ptr */
|
||||
@@ -688,6 +705,7 @@
|
||||
DO_UNLOCK:
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* Internal uClibc functions. */
|
||||
@@ -846,6 +864,7 @@
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
+#if ENABLE_USE_BB_SHADOW
|
||||
static const unsigned char sp_off[] = {
|
||||
offsetof(struct spwd, sp_namp), /* 0 */
|
||||
offsetof(struct spwd, sp_pwdp), /* 1 */
|
||||
@@ -900,6 +919,7 @@
|
||||
|
||||
return EINVAL;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
--- busybox-1.3.1/loginutils/passwd.c Wed Dec 27 05:56:20 2006
|
||||
+++ busybox-1.3.1.shadow/loginutils/passwd.c Sat Dec 30 15:24:07 2006
|
||||
@@ -275,7 +275,8 @@
|
||||
}
|
||||
|
||||
filename = bb_path_passwd_file;
|
||||
- if (ENABLE_FEATURE_SHADOWPASSWDS) {
|
||||
+#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
+ {
|
||||
struct spwd *sp = getspnam(name);
|
||||
if (!sp) {
|
||||
/* LOGMODE_BOTH */
|
||||
@@ -287,6 +288,7 @@
|
||||
pw->pw_passwd = sp->sp_pwdp;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Decide what the new password will be */
|
||||
newp = NULL;
|
||||
--- busybox-1.3.1/loginutils/sulogin.c Wed Dec 27 05:56:20 2006
|
||||
+++ busybox-1.3.1.shadow/loginutils/sulogin.c Sat Dec 30 15:24:07 2006
|
||||
@@ -41,7 +41,6 @@
|
||||
char *timeout_arg;
|
||||
const char * const *p;
|
||||
struct passwd *pwd;
|
||||
- struct spwd *spwd;
|
||||
const char *shell;
|
||||
|
||||
logmode = LOGMODE_BOTH;
|
||||
@@ -75,13 +74,15 @@
|
||||
goto auth_error;
|
||||
}
|
||||
|
||||
- if (ENABLE_FEATURE_SHADOWPASSWDS) {
|
||||
- spwd = getspnam(pwd->pw_name);
|
||||
+#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
+ {
|
||||
+ struct spwd *spwd = getspnam(pwd->pw_name);
|
||||
if (!spwd) {
|
||||
goto auth_error;
|
||||
}
|
||||
pwd->pw_passwd = spwd->sp_pwdp;
|
||||
}
|
||||
+#endif
|
||||
|
||||
while (1) {
|
||||
/* cp points to a static buffer that is zeroed every time */
|
@ -1,24 +0,0 @@ |
||||
--- busybox-1.3.1/networking/ping.c 2006-12-27 05:52:39.000000000 +0100
|
||||
+++ busybox-1.3.1-new/networking/ping.c 2006-12-29 18:42:36.000000000 +0100
|
||||
@@ -217,7 +217,8 @@
|
||||
pkt->icmp_type = ICMP_ECHO;
|
||||
pkt->icmp_code = 0;
|
||||
pkt->icmp_cksum = 0;
|
||||
- pkt->icmp_seq = htons(ntransmitted++);
|
||||
+ pkt->icmp_seq = htons(ntransmitted);
|
||||
+ ntransmitted++;
|
||||
pkt->icmp_id = myid;
|
||||
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
|
||||
|
||||
--- busybox-1.3.1/networking/ping6.c 2006-12-27 05:52:39.000000000 +0100
|
||||
+++ busybox-1.3.1-new/networking/ping6.c 2006-12-29 18:44:02.000000000 +0100
|
||||
@@ -205,7 +205,8 @@
|
||||
pkt->icmp6_type = ICMP6_ECHO_REQUEST;
|
||||
pkt->icmp6_code = 0;
|
||||
pkt->icmp6_cksum = 0;
|
||||
- pkt->icmp6_seq = htons(ntransmitted++);
|
||||
+ pkt->icmp6_seq = htons(ntransmitted);
|
||||
+ ntransmitted++;
|
||||
pkt->icmp6_id = myid;
|
||||
CLR(pkt->icmp6_seq % MAX_DUP_CHK);
|
||||
|
@ -1,12 +0,0 @@ |
||||
diff -ur busybox.old/e2fsprogs/ext2fs/unix_io.c busybox.dev/e2fsprogs/ext2fs/unix_io.c
|
||||
--- busybox.old/e2fsprogs/ext2fs/unix_io.c 2006-12-27 05:55:58.000000000 +0100
|
||||
+++ busybox.dev/e2fsprogs/ext2fs/unix_io.c 2007-01-07 16:16:52.000000000 +0100
|
||||
@@ -419,7 +419,7 @@
|
||||
|
||||
#ifdef __linux__
|
||||
#undef RLIM_INFINITY
|
||||
-#if (defined(__alpha__) || ((defined(__sparc__) || defined(__mips__)) && (SIZEOF_LONG == 4)))
|
||||
+#if (defined(__alpha__) || defined(__sparc__) || defined(__mips__))
|
||||
#define RLIM_INFINITY ((unsigned long)(~0UL>>1))
|
||||
#else
|
||||
#define RLIM_INFINITY (~0UL)
|
@ -1,14 +0,0 @@ |
||||
diff -Nru busybox-1.3.1.orig/sysklogd/syslogd.c busybox-1.3.1/sysklogd/syslogd.c
|
||||
--- busybox-1.3.1.orig/sysklogd/syslogd.c 2007-01-02 21:28:26.000000000 +0700
|
||||
+++ busybox-1.3.1/sysklogd/syslogd.c 2007-01-02 21:29:10.000000000 +0700
|
||||
@@ -304,8 +304,8 @@
|
||||
vsnprintf(b, sizeof(b) - 1, fmt, arguments);
|
||||
va_end(arguments);
|
||||
circ_message(b);
|
||||
-
|
||||
- } else
|
||||
+ return;
|
||||
+ }
|
||||
#endif
|
||||
fd = device_open(logFilePath, O_WRONLY | O_CREAT
|
||||
| O_NOCTTY | O_APPEND | O_NONBLOCK);
|
File diff suppressed because it is too large
Load Diff
@ -1,448 +0,0 @@ |
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# remove (numerous) compile warnings
|
||||
#
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c 2006-05-09 02:06:48.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
int file_mkdir_hier(const char *path, long mode)
|
||||
{
|
||||
- return bb_make_directory(path, mode, FILEUTILS_RECUR);
|
||||
+ return bb_make_directory((char *)path, mode, FILEUTILS_RECUR);
|
||||
}
|
||||
|
||||
char *file_md5sum_alloc(const char *file_name)
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:37.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:17.000000000 +0200
|
||||
@@ -246,7 +246,7 @@
|
||||
in = fopen (tmp_file_name, "r");
|
||||
out = fopen (list_file_name, "w");
|
||||
if (in && out)
|
||||
- inflate_unzip (in, out);
|
||||
+ inflate_unzip (fileno(in), fileno(out));
|
||||
else
|
||||
err = 1;
|
||||
if (in)
|
||||
@@ -894,14 +894,13 @@
|
||||
pkg_vec_free(available);
|
||||
} else {
|
||||
pkg_vec_t *installed_pkgs = pkg_vec_alloc();
|
||||
- int i;
|
||||
int flagged_pkg_count = 0;
|
||||
int removed;
|
||||
|
||||
pkg_hash_fetch_all_installed(&conf->pkg_hash, installed_pkgs);
|
||||
|
||||
for (i = 0; i < installed_pkgs->len; i++) {
|
||||
- pkg_t *pkg = installed_pkgs->pkgs[i];
|
||||
+ pkg = installed_pkgs->pkgs[i];
|
||||
if (pkg->state_flag & SF_USER) {
|
||||
flagged_pkg_count++;
|
||||
} else {
|
||||
@@ -921,7 +920,7 @@
|
||||
do {
|
||||
removed = 0;
|
||||
for (i = 0; i < installed_pkgs->len; i++) {
|
||||
- pkg_t *pkg = installed_pkgs->pkgs[i];
|
||||
+ pkg = installed_pkgs->pkgs[i];
|
||||
if (!(pkg->state_flag & SF_USER)
|
||||
&& !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) {
|
||||
removed++;
|
||||
@@ -976,7 +975,7 @@
|
||||
{
|
||||
int i;
|
||||
pkg_t *pkg;
|
||||
- const char *flags = argv[0];
|
||||
+ char *flags = argv[0];
|
||||
|
||||
global_conf = conf;
|
||||
signal(SIGINT, sigint_handler);
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-05-09 02:12:04.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -542,14 +542,14 @@
|
||||
if (strcmp(type, "option") == 0) {
|
||||
ipkg_conf_set_option(options, name, value);
|
||||
} else if (strcmp(type, "src") == 0) {
|
||||
- if (!nv_pair_list_find(pkg_src_list, name)) {
|
||||
+ if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) {
|
||||
pkg_src_list_append (pkg_src_list, name, value, extra, 0);
|
||||
} else {
|
||||
ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration. Skipping:\n\t src %s %s\n",
|
||||
name, value);
|
||||
}
|
||||
} else if (strcmp(type, "src/gz") == 0) {
|
||||
- if (!nv_pair_list_find(pkg_src_list, name)) {
|
||||
+ if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) {
|
||||
pkg_src_list_append (pkg_src_list, name, value, extra, 1);
|
||||
} else {
|
||||
ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration. Skipping:\n\t src %s %s\n",
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-05-09 02:12:04.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c 2006-05-09 02:22:51.000000000 +0200
|
||||
@@ -166,7 +166,7 @@
|
||||
if (err)
|
||||
return err;
|
||||
pkg->local_filename = strdup(url);
|
||||
- ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand \(%s\).\n", pkg->name,pkg->local_filename);
|
||||
+ ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename);
|
||||
pkg->provided_by_hand = 1;
|
||||
|
||||
} else {
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-05-09 02:12:05.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -445,7 +445,7 @@
|
||||
int
|
||||
ipkg_op (int argc, char *argv[])
|
||||
{
|
||||
- int err, optind;
|
||||
+ int err, opt_index;
|
||||
args_t args;
|
||||
char *cmd_name;
|
||||
ipkg_cmd_t *cmd;
|
||||
@@ -453,13 +453,13 @@
|
||||
|
||||
args_init (&args);
|
||||
|
||||
- optind = args_parse (&args, argc, argv);
|
||||
- if (optind == argc || optind < 0)
|
||||
+ opt_index = args_parse (&args, argc, argv);
|
||||
+ if (opt_index == argc || opt_index < 0)
|
||||
{
|
||||
args_usage ("ipkg must have one sub-command argument");
|
||||
}
|
||||
|
||||
- cmd_name = argv[optind++];
|
||||
+ cmd_name = argv[opt_index++];
|
||||
/* Pigi: added a flag to disable the checking of structures if the command does not need to
|
||||
read anything from there.
|
||||
*/
|
||||
@@ -509,7 +509,7 @@
|
||||
args_usage (NULL);
|
||||
}
|
||||
|
||||
- if (cmd->requires_args && optind == argc)
|
||||
+ if (cmd->requires_args && opt_index == argc)
|
||||
{
|
||||
fprintf (stderr,
|
||||
"%s: the ``%s'' command requires at least one argument\n",
|
||||
@@ -517,7 +517,7 @@
|
||||
args_usage (NULL);
|
||||
}
|
||||
|
||||
- err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind, (const char **) (argv + optind), NULL);
|
||||
+ err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - opt_index, (const char **) (argv + opt_index), NULL);
|
||||
|
||||
ipkg_conf_deinit (&ipkg_conf);
|
||||
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c 2006-05-09 02:06:48.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -25,7 +25,6 @@
|
||||
int md5_stream(FILE *stream, void *resblock)
|
||||
{
|
||||
int fd;
|
||||
- int sum;
|
||||
|
||||
if( (fd = fileno(stream)) == -1 ) {
|
||||
bb_error_msg("bad file descriptor");
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c 2006-05-09 02:12:05.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -528,6 +528,7 @@
|
||||
char * pkg_formatted_field(pkg_t *pkg, const char *field )
|
||||
{
|
||||
static size_t LINE_LEN = 128;
|
||||
+ char line_str[LINE_LEN];
|
||||
char * temp = (char *)malloc(1);
|
||||
int len = 0;
|
||||
int flag_provide_false = 0;
|
||||
@@ -567,7 +568,6 @@
|
||||
if (strcasecmp(field, "Conffiles") == 0) {
|
||||
/* Conffiles */
|
||||
conffile_list_elt_t *iter;
|
||||
- char confstr[LINE_LEN];
|
||||
|
||||
if (pkg->conffiles.head == NULL) {
|
||||
return temp;
|
||||
@@ -588,15 +588,14 @@
|
||||
strncpy(temp, "Conffiles:\n", 12);
|
||||
for (iter = pkg->conffiles.head; iter; iter = iter->next) {
|
||||
if (iter->data->name && iter->data->value) {
|
||||
- snprintf(confstr, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value);
|
||||
- strncat(temp, confstr, strlen(confstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
}
|
||||
} else if (strcasecmp(field, "Conflicts") == 0) {
|
||||
int i;
|
||||
|
||||
if (pkg->conflicts_count) {
|
||||
- char conflictstr[LINE_LEN];
|
||||
len = 14 ;
|
||||
for(i = 0; i < pkg->conflicts_count; i++) {
|
||||
len = len + (strlen(pkg->conflicts_str[i])+5);
|
||||
@@ -609,8 +608,8 @@
|
||||
temp[0]='\0';
|
||||
strncpy(temp, "Conflicts:", 11);
|
||||
for(i = 0; i < pkg->conflicts_count; i++) {
|
||||
- snprintf(conflictstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]);
|
||||
- strncat(temp, conflictstr, strlen(conflictstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
strncat(temp, "\n", strlen("\n"));
|
||||
}
|
||||
@@ -625,7 +624,6 @@
|
||||
int i;
|
||||
|
||||
if (pkg->depends_count) {
|
||||
- char depstr[LINE_LEN];
|
||||
len = 14 ;
|
||||
for(i = 0; i < pkg->depends_count; i++) {
|
||||
len = len + (strlen(pkg->depends_str[i])+4);
|
||||
@@ -638,8 +636,8 @@
|
||||
temp[0]='\0';
|
||||
strncpy(temp, "Depends:", 10);
|
||||
for(i = 0; i < pkg->depends_count; i++) {
|
||||
- snprintf(depstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]);
|
||||
- strncat(temp, depstr, strlen(depstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
strncat(temp, "\n", strlen("\n"));
|
||||
}
|
||||
@@ -804,7 +802,6 @@
|
||||
/* Replaces | Recommends*/
|
||||
if (strcasecmp (field, "Replaces") == 0) {
|
||||
if (pkg->replaces_count) {
|
||||
- char replstr[LINE_LEN];
|
||||
len = 14;
|
||||
for (i = 0; i < pkg->replaces_count; i++) {
|
||||
len = len + (strlen(pkg->replaces_str[i])+5);
|
||||
@@ -817,14 +814,13 @@
|
||||
temp[0]='\0';
|
||||
strncpy(temp, "Replaces:", 12);
|
||||
for (i = 0; i < pkg->replaces_count; i++) {
|
||||
- snprintf(replstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]);
|
||||
- strncat(temp, replstr, strlen(replstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
strncat(temp, "\n", strlen("\n"));
|
||||
}
|
||||
} else if (strcasecmp (field, "Recommends") == 0) {
|
||||
if (pkg->recommends_count) {
|
||||
- char recstr[LINE_LEN];
|
||||
len = 15;
|
||||
for(i = 0; i < pkg->recommends_count; i++) {
|
||||
len = len + (strlen( pkg->recommends_str[i])+5);
|
||||
@@ -837,8 +833,8 @@
|
||||
temp[0]='\0';
|
||||
strncpy(temp, "Recommends:", 13);
|
||||
for(i = 0; i < pkg->recommends_count; i++) {
|
||||
- snprintf(recstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]);
|
||||
- strncat(temp, recstr, strlen(recstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
strncat(temp, "\n", strlen("\n"));
|
||||
}
|
||||
@@ -907,7 +903,6 @@
|
||||
} else if (strcasecmp(field, "Suggests") == 0) {
|
||||
if (pkg->suggests_count) {
|
||||
int i;
|
||||
- char sugstr[LINE_LEN];
|
||||
len = 13;
|
||||
for(i = 0; i < pkg->suggests_count; i++) {
|
||||
len = len + (strlen(pkg->suggests_str[i])+5);
|
||||
@@ -920,8 +915,8 @@
|
||||
temp[0]='\0';
|
||||
strncpy(temp, "Suggests:", 10);
|
||||
for(i = 0; i < pkg->suggests_count; i++) {
|
||||
- snprintf(sugstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]);
|
||||
- strncat(temp, sugstr, strlen(sugstr));
|
||||
+ snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]);
|
||||
+ strncat(temp, line_str, strlen(line_str));
|
||||
}
|
||||
strncat(temp, "\n", strlen("\n"));
|
||||
}
|
||||
@@ -1140,10 +1135,8 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int pkg_name_version_and_architecture_compare(void *p1, void *p2)
|
||||
+int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b)
|
||||
{
|
||||
- const pkg_t *a = *(const pkg_t **)p1;
|
||||
- const pkg_t *b = *(const pkg_t **)p2;
|
||||
int namecmp;
|
||||
int vercmp;
|
||||
if (!a->name || !b->name) {
|
||||
@@ -1170,10 +1163,8 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int abstract_pkg_name_compare(void *p1, void *p2)
|
||||
+int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b)
|
||||
{
|
||||
- const abstract_pkg_t *a = *(const abstract_pkg_t **)p1;
|
||||
- const abstract_pkg_t *b = *(const abstract_pkg_t **)p2;
|
||||
if (!a->name || !b->name) {
|
||||
fprintf(stderr, "abstract_pkg_name_compare: a=%p a->name=%p b=%p b->name=%p\n",
|
||||
a, a->name, b, b->name);
|
||||
@@ -1193,7 +1184,7 @@
|
||||
#endif
|
||||
|
||||
if (pkg->epoch) {
|
||||
- sprintf_alloc(&epoch_str, "%d:", pkg->epoch);
|
||||
+ sprintf_alloc(&epoch_str, "%d:", (int)(pkg->epoch));
|
||||
} else {
|
||||
epoch_str = strdup("");
|
||||
}
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h 2006-05-09 02:12:05.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -194,8 +194,8 @@
|
||||
char *pkg_version_str_alloc(pkg_t *pkg);
|
||||
|
||||
int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg);
|
||||
-int pkg_name_version_and_architecture_compare(void *a, void *b);
|
||||
-int abstract_pkg_name_compare(void *a, void *b);
|
||||
+int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b);
|
||||
+int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b);
|
||||
|
||||
char * pkg_formatted_info(pkg_t *pkg );
|
||||
char * pkg_formatted_field(pkg_t *pkg, const char *field );
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-05-09 02:12:05.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -68,7 +68,7 @@
|
||||
pkg_vec_t *unsatisfied, char *** unresolved)
|
||||
{
|
||||
pkg_t * satisfier_entry_pkg;
|
||||
- register int i, j, k;
|
||||
+ register int i, j, k, l;
|
||||
int count, found;
|
||||
char ** the_lost;
|
||||
abstract_pkg_t * ab_pkg;
|
||||
@@ -113,7 +113,6 @@
|
||||
abstract_pkg_vec_t *ab_provider_vec = abpkg->provided_by;
|
||||
int nposs = ab_provider_vec->len;
|
||||
abstract_pkg_t **ab_providers = ab_provider_vec->pkgs;
|
||||
- int l;
|
||||
for (l = 0; l < nposs; l++) {
|
||||
pkg_vec_t *test_vec = ab_providers[l]->pkgs;
|
||||
/* if no depends on this one, try the first package that Provides this one */
|
||||
@@ -137,10 +136,9 @@
|
||||
tmp_vec,
|
||||
&newstuff);
|
||||
if (newstuff == NULL) {
|
||||
- int i;
|
||||
int ok = 1;
|
||||
- for (i = 0; i < rc; i++) {
|
||||
- pkg_t *p = tmp_vec->pkgs[i];
|
||||
+ for (l = 0; l < rc; l++) {
|
||||
+ pkg_t *p = tmp_vec->pkgs[l];
|
||||
if (p->state_want == SW_INSTALL)
|
||||
continue;
|
||||
ipkg_message(conf, IPKG_DEBUG, "not installing %s due to requirement for %s\n", pkg_scout->name, p->name);
|
||||
@@ -814,27 +812,27 @@
|
||||
* [npredepends+nrecommends,npredepends+nrecommends+nsuggests) -> returns recommends_str[index]
|
||||
* [npredepends+nrecommends+nsuggests,npredepends+nrecommends+nsuggests+ndepends) -> returns depends_str[index]
|
||||
*/
|
||||
-char *pkg_depend_str(pkg_t *pkg, int index)
|
||||
+char *pkg_depend_str(pkg_t *pkg, int pkg_index)
|
||||
{
|
||||
- if (index < pkg->pre_depends_count) {
|
||||
- return pkg->pre_depends_str[index];
|
||||
+ if (pkg_index < pkg->pre_depends_count) {
|
||||
+ return pkg->pre_depends_str[pkg_index];
|
||||
}
|
||||
- index -= pkg->pre_depends_count;
|
||||
+ pkg_index -= pkg->pre_depends_count;
|
||||
|
||||
- if (index < pkg->recommends_count) {
|
||||
- return pkg->recommends_str[index];
|
||||
+ if (pkg_index < pkg->recommends_count) {
|
||||
+ return pkg->recommends_str[pkg_index];
|
||||
}
|
||||
- index -= pkg->recommends_count;
|
||||
+ pkg_index -= pkg->recommends_count;
|
||||
|
||||
- if (index < pkg->suggests_count) {
|
||||
- return pkg->suggests_str[index];
|
||||
+ if (pkg_index < pkg->suggests_count) {
|
||||
+ return pkg->suggests_str[pkg_index];
|
||||
}
|
||||
- index -= pkg->suggests_count;
|
||||
+ pkg_index -= pkg->suggests_count;
|
||||
|
||||
- if (index < pkg->depends_count) {
|
||||
- return pkg->depends_str[index];
|
||||
+ if (pkg_index < pkg->depends_count) {
|
||||
+ return pkg->depends_str[pkg_index];
|
||||
}
|
||||
- fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", index, pkg->name);
|
||||
+ fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", pkg_index, pkg->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-05-09 02:06:48.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
*/
|
||||
int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts);
|
||||
|
||||
-char *pkg_depend_str(pkg_t *pkg, int index);
|
||||
+char *pkg_depend_str(pkg_t *pkg, int pkg_index);
|
||||
void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg);
|
||||
void freeDepends(pkg_t *pkg);
|
||||
void printDepends(pkg_t * pkg);
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-05-09 02:12:05.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c 2006-05-09 02:17:35.000000000 +0200
|
||||
@@ -143,7 +143,7 @@
|
||||
pkg_t *pkg_hash_fetch_best_installation_candidate(ipkg_conf_t *conf, abstract_pkg_t *apkg,
|
||||
int (*constraint_fcn)(pkg_t *pkg, void *cdata), void *cdata, int quiet)
|
||||
{
|
||||
- int i;
|
||||
+ int i, j;
|
||||
int nprovides = 0;
|
||||
int nmatching = 0;
|
||||
pkg_vec_t *matching_pkgs = pkg_vec_alloc();
|
||||
@@ -209,11 +209,10 @@
|
||||
/* now check for supported architecture */
|
||||
{
|
||||
int max_count = 0;
|
||||
- int i;
|
||||
|
||||
/* count packages matching max arch priority and keep track of last one */
|
||||
- for (i = 0; i < vec->len; i++) {
|
||||
- pkg_t *maybe = vec->pkgs[i];
|
||||
+ for (j = 0; j < vec->len; j++) {
|
||||
+ pkg_t *maybe = vec->pkgs[j];
|
||||
ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d version=%s \n",
|
||||
maybe->name, maybe->architecture, maybe->arch_priority, maybe->version);
|
||||
if (maybe->arch_priority > 0) {
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h
|
||||
--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-05-09 02:06:48.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h 2006-05-09 02:16:48.000000000 +0200
|
||||
@@ -35,6 +35,8 @@
|
||||
};
|
||||
typedef struct abstract_pkg_vec abstract_pkg_vec_t;
|
||||
|
||||
+typedef int (*pkg_compar_t)(pkg_t *, pkg_t *);
|
||||
+typedef int (*abstract_pkg_compar_t)(abstract_pkg_t *, abstract_pkg_t *);
|
||||
|
||||
pkg_vec_t * pkg_vec_alloc(void);
|
||||
void pkg_vec_free(pkg_vec_t *vec);
|
@ -1,19 +0,0 @@ |
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# fix ipkg bugs
|
||||
#
|
||||
diff -ruN busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162-fixes/archival/libipkg/pkg.c
|
||||
--- busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c 2006-05-09 02:16:48.000000000 +0200
|
||||
+++ busybox-1.1.2+ipkg-0.99.162-fixes/archival/libipkg/pkg.c 2006-05-09 05:15:29.000000000 +0200
|
||||
@@ -359,6 +359,8 @@
|
||||
if (!oldpkg->essential)
|
||||
oldpkg->essential = newpkg->essential;
|
||||
|
||||
+ oldpkg->provided_by_hand |= newpkg->provided_by_hand;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in new issue