Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[deliverable/linux.git] / init / initramfs.c
index a7566031242e56cb0076174966c91a523fc253b6..bece48c3461edd55ba4a9ea5fc1b8662be6bda0f 100644 (file)
@@ -369,7 +369,8 @@ static int __init do_name(void)
 static int __init do_copy(void)
 {
        if (count >= body_len) {
-               xwrite(wfd, victim, body_len);
+               if (xwrite(wfd, victim, body_len) != body_len)
+                       error("write error");
                sys_close(wfd);
                do_utime(vcollected, mtime);
                kfree(vcollected);
@@ -377,7 +378,8 @@ static int __init do_copy(void)
                state = SkipIt;
                return 0;
        } else {
-               xwrite(wfd, victim, count);
+               if (xwrite(wfd, victim, count) != count)
+                       error("write error");
                body_len -= count;
                eat(count);
                return 1;
This page took 0.042224 seconds and 5 git commands to generate.