Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348299
b: refs/heads/master
c: 35dac27
h: refs/heads/master
i:
  348297: a2e7d3c
  348295: 191c49a
v: v3
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Jan 5, 2013
1 parent 7dad07e commit 8aaf70f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f90b68309683f2c5765a1b04ca23d71e51f1494
refs/heads/master: 35dac27cedd14c3b6fcd4ba7bc3c31738cfd1831
5 changes: 3 additions & 2 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,11 @@ static size_t print_time(u64 ts, char *buf)
if (!printk_time)
return 0;

rem_nsec = do_div(ts, 1000000000);

if (!buf)
return 15;
return snprintf(NULL, 0, "[%5lu.000000] ", (unsigned long)ts);

rem_nsec = do_div(ts, 1000000000);
return sprintf(buf, "[%5lu.%06lu] ",
(unsigned long)ts, rem_nsec / 1000);
}
Expand Down

0 comments on commit 8aaf70f

Please sign in to comment.