aboutsummaryrefslogtreecommitdiffstats
path: root/deadshred.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-28 15:10:48 +0100
committerMattias Andrée <m@maandree.se>2026-02-28 15:10:48 +0100
commit68ebd51c62f0c962ecddbb6cf1f86e26d4be2f98 (patch)
tree84cf504f2a700433a8c02a30e5f0c1984bfeaeaf /deadshred.c
parentfix doc text (diff)
downloaddeadshred-68ebd51c62f0c962ecddbb6cf1f86e26d4be2f98.tar.gz
deadshred-68ebd51c62f0c962ecddbb6cf1f86e26d4be2f98.tar.bz2
deadshred-68ebd51c62f0c962ecddbb6cf1f86e26d4be2f98.tar.xz
m fixesHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--deadshred.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/deadshred.c b/deadshred.c
index baa7bf6..915d168 100644
--- a/deadshred.c
+++ b/deadshred.c
@@ -33,8 +33,8 @@ static int auxthread_pipe[2];
static void
print_status(int done, struct status *s)
{
- static char buf1[2048] = {0};
- static char buf2[2048] = {0};
+ static char buf1[2560] = {0};
+ static char buf2[2560] = {0};
static int bufi = 0;
char subbuf1[256];
@@ -255,7 +255,7 @@ shredspan(int fd, struct span *span, const char *fname, int have_map)
if (r >= 0) {
status_off += (size_t)r;
goto write_status_again;
- } else if (r == EINTR) {
+ } else if (errno == EINTR) {
if (exiting) {
status.nspans = saved_nspans;
goto userexit;
@@ -455,7 +455,7 @@ main(int argc, char *argv[])
eprintf("open %s O_RDWR|O_CREAT 0666:", argv[1]);
if (lseek(map_fd, 0, SEEK_SET))
eprintf("lseek %s 0 SEEK_SET:", argv[1]);
- status.shredded = load_map(fd, &status, status.direction, argv[1]);
+ status.shredded = load_map(map_fd, &status, status.direction, argv[1]);
}
if (pipe(auxthread_pipe))
@@ -526,5 +526,6 @@ out:
if (unlink(argv[1]))
weprintf("unlink %s:", argv[1]);
}
+ free(status.spans);
return 0;
}