• Petr Vandrovec's avatar
    [PATCH] Get core dump code to work... · 7f14daa1
    Petr Vandrovec authored
    The file based core dump code was broken by pipe changes - a relative
    llseek returns the absolute file position on success, not the relative
    one, so dump_seek() always failed when invoked with non-zero current
    position.
    
    Only success/failure can be tested with relative lseek, we have to trust
    kernel that on success we've got right file offset.  With this fix in
    place I have finally real core files instead of 1KB fragments...
    Signed-off-by: default avatarPetr Vandrovec <petr@vandrovec.name>
    [ Cleaned it up a bit while here - use SEEK_CUR instead of hardcoding 1 ]
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7f14daa1
binfmt_elf.c 45.5 KB