skip over padding bytes in deps in /proc/modules
This commit is contained in:
parent
cdccc913ab
commit
036096d9c9
@ -522,7 +522,10 @@ static uint32_t modules_func(fs_node_t *node, uint32_t offset, uint32_t size, ui
|
||||
unsigned int i = 0;
|
||||
soffset += sprintf(&buf[soffset], " Deps: ");
|
||||
while (i < mod_info->deps_length) {
|
||||
soffset += sprintf(&buf[soffset], "%s ", &mod_info->deps[i]);
|
||||
/* Skip padding bytes */
|
||||
if (strlen(&mod_info->deps[i])) {
|
||||
soffset += sprintf(&buf[soffset], "%s ", &mod_info->deps[i]);
|
||||
}
|
||||
i += strlen(&mod_info->deps[i]) + 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user