Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 121961 Details for
Bug 181685
=sys-apps/mkinitrd-6.0.93 has been released
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/mkinitrd-nash-diet-support.patch
mkinitrd-nash-diet-support.patch (text/plain), 4.27 KB, created by
Sergey Belyashov
on 2007-06-13 20:24:13 UTC
(
hide
)
Description:
files/mkinitrd-nash-diet-support.patch
Filename:
MIME Type:
Creator:
Sergey Belyashov
Created:
2007-06-13 20:24:13 UTC
Size:
4.27 KB
patch
obsolete
>diff -ruN mkinitrd-4.2.1.10.orig/grubby/grubby.c mkinitrd-4.2.1.10/grubby/grubby.c >--- mkinitrd-4.2.1.10.orig/grubby/grubby.c 2005-08-30 00:28:34.000000000 +0400 >+++ mkinitrd-4.2.1.10/grubby/grubby.c 2007-06-13 22:58:12.000000000 +0400 >@@ -235,7 +235,7 @@ > struct singleEntry * findEntryByPath(struct grubConfig * cfg, > const char * path, const char * prefix, > int * index); >-static char * strndup(char * from, int len); >+static char * strndup(char * from, size_t len); > static int readFile(int fd, char ** bufPtr); > static void lineInit(struct singleLine * line); > static void lineFree(struct singleLine * line); >@@ -245,7 +245,7 @@ > struct configFileInfo * cfi); > static char * getRootSpecifier(char * str); > >-static char * strndup(char * from, int len) { >+static char * strndup(char * from, size_t len) { > char * to; > > to = malloc(len + 1); >diff -ruN mkinitrd-4.2.1.10.orig/nash/Makefile mkinitrd-4.2.1.10/nash/Makefile >--- mkinitrd-4.2.1.10.orig/nash/Makefile 2004-09-11 01:22:15.000000000 +0400 >+++ mkinitrd-4.2.1.10/nash/Makefile 2007-06-13 22:58:12.000000000 +0400 >@@ -4,7 +4,7 @@ > ARCH := $(patsubst i%86,i386,$(shell uname -m)) > ARCH := $(patsubst sparc%,sparc,$(ARCH)) > >-ifeq (i386, $(ARCH)) >+ifdef USE_DIET > CC:=diet $(CC) > CFLAGS += -DUSE_DIET=1 > else >diff -ruN mkinitrd-4.2.1.10.orig/nash/mount_by_label.c mkinitrd-4.2.1.10/nash/mount_by_label.c >--- mkinitrd-4.2.1.10.orig/nash/mount_by_label.c 2004-08-16 21:11:01.000000000 +0400 >+++ mkinitrd-4.2.1.10/nash/mount_by_label.c 2007-06-13 23:02:17.000000000 +0400 >@@ -64,7 +64,7 @@ > } > else if (lseek(fd, 0, SEEK_SET) == 0 > && read(fd, (char *) &xfsb, sizeof(xfsb)) == sizeof(xfsb) >- && (strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0)) { >+ && (strncmp((const char*)xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0)) { > memcpy(uuid, xfsb.s_uuid, sizeof(xfsb.s_uuid)); > namesize = sizeof(xfsb.s_fname); > if ((*label = calloc(namesize + 1, 1)) != NULL) >@@ -172,7 +172,7 @@ > int mustRemoveDir = 0; > int i; > >- sprintf(device, "%s/%s", DEVLABELDIR, ptname); >+ snprintf(device, 110, "%s/%s", DEVLABELDIR, ptname); > if (access(device, F_OK)) { > ptr = device; > i = 0; >@@ -265,7 +265,7 @@ > uuid[i] = ((fromhex(s[0])<<4) | fromhex(s[1])); > s += 2; > } >- return get_spec_by_x(UUID, uuid, major, minor); >+ return get_spec_by_x(UUID, (const char*)uuid, major, minor); > > bad_uuid: > fprintf(stderr, _("mount: bad UUID")); >diff -ruN mkinitrd-4.2.1.10.orig/nash/name_to_dev_t.c mkinitrd-4.2.1.10/nash/name_to_dev_t.c >--- mkinitrd-4.2.1.10.orig/nash/name_to_dev_t.c 2004-08-16 21:11:01.000000000 +0400 >+++ mkinitrd-4.2.1.10/nash/name_to_dev_t.c 2007-06-13 22:58:12.000000000 +0400 >@@ -18,7 +18,7 @@ > > /* read device number from .../dev */ > >- sprintf(path, "/sys/block/%s/dev", name); >+ snprintf(path, 64, "/sys/block/%s/dev", name); > fd = open(path, O_RDONLY); > if (fd < 0) > goto fail; >diff -ruN mkinitrd-4.2.1.10.orig/nash/nash.c mkinitrd-4.2.1.10/nash/nash.c >--- mkinitrd-4.2.1.10.orig/nash/nash.c 2007-01-31 23:45:09.000000000 +0300 >+++ mkinitrd-4.2.1.10/nash/nash.c 2007-06-13 22:58:12.000000000 +0400 >@@ -559,9 +559,9 @@ > printf("%s%s", prefix, fn); > > if (S_ISDIR(sb.st_mode)) { >- char * pfx; >- pfx = malloc(strlen(prefix) + 3); >- sprintf(pfx, "%s ", prefix); >+ const size_t pfx_size = strlen(prefix) + 3; >+ char * pfx = malloc(pfx_size); >+ snprintf(pfx, pfx_size, "%s ", prefix); > printf("/\n"); > } else if (S_ISCHR(sb.st_mode)) { > printf(" c %d %d\n", major(sb.st_rdev), minor(sb.st_rdev)); >@@ -1306,7 +1306,7 @@ > strcpy(separator, "/"); > > for (devNum = 0; devNum < 256; devNum++) { >- sprintf(devName, "/dev/loop%s%d", separator, devNum); >+ snprintf(devName, 20, "/dev/loop%s%d", separator, devNum); > if ((fd = open(devName, O_RDONLY)) < 0) return 0; > > if (ioctl(fd, LOOP_GET_STATUS, &loopInfo)) { >@@ -1437,7 +1437,7 @@ > char * ptr, * deviceDir; > int i; > >- sprintf(devName, "%s/%s", prefix, start); >+ snprintf(devName, 128, "%s/%s", prefix, start); > unlink(devName); > > ptr = devName; >@@ -1561,7 +1561,7 @@ > int i; > char * start, * end; > char * chptr; >- int rc; >+ int rc = -1; > > i = read(fd, contents, sizeof(contents) - 1); > if (i == (sizeof(contents) - 1)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 181685
:
121754
|
121755
|
121756
|
121758
|
121766
|
121960
| 121961 |
121963
|
121965
|
212529
|
212530
|
212734
|
212736
|
212737