diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 16 | ||||
| -rw-r--r-- | lib/vsprintf.c | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 5330911ebd30..e4fcbd12cf6e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -23,6 +23,22 @@ config MAGIC_SYSRQ | |||
| 23 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | 23 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y |
| 24 | unless you really know what this hack does. | 24 | unless you really know what this hack does. |
| 25 | 25 | ||
| 26 | config UNUSED_SYMBOLS | ||
| 27 | bool "Enable unused/obsolete exported symbols" | ||
| 28 | default y if X86 | ||
| 29 | help | ||
| 30 | Unused but exported symbols make the kernel needlessly bigger. For | ||
| 31 | that reason most of these unused exports will soon be removed. This | ||
| 32 | option is provided temporarily to provide a transition period in case | ||
| 33 | some external kernel module needs one of these symbols anyway. If you | ||
| 34 | encounter such a case in your module, consider if you are actually | ||
| 35 | using the right API. (rationale: since nobody in the kernel is using | ||
| 36 | this in a module, there is a pretty good chance it's actually the | ||
| 37 | wrong interface to use). If you really need the symbol, please send a | ||
| 38 | mail to the linux kernel mailing list mentioning the symbol and why | ||
| 39 | you really need it, and what the merge plan to the mainline kernel for | ||
| 40 | your module is. | ||
| 41 | |||
| 26 | config DEBUG_KERNEL | 42 | config DEBUG_KERNEL |
| 27 | bool "Kernel debugging" | 43 | bool "Kernel debugging" |
| 28 | help | 44 | help |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 797428afd111..bed7229378f2 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
| @@ -489,7 +489,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
| 489 | if (str < end) | 489 | if (str < end) |
| 490 | *str = '\0'; | 490 | *str = '\0'; |
| 491 | else | 491 | else |
| 492 | *end = '\0'; | 492 | end[-1] = '\0'; |
| 493 | } | 493 | } |
| 494 | /* the trailing null byte doesn't count towards the total */ | 494 | /* the trailing null byte doesn't count towards the total */ |
| 495 | return str-buf; | 495 | return str-buf; |
