for (ptr = known_mnts; ptr < known_mnts + ARRAY_SIZE(known_mnts); ptr++) if (find_tracefs_mnt_single(TRACEFS_MAGIC, mnt, *ptr)) goto exit_found;
fp = fopen("/proc/mounts", "r"); if (!fp) returnfalse;
/* Allow room for NULL terminating byte and pipe file name */
snprintf(format, sizeof(format), "%%*s %%%zus %%99s %%*s %%*d %%*d\\n",
PATH_MAX - strlen(pipe_name) - 1); while (fscanf(fp, format, mnt, type) == 2) if (strcmp(type, fstype) == 0) {
found = true; break;
}
fclose(fp);
/* The string from fscanf() might be truncated, check mnt is valid */ if (found && validate_tracefs_mnt(mnt, TRACEFS_MAGIC)) goto exit_found;
if (block_mount) returnfalse;
p_info("could not find tracefs, attempting to mount it now"); /* Most of the time, tracefs is automatically mounted by debugfs at * /sys/kernel/debug/tracing when we try to access it. If we could not * find it, it is likely that debugfs is not mounted. Let's give one * attempt at mounting just tracefs at /sys/kernel/tracing.
*/
strcpy(mnt, known_mnts[1]); if (mount_tracefs(mnt)) returnfalse;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.