aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index ab7c11f2a..3b3c166b9 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -8,7 +8,7 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10 10
11//applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP)) 11//applet:IF_LSMOD(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP))
12 12
13//usage:#if !ENABLE_MODPROBE_SMALL 13//usage:#if !ENABLE_MODPROBE_SMALL
14//usage:#define lsmod_trivial_usage 14//usage:#define lsmod_trivial_usage
@@ -87,7 +87,8 @@ int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
87 // N.B. token[3] is either '-' (module is not used by others) 87 // N.B. token[3] is either '-' (module is not used by others)
88 // or comma-separated list ended by comma 88 // or comma-separated list ended by comma
89 // so trimming the trailing char is just what we need! 89 // so trimming the trailing char is just what we need!
90 token[3][strlen(token[3])-1] = '\0'; 90 if (token[3][0])
91 token[3][strlen(token[3]) - 1] = '\0';
91# if ENABLE_UNICODE_SUPPORT 92# if ENABLE_UNICODE_SUPPORT
92 { 93 {
93 uni_stat_t uni_stat; 94 uni_stat_t uni_stat;