diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-06-25 21:00:09 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-06-25 21:00:09 +0200 |
commit | 6f58e88ce0c721c8954898f81c9fbf8088fcba13 (patch) | |
tree | 43a1464e4175c764e630390dde7dae597691db2a /package/util-linux-ng/patches | |
parent | a01131d813946a99aa5206633a524855c3b6f58c (diff) |
update util-linux to util-linux-ng
- disable some packages not usable for mips/rb532
Diffstat (limited to 'package/util-linux-ng/patches')
15 files changed, 286 insertions, 0 deletions
diff --git a/package/util-linux-ng/patches/patch-fdisk_cfdisk_c b/package/util-linux-ng/patches/patch-fdisk_cfdisk_c new file mode 100644 index 000000000..8e5678d71 --- /dev/null +++ b/package/util-linux-ng/patches/patch-fdisk_cfdisk_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/fdisk/cfdisk.c 2009-05-05 21:16:45.000000000 +0200 ++++ util-linux-ng-2.15/fdisk/cfdisk.c 2009-06-22 22:42:23.000000000 +0200 +@@ -357,7 +357,7 @@ xmalloc (size_t size) { + /* Some libc's have their own basename() */ + static char * + my_basename(char *devname) { +- char *s = rindex(devname, '/'); ++ char *s = strrchr(devname, '/'); + return s ? s+1 : devname; + } + diff --git a/package/util-linux-ng/patches/patch-fdisk_fdiskbsdlabel_c b/package/util-linux-ng/patches/patch-fdisk_fdiskbsdlabel_c new file mode 100644 index 000000000..f54a530dd --- /dev/null +++ b/package/util-linux-ng/patches/patch-fdisk_fdiskbsdlabel_c @@ -0,0 +1,53 @@ +--- util-linux-ng-2.15.orig/fdisk/fdiskbsdlabel.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/fdisk/fdiskbsdlabel.c 2009-06-22 22:42:04.000000000 +0200 +@@ -538,10 +538,10 @@ xbsd_write_bootstrap (void) + + /* We need a backup of the disklabel (xbsd_dlabel might have changed). */ + d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE]; +- bcopy (d, &dl, sizeof (struct xbsd_disklabel)); ++ memcpy (&dl, d, sizeof (struct xbsd_disklabel)); + + /* The disklabel will be overwritten by 0's from bootxx anyway */ +- bzero (d, sizeof (struct xbsd_disklabel)); ++ memset (d, 0, sizeof (struct xbsd_disklabel)); + + snprintf (path, sizeof(path), "%s/boot%s", bootdir, dkbasename); + if (!xbsd_get_bootstrap (path, &disklabelbuffer[xbsd_dlabel.d_secsize], +@@ -555,7 +555,7 @@ xbsd_write_bootstrap (void) + exit ( EXIT_FAILURE ); + } + +- bcopy (&dl, d, sizeof (struct xbsd_disklabel)); ++ memcpy (d, &dl, sizeof (struct xbsd_disklabel)); + + #if defined (__powerpc__) || defined (__hppa__) + sector = 0; +@@ -657,7 +657,7 @@ xbsd_initlabel (struct partition *p, str + struct geom g; + + get_geometry (fd, &g); +- bzero (d, sizeof (struct xbsd_disklabel)); ++ memset (d, 0, sizeof (struct xbsd_disklabel)); + + d -> d_magic = BSD_DISKMAGIC; + +@@ -740,8 +740,8 @@ xbsd_readlabel (struct partition *p, str + if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE)) + fatal (unable_to_read); + +- bcopy (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], +- d, sizeof (struct xbsd_disklabel)); ++ memcpy (d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ++ sizeof (struct xbsd_disklabel)); + + if (d -> d_magic != BSD_DISKMAGIC || d -> d_magic2 != BSD_DISKMAGIC) + return 0; +@@ -776,7 +776,7 @@ xbsd_writelabel (struct partition *p, st + /* This is necessary if we want to write the bootstrap later, + otherwise we'd write the old disklabel with the bootstrap. + */ +- bcopy (d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ++ memcpy (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], d, + sizeof (struct xbsd_disklabel)); + + #if defined (__alpha__) && BSD_LABELSECTOR == 0 diff --git a/package/util-linux-ng/patches/patch-fdisk_sfdisk_c b/package/util-linux-ng/patches/patch-fdisk_sfdisk_c new file mode 100644 index 000000000..a4778b60c --- /dev/null +++ b/package/util-linux-ng/patches/patch-fdisk_sfdisk_c @@ -0,0 +1,35 @@ +--- util-linux-ng-2.15.orig/fdisk/sfdisk.c 2009-05-05 21:16:46.000000000 +0200 ++++ util-linux-ng-2.15/fdisk/sfdisk.c 2009-06-22 22:41:09.000000000 +0200 +@@ -1725,12 +1725,12 @@ read_stdin(char **fields, char *line, in + eof = 1; + return RD_EOF; + } +- if (!(lp = index(lp, '\n'))) ++ if (!(lp = strchr(lp, '\n'))) + fatal(_("long or incomplete input line - quitting\n")); + *lp = 0; + + /* remove comments, if any */ +- if ((lp = index(line+2, '#')) != 0) ++ if ((lp = strchr(line+2, '#')) != 0) + *lp = 0; + + /* recognize a few commands - to be expanded */ +@@ -1740,7 +1740,7 @@ read_stdin(char **fields, char *line, in + } + + /* dump style? - then bad input is fatal */ +- if ((ip = index(line+2, ':')) != 0) { ++ if ((ip = strchr(line+2, ':')) != 0) { + struct dumpfld *d; + + nxtfld: +@@ -2503,7 +2503,7 @@ main(int argc, char **argv) { + + if (argc < 1) + fatal(_("no command?\n")); +- if ((progn = rindex(argv[0], '/')) == NULL) ++ if ((progn = strrchr(argv[0], '/')) == NULL) + progn = argv[0]; + else + progn++; diff --git a/package/util-linux-ng/patches/patch-login-utils_Makefile_in b/package/util-linux-ng/patches/patch-login-utils_Makefile_in new file mode 100644 index 000000000..b25c3dca4 --- /dev/null +++ b/package/util-linux-ng/patches/patch-login-utils_Makefile_in @@ -0,0 +1,13 @@ +--- util-linux-ng-2.15.orig/login-utils/Makefile.in 2009-05-05 23:21:34.000000000 +0200 ++++ util-linux-ng-2.15/login-utils/Makefile.in 2009-06-22 23:05:58.000000000 +0200 +@@ -1164,10 +1164,6 @@ $(ul_libblkid_la): + @BUILD_LOGIN_UTILS_TRUE@install-exec-hook:: + @BUILD_LOGIN_UTILS_TRUE@ cd $(DESTDIR)$(usrsbinexecdir) && ln -sf vipw vigr + +-@BUILD_WALL_TRUE@@MAKEINSTALL_DO_CHOWN_TRUE@@USE_TTY_GROUP_TRUE@install-exec-hook:: +-@BUILD_WALL_TRUE@@MAKEINSTALL_DO_CHOWN_TRUE@@USE_TTY_GROUP_TRUE@ chgrp tty $(DESTDIR)$(usrbinexecdir)/wall +-@BUILD_WALL_TRUE@@MAKEINSTALL_DO_CHOWN_TRUE@@USE_TTY_GROUP_TRUE@ chmod g+s $(DESTDIR)$(usrbinexecdir)/wall +- + @BUILD_INIT_TRUE@install-exec-hook:: + @BUILD_INIT_TRUE@ cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot + @BUILD_INIT_TRUE@ cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot diff --git a/package/util-linux-ng/patches/patch-login-utils_ttymsg_c b/package/util-linux-ng/patches/patch-login-utils_ttymsg_c new file mode 100644 index 000000000..ba78aa01b --- /dev/null +++ b/package/util-linux-ng/patches/patch-login-utils_ttymsg_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/login-utils/ttymsg.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/login-utils/ttymsg.c 2009-06-22 22:44:07.000000000 +0200 +@@ -111,7 +111,7 @@ ttymsg(struct iovec *iov, int iovcnt, ch + if (wret >= 0) { + left -= wret; + if (iov != localiov) { +- bcopy(iov, localiov, ++ memcpy(localiov, iov, + iovcnt * sizeof(struct iovec)); + iov = localiov; + } diff --git a/package/util-linux-ng/patches/patch-login-utils_wall_c b/package/util-linux-ng/patches/patch-login-utils_wall_c new file mode 100644 index 000000000..b30da5c65 --- /dev/null +++ b/package/util-linux-ng/patches/patch-login-utils_wall_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/login-utils/wall.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/login-utils/wall.c 2009-06-22 22:43:36.000000000 +0200 +@@ -95,7 +95,7 @@ main(int argc, char **argv) { + textdomain(PACKAGE); + + progname = argv[0]; +- p = rindex(progname, '/'); ++ p = strrchr(progname, '/'); + if (p) + progname = p+1; + diff --git a/package/util-linux-ng/patches/patch-misc-utils_cal_c b/package/util-linux-ng/patches/patch-misc-utils_cal_c new file mode 100644 index 000000000..0f8df6815 --- /dev/null +++ b/package/util-linux-ng/patches/patch-misc-utils_cal_c @@ -0,0 +1,18 @@ +--- util-linux-ng-2.15.orig/misc-utils/cal.c 2009-03-25 13:20:18.000000000 +0100 ++++ util-linux-ng-2.15/misc-utils/cal.c 2009-06-22 22:49:19.000000000 +0200 +@@ -291,6 +291,7 @@ main(int argc, char **argv) { + * the locale database, which can be overridden with the + * -s (Sunday) or -m (Monday) options. + */ ++#if 0 + #ifdef HAVE_LANGINFO_H + /* + * You need to use 2 locale variables to get the first day of the week. +@@ -315,6 +316,7 @@ main(int argc, char **argv) { + weekstart = (wfd + *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1) % 7; + } + #endif ++#endif + + yflag = 0; + while ((ch = getopt(argc, argv, "13mjsyV")) != -1) diff --git a/package/util-linux-ng/patches/patch-misc-utils_logger_c b/package/util-linux-ng/patches/patch-misc-utils_logger_c new file mode 100644 index 000000000..6a65e3ac3 --- /dev/null +++ b/package/util-linux-ng/patches/patch-misc-utils_logger_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/misc-utils/logger.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/misc-utils/logger.c 2009-06-22 22:50:36.000000000 +0200 +@@ -196,7 +196,7 @@ main(int argc, char **argv) { + } else { + if (p != buf) + *p++ = ' '; +- bcopy(*argv++, p, len); ++ memcpy(p, *argv++, len); + *(p += len) = '\0'; + } + } diff --git a/package/util-linux-ng/patches/patch-misc-utils_whereis_c b/package/util-linux-ng/patches/patch-misc-utils_whereis_c new file mode 100644 index 000000000..6e6edcee5 --- /dev/null +++ b/package/util-linux-ng/patches/patch-misc-utils_whereis_c @@ -0,0 +1,19 @@ +--- util-linux-ng-2.15.orig/misc-utils/whereis.c 2009-03-25 13:19:08.000000000 +0100 ++++ util-linux-ng-2.15/misc-utils/whereis.c 2009-06-22 22:51:39.000000000 +0200 +@@ -325,14 +325,14 @@ findin(char *dir, char *cp) { + char dirbuf[1024]; + struct stat statbuf; + +- dd = index(dir, '*'); ++ dd = strchr(dir, '*'); + if (!dd) + goto noglob; + + l = strlen(dir); + if (l < sizeof(dirbuf)) { /* refuse excessively long names */ + strcpy (dirbuf, dir); +- d = index(dirbuf, '*'); ++ d = strchr(dirbuf, '*'); + *d = 0; + dirp = opendir(dirbuf); + if (dirp == NULL) diff --git a/package/util-linux-ng/patches/patch-mount_mount_c b/package/util-linux-ng/patches/patch-mount_mount_c new file mode 100644 index 000000000..7335765f2 --- /dev/null +++ b/package/util-linux-ng/patches/patch-mount_mount_c @@ -0,0 +1,16 @@ +--- util-linux-ng-2.15.orig/mount/mount.c 2009-03-27 13:13:20.000000000 +0100 ++++ util-linux-ng-2.15/mount/mount.c 2009-06-22 22:58:48.000000000 +0200 +@@ -914,11 +914,11 @@ guess_fstype_and_mount(const char *spec, + + /* Accept a comma-separated list of types, and try them one by one */ + /* A list like "nonfs,.." indicates types not to use */ +- if (*types && strncmp(*types, "no", 2) && index(*types,',')) { ++ if (*types && strncmp(*types, "no", 2) && strchr(*types,',')) { + char *t = strdup(*types); + char *p; + +- while((p = index(t,',')) != NULL) { ++ while((p = strchr(t,',')) != NULL) { + *p = 0; + args.type = *types = t; + if (do_mount (&args, special, status) == 0) diff --git a/package/util-linux-ng/patches/patch-mount_mount_mntent_c b/package/util-linux-ng/patches/patch-mount_mount_mntent_c new file mode 100644 index 000000000..4e0f05735 --- /dev/null +++ b/package/util-linux-ng/patches/patch-mount_mount_mntent_c @@ -0,0 +1,20 @@ +--- util-linux-ng-2.15.orig/mount/mount_mntent.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/mount/mount_mntent.c 2009-06-22 22:59:15.000000000 +0200 +@@ -157,7 +157,7 @@ my_getmntent (mntFILE *mfp) { + return NULL; + + mfp->mntent_lineno++; +- s = index (buf, '\n'); ++ s = strchr (buf, '\n'); + if (s == NULL) { + /* Missing final newline? Otherwise extremely */ + /* long line - assume file was corrupted */ +@@ -165,7 +165,7 @@ my_getmntent (mntFILE *mfp) { + fprintf(stderr, _("[mntent]: warning: no final " + "newline at the end of %s\n"), + mfp->mntent_file); +- s = index (buf, 0); ++ s = strchr (buf, 0); + } else { + mfp->mntent_errs = 1; + goto err; diff --git a/package/util-linux-ng/patches/patch-mount_sundries_c b/package/util-linux-ng/patches/patch-mount_sundries_c new file mode 100644 index 000000000..640b2e2aa --- /dev/null +++ b/package/util-linux-ng/patches/patch-mount_sundries_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/mount/sundries.c 2009-03-25 13:20:18.000000000 +0100 ++++ util-linux-ng-2.15/mount/sundries.c 2009-06-22 22:59:31.000000000 +0200 +@@ -157,7 +157,7 @@ matching_type (const char *type, const c + if (strncmp(p, type, len) == 0 && + (p[len] == 0 || p[len] == ',')) + return !no; +- p = index(p,','); ++ p = strchr(p,','); + if (!p) + break; + p++; diff --git a/package/util-linux-ng/patches/patch-text-utils_colcrt_c b/package/util-linux-ng/patches/patch-text-utils_colcrt_c new file mode 100644 index 000000000..122e5b23e --- /dev/null +++ b/package/util-linux-ng/patches/patch-text-utils_colcrt_c @@ -0,0 +1,13 @@ +--- util-linux-ng-2.15.orig/text-utils/colcrt.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/text-utils/colcrt.c 2009-06-22 22:53:15.000000000 +0200 +@@ -252,8 +252,8 @@ void pflush(int ol) + } + putwchar('\n'); + } +- bcopy(page[ol], page, (267 - ol) * 132 * sizeof(wchar_t)); +- bzero(page[267- ol], ol * 132 * sizeof(wchar_t)); ++ memcpy(page, page[ol], (267 - ol) * 132 * sizeof(wchar_t)); ++ memset(page[267- ol], 0, ol * 132 * sizeof(wchar_t)); + outline -= ol; + outcol = 0; + first = 1; diff --git a/package/util-linux-ng/patches/patch-text-utils_display_c b/package/util-linux-ng/patches/patch-text-utils_display_c new file mode 100644 index 000000000..ecb8069ff --- /dev/null +++ b/package/util-linux-ng/patches/patch-text-utils_display_c @@ -0,0 +1,11 @@ +--- util-linux-ng-2.15.orig/text-utils/display.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/text-utils/display.c 2009-06-22 22:56:12.000000000 +0200 +@@ -163,7 +163,7 @@ static void bpad(PR *pr) + pr->cchar[0] = 's'; + pr->cchar[1] = 0; + for (p1 = pr->fmt; *p1 != '%'; ++p1); +- for (p2 = ++p1; *p1 && index(spec, *p1); ++p1); ++ for (p2 = ++p1; *p1 && strchr(spec, *p1); ++p1); + while ((*p2++ = *p1++) != 0) ; + } + diff --git a/package/util-linux-ng/patches/patch-text-utils_parse_c b/package/util-linux-ng/patches/patch-text-utils_parse_c new file mode 100644 index 000000000..683e6f279 --- /dev/null +++ b/package/util-linux-ng/patches/patch-text-utils_parse_c @@ -0,0 +1,33 @@ +--- util-linux-ng-2.15.orig/text-utils/parse.c 2009-02-24 16:39:30.000000000 +0100 ++++ util-linux-ng-2.15/text-utils/parse.c 2009-06-22 22:54:37.000000000 +0200 +@@ -64,7 +64,7 @@ void addfile(char *name) + exit(1); + } + while (fgets(buf, sizeof(buf), fp)) { +- if ((p = index(buf, '\n')) == NULL) { ++ if ((p = strchr(buf, '\n')) == NULL) { + (void)fprintf(stderr, _("hexdump: line too long.\n")); + while ((ch = getchar()) != '\n' && ch != EOF); + continue; +@@ -171,7 +171,7 @@ int size(FS *fs) + * skip any special chars -- save precision in + * case it's a %s format. + */ +- while (index(spec + 1, *++fmt)); ++ while (strchr(spec + 1, *++fmt)); + if (*fmt == '.' && isdigit((unsigned char)*++fmt)) { + prec = atoi(fmt); + while (isdigit((unsigned char)*++fmt)); +@@ -244,10 +244,10 @@ void rewrite(FS *fs) + if (fu->bcnt) { + sokay = USEBCNT; + /* skip to conversion character */ +- for (++p1; index(spec, *p1); ++p1); ++ for (++p1; strchr(spec, *p1); ++p1); + } else { + /* skip any special chars, field width */ +- while (index(spec + 1, *++p1)); ++ while (strchr(spec + 1, *++p1)); + if (*p1 == '.' && + isdigit((unsigned char)*++p1)) { + sokay = USEPREC; |