projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Truncate exclusion names to have a terminal '\0'
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
modprobe.c
diff --git
a/src/bin/lttng-sessiond/modprobe.c
b/src/bin/lttng-sessiond/modprobe.c
index d730a1dae972fb6f76a3907c8e1ad95ed2be61e1..2c527dced1eac9c66c52cf436294c6fa20d91573 100644
(file)
--- a/
src/bin/lttng-sessiond/modprobe.c
+++ b/
src/bin/lttng-sessiond/modprobe.c
@@
-16,7
+16,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <assert.h>
#include <stdio.h>
#define _LGPL_SOURCE
#include <assert.h>
#include <stdio.h>
@@
-92,6
+91,8
@@
struct kern_modules_param kern_modules_probes_default[] = {
{ "lttng-probe-v4l2" },
{ "lttng-probe-workqueue" },
{ "lttng-probe-writeback" },
{ "lttng-probe-v4l2" },
{ "lttng-probe-workqueue" },
{ "lttng-probe-writeback" },
+ { "lttng-probe-x86-irq-vectors" },
+ { "lttng-probe-x86-exceptions" },
};
/* dynamic probe modules list */
};
/* dynamic probe modules list */
@@
-359,12
+360,12
@@
static int grow_probes(void)
static int append_list_to_probes(const char *list)
{
char *next;
static int append_list_to_probes(const char *list)
{
char *next;
- int
index = nr_probes,
ret;
- char *tmp_list;
+ int ret;
+ char *tmp_list
, *cur_list
;
assert(list);
assert(list);
- tmp_list = strdup(list);
+
cur_list =
tmp_list = strdup(list);
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
@@
-374,11
+375,11
@@
static int append_list_to_probes(const char *list)
size_t name_len;
struct kern_modules_param *cur_mod;
size_t name_len;
struct kern_modules_param *cur_mod;
- next = strtok(
tmp
_list, ",");
+ next = strtok(
cur
_list, ",");
if (!next) {
break;
}
if (!next) {
break;
}
-
tmp
_list = NULL;
+
cur
_list = NULL;
/* filter leading spaces */
while (*next == ' ') {
/* filter leading spaces */
while (*next == ' ') {
@@
-395,7
+396,7
@@
static int append_list_to_probes(const char *list)
/* Length 13 is "lttng-probe-" + \0 */
name_len = strlen(next) + 13;
/* Length 13 is "lttng-probe-" + \0 */
name_len = strlen(next) + 13;
- cur_mod = &probes[
index++
];
+ cur_mod = &probes[
nr_probes
];
cur_mod->name = zmalloc(name_len);
if (!cur_mod->name) {
PERROR("malloc probe list");
cur_mod->name = zmalloc(name_len);
if (!cur_mod->name) {
PERROR("malloc probe list");
@@
-410,7
+411,6
@@
static int append_list_to_probes(const char *list)
goto error;
}
goto error;
}
- cur_mod++;
nr_probes++;
}
nr_probes++;
}
This page took
0.025926 seconds
and
4
git commands to generate.