Lines Matching defs:path
94 char path[PATH_MAX];
106 snprintf(path, sizeof(path), "%s/kernel.%d", crashdir, nr);
107 if (stat(path, &st) == 0) {
109 kernel = strdup(path);
113 snprintf(path, sizeof(path), "%s/kernel.%d/kernel",
115 if (stat(path, &st) == 0 && S_ISREG(st.st_mode)) {
116 kernel = strdup(path);
129 snprintf(path, sizeof(path), "%s/info.%d", crashdir, nr);
130 info = fopen(path, "r");
132 warn("%s", path);
135 while (fgets(path, sizeof(path), info) != NULL) {
136 l = strlen(path);
137 if (l > 0 && path[l - 1] == '\n')
138 path[--l] = '\0';
139 if (strncmp(path, " ", 4) == 0) {
140 s = strchr(path, ':');
141 s = (s == NULL) ? path + 4 : s + 1;
142 l = snprintf(path, sizeof(path), "%s/kernel.debug", s);
143 if (stat(path, &st) == -1 || !S_ISREG(st.st_mode)) {
144 path[l - 6] = '\0';
145 if (stat(path, &st) == -1 ||
149 kernel = strdup(path);
266 * the resulting path, otherwise we use the original target. If
273 char path[PATH_MAX];
277 snprintf(path, sizeof(path), "/dev/%s", remote);
278 if (stat(path, &st) != 0)
281 remote = strdup(path);
301 char path[PATH_MAX];
421 snprintf(path, sizeof(path), "%s/vmcore.%d", crashdir, dumpnr);
422 if (stat(path, &st) == -1)
423 err(1, "%s", path);
425 errx(1, "%s: not a regular file", path);
426 vmcore = strdup(path);