projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'core-hweight-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git]
/
init
/
initramfs.c
diff --git
a/init/initramfs.c
b/init/initramfs.c
index b37d34beb90bb0b3f490731d641ab3a2a07e45d7..4b9c20205092e1f7de716633c0d51bd8746e74af 100644
(file)
--- a/
init/initramfs.c
+++ b/
init/initramfs.c
@@
-457,7
+457,8
@@
static char * __init unpack_to_rootfs(char *buf, unsigned len)
compress_name);
message = msg_buf;
}
compress_name);
message = msg_buf;
}
- }
+ } else
+ error("junk in compressed archive");
if (state != Reset)
error("junk in compressed archive");
this_header = saved_offset + my_inptr;
if (state != Reset)
error("junk in compressed archive");
this_header = saved_offset + my_inptr;
@@
-525,7
+526,7
@@
static void __init clean_rootfs(void)
int fd;
void *buf;
struct linux_dirent64 *dirp;
int fd;
void *buf;
struct linux_dirent64 *dirp;
- int
count
;
+ int
num
;
fd = sys_open("/", O_RDONLY, 0);
WARN_ON(fd < 0);
fd = sys_open("/", O_RDONLY, 0);
WARN_ON(fd < 0);
@@
-539,9
+540,9
@@
static void __init clean_rootfs(void)
}
dirp = buf;
}
dirp = buf;
-
count
= sys_getdents64(fd, dirp, BUF_SIZE);
- while (
count
> 0) {
- while (
count
> 0) {
+
num
= sys_getdents64(fd, dirp, BUF_SIZE);
+ while (
num
> 0) {
+ while (
num
> 0) {
struct stat st;
int ret;
struct stat st;
int ret;
@@
-554,12
+555,12
@@
static void __init clean_rootfs(void)
sys_unlink(dirp->d_name);
}
sys_unlink(dirp->d_name);
}
-
count
-= dirp->d_reclen;
+
num
-= dirp->d_reclen;
dirp = (void *)dirp + dirp->d_reclen;
}
dirp = buf;
memset(buf, 0, BUF_SIZE);
dirp = (void *)dirp + dirp->d_reclen;
}
dirp = buf;
memset(buf, 0, BUF_SIZE);
-
count
= sys_getdents64(fd, dirp, BUF_SIZE);
+
num
= sys_getdents64(fd, dirp, BUF_SIZE);
}
sys_close(fd);
}
sys_close(fd);