Lines Matching defs:bounds
163 const char *device, int bounds, const int status)
212 xo_emit_h(xo, "{P: }{Lwc:Bounds}{:bounds/%d}\n", bounds);
238 * directory and we should not try to read a bounds file.
245 if ((fp = xfopenat(savedirfd, "bounds", O_RDONLY, "r")) == NULL) {
247 printf("unable to open bounds file, using 0\n");
252 logmsg(LOG_WARNING, "bounds file is empty, using 0");
254 logmsg(LOG_WARNING, "bounds file: %s", strerror(errno));
262 logmsg(LOG_WARNING, "invalid value found in bounds, using 0");
270 writebounds(int savedirfd, int bounds)
274 if ((fp = xfopenat(savedirfd, "bounds", O_WRONLY | O_CREAT | O_TRUNC,
276 logmsg(LOG_WARNING, "unable to write to bounds file: %m");
281 printf("bounds number: %d\n", bounds);
283 fprintf(fp, "%d\n", bounds);
312 int savedirfd, const char *infoname, const char *device, int bounds,
336 printheader(xostdout, kdh, device, bounds, status);
338 printheader(xoinfo, kdh, device, bounds, status);
360 saved_dump_size(int savedirfd, int bounds)
367 (void)snprintf(path, sizeof(path), "info.%d", bounds);
369 (void)snprintf(path, sizeof(path), "vmcore.%d", bounds);
371 (void)snprintf(path, sizeof(path), "vmcore.%d.gz", bounds);
373 (void)snprintf(path, sizeof(path), "vmcore.%d.zst", bounds);
375 (void)snprintf(path, sizeof(path), "textdump.tar.%d", bounds);
377 (void)snprintf(path, sizeof(path), "textdump.tar.%d.gz", bounds);
384 saved_dump_remove(int savedirfd, int bounds)
388 (void)snprintf(path, sizeof(path), "info.%d", bounds);
390 (void)snprintf(path, sizeof(path), "vmcore.%d", bounds);
392 (void)snprintf(path, sizeof(path), "vmcore.%d.gz", bounds);
394 (void)snprintf(path, sizeof(path), "vmcore.%d.zst", bounds);
396 (void)snprintf(path, sizeof(path), "textdump.tar.%d", bounds);
398 (void)snprintf(path, sizeof(path), "textdump.tar.%d.gz", bounds);
400 (void)snprintf(path, sizeof(path), "livecore.%d", bounds);
402 (void)snprintf(path, sizeof(path), "livecore.%d.gz", bounds);
404 (void)snprintf(path, sizeof(path), "livecore.%d.zst", bounds);
431 check_space(const char *savedir, int savedirfd, off_t dumpsize, int bounds)
473 needed -= saved_dump_size(savedirfd, bounds);
757 int bounds;
760 bounds = getbounds(savedirfd);
865 printheader(xostdout, &kdhl, device, bounds, -1);
870 writebounds(savedirfd, bounds + 1);
871 saved_dump_remove(savedirfd, bounds);
873 snprintf(corename, sizeof(corename), "livecore.%d", bounds);
885 snprintf(infoname, sizeof(infoname), "info.%d", bounds);
887 bounds, status) != 0) {
936 int bounds, status;
947 bounds = getbounds(savedirfd);
1109 printheader(xostdout, &kdhf, device, bounds, -1);
1112 printheader(xostdout, &kdhl, device, bounds, -1);
1142 if (!check_space(savedir, savedirfd, dumplength, bounds)) {
1147 writebounds(savedirfd, bounds + 1);
1149 saved_dump_remove(savedirfd, bounds);
1155 (isencrypted ? "vmcore_encrypted" : "vmcore"), bounds);
1157 snprintf(corename, sizeof(corename), "vmcore.%d.%s", bounds,
1162 (isencrypted ? "vmcore_encrypted" : "vmcore"), bounds);
1183 snprintf(infoname, sizeof(infoname), "info.%d", bounds);
1185 bounds, status) != 0) {
1204 snprintf(keyname, sizeof(keyname), "key.%d", bounds);