if (funcs == NULL || funcs[0] == '\0') {
// Disable kernel function tracing.
- ok &= writeStr(k_currentTracerPath, "nop");
- if (fileExists(k_ftraceFilterPath)) {
+ if (fileIsWritable(k_currentTracerPath)) {
+ ok &= writeStr(k_currentTracerPath, "nop");
+ }
+ if (fileIsWritable(k_ftraceFilterPath)) {
ok &= truncateFile(k_ftraceFilterPath);
}
} else {
case 'k':
g_kernelTraceFuncs = optarg;
- break;
+ break;
case 'n':
g_nohup = true;
- break;
+ break;
case 's':
g_initialSleepSecs = atoi(optarg);
listSupportedCategories();
exit(0);
}
- break;
+ break;
default:
fprintf(stderr, "\n");