svn commit: trunk/busybox: archival util-linux

vapier at busybox.net vapier at busybox.net
Wed Jan 4 07:31:20 UTC 2006


Author: vapier
Date: 2006-01-03 23:31:19 -0800 (Tue, 03 Jan 2006)
New Revision: 13077

Log:
use MAP_PRIVATE instead of MAP_SHARED for uClinux systems (see Bug 550)

Modified:
   trunk/busybox/archival/rpm.c
   trunk/busybox/util-linux/mdev.c


Changeset:
Modified: trunk/busybox/archival/rpm.c
===================================================================
--- trunk/busybox/archival/rpm.c	2006-01-04 07:27:46 UTC (rev 13076)
+++ trunk/busybox/archival/rpm.c	2006-01-04 07:31:19 UTC (rev 13077)
@@ -143,7 +143,7 @@
 		mytags = rpm_gettags(rpm_fd, (int *) &tagcount);
 		offset = lseek(rpm_fd, 0, SEEK_CUR);
 		if (!mytags) { printf("Error reading rpm header\n"); exit(-1); }
-		map = mmap(0, offset > getpagesize() ? (offset + offset % getpagesize()) : getpagesize(), PROT_READ, MAP_SHARED, rpm_fd, 0); // Mimimum is one page
+		map = mmap(0, offset > getpagesize() ? (offset + offset % getpagesize()) : getpagesize(), PROT_READ, MAP_PRIVATE, rpm_fd, 0); // Mimimum is one page
 		if (func & rpm_install) {
 			loop_through_files(RPMTAG_BASENAMES, fileaction_dobackup); /* Backup any config files */
 			extract_cpio_gz(rpm_fd); // Extact the archive

Modified: trunk/busybox/util-linux/mdev.c
===================================================================
--- trunk/busybox/util-linux/mdev.c	2006-01-04 07:27:46 UTC (rev 13076)
+++ trunk/busybox/util-linux/mdev.c	2006-01-04 07:31:19 UTC (rev 13077)
@@ -68,7 +68,7 @@
 		/* mmap the config file */
 		if (-1!=(fd=open("/etc/mdev.conf",O_RDONLY))) {
 			len=lseek(fd,0,SEEK_END);
-			conf=mmap(NULL,len,PROT_READ,MAP_SHARED,fd,0);
+			conf=mmap(NULL,len,PROT_READ,MAP_PRIVATE,fd,0);
 			if (conf) {
 				int line=0;
 




More information about the busybox-cvs mailing list