]> Zhao Yanbai Git Server - minix.git/commitdiff
Allow holes in executables.
authorPhilip Homburg <philip@cs.vu.nl>
Mon, 24 Jul 2006 13:07:25 +0000 (13:07 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Mon, 24 Jul 2006 13:07:25 +0000 (13:07 +0000)
servers/fs/exec.c

index 2c6234c75a7f88f5cc519f24c3a3ef9c30d91da8..39755f3d70092cbcdc359175b95edeb7c66d9f70 100644 (file)
@@ -574,9 +574,12 @@ phys_bytes seg_bytes;              /* how much is to be transferred? */
   {
        b= read_map(rip, o);
        if (b == NO_BLOCK)
-               return EIO;     /* Executables don't have holes */
-
-       bp = get_block(rip->i_dev, b, NORMAL);  /* get block */
+       {
+               bp = get_block(NO_DEV, NO_BLOCK, NORMAL);    /* get a buffer */
+               zero_block(bp);
+       }
+       else
+               bp = get_block(rip->i_dev, b, NORMAL);  /* get block */
        if (o < off)
                b_off= off-o;
        else