• Petr Mladek's avatar
    printk: return really stored message length · 034633cc
    Petr Mladek authored
    I wonder if anyone uses printk return value but it is there and should be
    counted correctly.
    
    This patch modifies log_store() to return the number of really stored
    bytes from the 'text' part.  Also it handles the return value in
    vprintk_emit().
    
    Note that log_store() is used also in cont_flush() but we could ignore the
    return value there.  The function works with characters that were already
    counted earlier.  In addition, the store could newer fail here because the
    length of the printed text is limited by the "cont" buffer and "dict" is
    NULL.
    Signed-off-by: default avatarPetr Mladek <pmladek@suse.cz>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Jiri Kosina <jkosina@suse.cz>
    Cc: Kay Sievers <kay@vrfy.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    034633cc
printk.c 74.5 KB