X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fzdb%2Fzdb.c;h=2f5f19e22dd4164ab9daedb86ffa4f52c666defd;hb=ea1fdf46e2d37e9eb048f9add0fb06e77e9ee6e2;hp=a5ad7feb837239ac1e4c3ffc8b5b2f805d5465ff;hpb=9b020fd97a3dc449a94baec028b30b1fe3c2d5bc;p=zfs.git diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index a5ad7fe..2f5f19e 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -1803,7 +1803,7 @@ dump_label(const char *dev) 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); @@ -1811,14 +1811,6 @@ dump_label(const char *dev) 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));