diff -urN kernel-source-2.4.22-2.4.22.orig/fs/cramfs/inode.c kernel-source-2.4.22-2.4.22/fs/cramfs/inode.c --- kernel-source-2.4.22-2.4.22.orig/fs/cramfs/inode.c 2002-08-03 10:39:45.000000000 +1000 +++ kernel-source-2.4.22-2.4.22/fs/cramfs/inode.c 2002-08-30 20:40:16.000000000 +1000 @@ -54,6 +54,9 @@ inode->i_blksize = PAGE_CACHE_SIZE; inode->i_gid = cramfs_inode->gid; inode->i_ino = CRAMINO(cramfs_inode); + inode->i_atime = 0; + inode->i_mtime = 0; + inode->i_ctime = 0; /* inode->i_nlink is left 1 - arguably wrong for directories, but it's the best we can do without reading the directory contents. 1 yields the right result in GNU find, even diff -urN kernel-source-2.4.22-2.4.22.orig/init/main.c kernel-source-2.4.22-2.4.22/init/main.c --- kernel-source-2.4.22-2.4.22.orig/init/main.c 2003-08-30 16:01:49.000000000 +1000 +++ kernel-source-2.4.22-2.4.22/init/main.c 2003-09-03 20:27:20.000000000 +1000 @@ -234,11 +234,14 @@ { char *next,*quote; int args, envs; + char *peq; + int oenvs, i; if (!*line) return; args = 0; envs = 1; /* TERM is set to 'linux' by default */ + oenvs = envs; next = line; while ((line = next) != NULL) { quote = strchr(line,'"'); @@ -255,6 +258,8 @@ } if (next != NULL) *next++ = 0; + if (!*line) + continue; if (!strncmp(line,"init=",5)) { line += 5; execute_command = line; @@ -273,7 +278,20 @@ * Then check if it's an environment variable or * an option. */ - if (strchr(line,'=')) { + if ((peq = strchr(line,'=')) != NULL) { + /* + * Make sure we don't duplicate what's in the + * initial environment. We don't check for + * duplicates in line since the user can sort + * that one out. + */ + for (i = 0; i <= oenvs; i++) + if (strncmp(line,envp_init[i],peq-line) == 0) { + envp_init[i] = line; + break; + } + if (i <= oenvs) + continue; if (envs >= MAX_INIT_ENVS) break; envp_init[++envs] = line; diff -urN kernel-source-2.4.22-2.4.22.orig/init/do_mounts.c kernel-source-2.4.22-2.4.22/init/do_mounts.c --- kernel-source-2.4.22-2.4.22.orig/init/do_mounts.c 2003-08-30 16:01:49.000000000 +1000 +++ kernel-source-2.4.22-2.4.22/init/do_mounts.c 2003-09-03 20:27:20.000000000 +1000 @@ -647,11 +647,11 @@ goto done; } - printk(KERN_NOTICE "RAMDISK: Loading %d blocks [%ld disk%s] into ram disk... ", + printk(KERN_NOTICE "RAMDISK: Loading %d blocks [%lu disk%s] into ram disk... ", nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : ""); for (i=0; i < nblocks; i++) { if (i && (i % devblocks == 0)) { - printk("done disk #%ld.\n", i/devblocks); + printk("done disk #%lu.\n", i/devblocks); rotate = 0; if (close(in_fd)) { printk("Error closing the disk.\n"); @@ -663,7 +663,7 @@ printk("Error opening disk.\n"); goto noclose_input; } - printk("Loading disk #%ld... ", i/devblocks+1); + printk("Loading disk #%lu... ", i/devblocks+1); } read(in_fd, buf, BLOCK_SIZE); write(out_fd, buf, BLOCK_SIZE); diff -urN kernel-source-2.4.22-2.4.22.orig/fs/block_dev.c kernel-source-2.4.22-2.4.22/fs/block_dev.c --- kernel-source-2.4.22-2.4.22.orig/fs/block_dev.c 2003-06-01 13:06:32.000000000 +1000 +++ kernel-source-2.4.22-2.4.22/fs/block_dev.c 2003-06-01 20:43:53.000000000 +1000 @@ -95,7 +95,7 @@ sync_buffers(dev, 2); blksize_size[MAJOR(dev)][MINOR(dev)] = size; bdev->bd_inode->i_blkbits = blksize_bits(size); - kill_bdev(bdev); + invalidate_bdev(bdev, 1); bdput(bdev); return 0; }