git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use 'noop' IO Scheduler
[zfs.git]
/
cmd
/
zdb
/
zdb.c
diff --git
a/cmd/zdb/zdb.c
b/cmd/zdb/zdb.c
index
1a458f6
..
2f5f19e
100644
(file)
--- a/
cmd/zdb/zdb.c
+++ b/
cmd/zdb/zdb.c
@@
-55,7
+55,6
@@
#include <sys/arc.h>
#include <sys/ddt.h>
#undef ZFS_MAXNAMELEN
#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 ? \
#include <libzfs.h>
#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
@@
-1804,7
+1803,7
@@
dump_label(const char *dev)
exit(1);
}
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);
(void) printf("failed to stat '%s': %s\n", path,
strerror(errno));
free(path);
@@
-1812,14
+1811,6
@@
dump_label(const char *dev)
exit(1);
}
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));
psize = statbuf.st_size;
psize = P2ALIGN(psize, (uint64_t)sizeof (vdev_label_t));
@@
-2888,7
+2879,7
@@
find_zpool(char **target, nvlist_t **configp, int dirc, char **dirv)
nvlist_t *match = NULL;
char *name = NULL;
char *sepp = NULL;
nvlist_t *match = NULL;
char *name = NULL;
char *sepp = NULL;
- char sep;
+ char sep
= 0
;
int count = 0;
importargs_t args = { 0 };
int count = 0;
importargs_t args = { 0 };
@@
-3037,8
+3028,8
@@
main(int argc, char **argv)
}
kernel_init(FREAD);
}
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);
if (dump_all)
verbose = MAX(verbose, 1);