mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Prune /*NOTREACHED*/
This includes a simplification of mkbusy and format correctness in zhack and ztest Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue #12201
This commit is contained in:
@@ -66,19 +66,15 @@ normal_writer(void *filename)
|
||||
err(1, "failed to open %s", file_path);
|
||||
}
|
||||
|
||||
char *buf = malloc(1);
|
||||
char buf;
|
||||
while (1) {
|
||||
write_num = write(fd, buf, 1);
|
||||
write_num = write(fd, &buf, 1);
|
||||
if (write_num == 0) {
|
||||
err(1, "write failed!");
|
||||
break;
|
||||
}
|
||||
lseek(fd, page_size, SEEK_CUR);
|
||||
}
|
||||
|
||||
if (buf) {
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
|
||||
static void *
|
||||
@@ -140,7 +136,7 @@ main(int argc, char **argv)
|
||||
int i = 0;
|
||||
|
||||
if (argc != 3) {
|
||||
(void) printf("usage: %s <normal write file name>"
|
||||
(void) printf("usage: %s <normal write file name> "
|
||||
"<map write file name>\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
@@ -156,7 +152,6 @@ main(int argc, char **argv)
|
||||
err(1, "pthread_create map_writer failed.");
|
||||
}
|
||||
|
||||
/* NOTREACHED */
|
||||
pthread_join(map_write_tid, NULL);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user