* the whole structures, as the other fields
* are "static".
*/
- prev = realloc(prev->buf, sizeof(*prev) + tot_len);
+ prev = realloc(prev, sizeof(*prev) + tot_len);
prev->buf = (void *)(prev + 1);
}
return 1;
}
- if (statfs(debugfs_path, &st) < 0 || st.f_type != (long)DEBUGFS_TYPE) {
+ if (statfs(debugfs_path, &st) < 0) {
fprintf(stderr, "Invalid debug path %s: %d/%s\n",
debugfs_path, errno, strerror(errno));
return 1;
}
+ if (st.f_type != (long)DEBUGFS_TYPE) {
+ fprintf(stderr, "Debugfs is not mounted at %s\n", debugfs_path);
+ return 1;
+ }
+
if (act_mask_tmp != 0)
act_mask = act_mask_tmp;