Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-x86
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe-x86
  • Repository

Switch branch/tag
  • ipipe-x86
  • kernel
  • printk.c
Find file BlameHistoryPermalink
  • Guillaume Chazarain's avatar
    [PATCH] printk return value: fix it · 025510cd
    Guillaume Chazarain authored Jan 08, 2006
    
    
    What's the true meaning of the printk return value?  Should it include the
    priority prefix length of 3?  and what about the timing information?  In
    both cases it was broken:
    
    strace -e write echo 1 > /dev/kmsg
    => write(1, "1\n", 2)                      = 5
    strace -e write echo "<1>1" > /dev/kmsg
    => write(1, "<1>1\n", 5)                   = 8
    
    The returned length was "length of input string + 3", I made it "length
    of string output to the log buffer".
    
    Note that I couldn't find any printk caller in the kernel interested by its
    return value besides kmsg_write.
    Signed-off-by: default avatarGuillaume Chazarain <guichaz@yahoo.fr>
    Acked-By: default avatarTim Bird <tim.bird@am.sony.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    025510cd

Replace printk.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.

Imprint & Privacy Policy