#include <sys/arc.h>
#include <sys/ddt.h>
#undef ZFS_MAXNAMELEN
-#undef verify
#include <libzfs.h>
#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
exit(1);
}
- if (fstat64(fd, &statbuf) != 0) {
+ if (fstat64_blk(fd, &statbuf) != 0) {
(void) printf("failed to stat '%s': %s\n", path,
strerror(errno));
free(path);
exit(1);
}
- if (S_ISBLK(statbuf.st_mode)) {
- (void) printf("cannot use '%s': character device required\n",
- path);
- free(path);
- (void) close(fd);
- exit(1);
- }
-
psize = statbuf.st_size;
psize = P2ALIGN(psize, (uint64_t)sizeof (vdev_label_t));
}
kernel_init(FREAD);
- g_zfs = libzfs_init();
- ASSERT(g_zfs != NULL);
+ if ((g_zfs = libzfs_init()) == NULL)
+ return (1);
if (dump_all)
verbose = MAX(verbose, 1);