Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
546e5354
Commit
546e5354
authored
Mar 06, 2009
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'core/printk' into tracing/ftrace
parents
af438c0f
fef20d9c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
806 additions
and
227 deletions
+806
-227
include/linux/kernel.h
include/linux/kernel.h
+17
-0
include/linux/string.h
include/linux/string.h
+7
-0
lib/Kconfig
lib/Kconfig
+3
-0
lib/vsprintf.c
lib/vsprintf.c
+779
-227
No files found.
include/linux/kernel.h
View file @
546e5354
...
...
@@ -242,6 +242,19 @@ extern struct ratelimit_state printk_ratelimit_state;
extern
int
printk_ratelimit
(
void
);
extern
bool
printk_timed_ratelimit
(
unsigned
long
*
caller_jiffies
,
unsigned
int
interval_msec
);
/*
* Print a one-time message (analogous to WARN_ONCE() et al):
*/
#define printk_once(x...) ({ \
static int __print_once = 1; \
\
if (__print_once) { \
__print_once = 0; \
printk(x); \
} \
})
#else
static
inline
int
vprintk
(
const
char
*
s
,
va_list
args
)
__attribute__
((
format
(
printf
,
1
,
0
)));
...
...
@@ -253,6 +266,10 @@ static inline int printk_ratelimit(void) { return 0; }
static
inline
bool
printk_timed_ratelimit
(
unsigned
long
*
caller_jiffies
,
\
unsigned
int
interval_msec
)
\
{
return
false
;
}
/* No effect, but we still get type checking even in the !PRINTK case: */
#define printk_once(x...) printk(x)
#endif
extern
int
printk_needs_cpu
(
int
cpu
);
...
...
include/linux/string.h
View file @
546e5354
...
...
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
/* for inline */
#include <linux/types.h>
/* for size_t */
#include <linux/stddef.h>
/* for NULL */
#include <stdarg.h>
extern
char
*
strndup_user
(
const
char
__user
*
,
long
);
...
...
@@ -111,6 +112,12 @@ extern void argv_free(char **argv);
extern
bool
sysfs_streq
(
const
char
*
s1
,
const
char
*
s2
);
#ifdef CONFIG_BINARY_PRINTF
int
vbin_printf
(
u32
*
bin_buf
,
size_t
size
,
const
char
*
fmt
,
va_list
args
);
int
bstr_printf
(
char
*
buf
,
size_t
size
,
const
char
*
fmt
,
const
u32
*
bin_buf
);
int
bprintf
(
u32
*
bin_buf
,
size_t
size
,
const
char
*
fmt
,
...)
__printf
(
3
,
4
);
#endif
extern
ssize_t
memory_read_from_buffer
(
void
*
to
,
size_t
count
,
loff_t
*
ppos
,
const
void
*
from
,
size_t
available
);
...
...
lib/Kconfig
View file @
546e5354
...
...
@@ -2,6 +2,9 @@
# Library configuration
#
config BINARY_PRINTF
def_bool n
menu "Library routines"
config BITREVERSE
...
...
lib/vsprintf.c
View file @
546e5354
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment