/* Binary interface */
ls = blkid_probe_get_partitions(pr);
if (!ls)
- errx(EXIT_FAILURE, "%s: failed to read partitions\n", devname);
+ errx(EXIT_FAILURE, "%s: failed to read partitions", devname);
/*
* Print info about the primary (root) partition table
*/
root_tab = blkid_partlist_get_table(ls);
if (!root_tab)
- errx(EXIT_FAILURE, "%s: does not contains any "
- "known partition table\n", devname);
+ errx(EXIT_FAILURE, "%s: does not contain any "
+ "known partition table", devname);
printf("size: %jd, sector size: %u, PT: %s, offset: %jd, id=%s\n---\n",
(intmax_t)blkid_probe_get_size(pr),
static void __attribute__((__noreturn__)) sig_handler(int sig)
{
- errx(EXIT_FAILURE, "\n%d: catch signal: %s\n", getpid(), strsignal(sig));
+ ul_sig_printf("\n%d: caught signal %d\n", getpid(), sig);
+ _exit(EXIT_FAILURE);
}
static int test_lock(struct libmnt_test *ts __attribute__((unused)),
fd = STDIN_FILENO;
}
- if (!name)
- errx(EXIT_FAILURE, "usage: %s [<tty>]\n", program_invocation_short_name);
+ if (!name) {
+ fprintf(stderr, "usage: %s [<tty>]\n", program_invocation_short_name);
+ return EXIT_FAILURE;
+ }
INIT_LIST_HEAD(&consoles);
re = detect_consoles(name, fd, &consoles);