diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/Makefile.lint | 1 | ||||
| -rw-r--r-- | usr/src/Targetdirs | 1 | ||||
| -rw-r--r-- | usr/src/cmd/availdevs/Makefile | 28 | ||||
| -rw-r--r-- | usr/src/cmd/availdevs/availdevs.c | 8 | ||||
| -rw-r--r-- | usr/src/cmd/mdb/common/modules/zfs/zfs.c | 8 | ||||
| -rw-r--r-- | usr/src/cmd/zpool/Makefile | 16 | ||||
| -rw-r--r-- | usr/src/cmd/zpool/zpool_main.c | 59 | ||||
| -rw-r--r-- | usr/src/lib/Makefile | 1 | ||||
| -rw-r--r-- | usr/src/lib/libsec/Makefile | 2 | ||||
| -rw-r--r-- | usr/src/lib/libsec/Makefile.com | 1 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs.h | 5 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_config.c | 36 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_impl.h | 1 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_import.c | 3 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 8 | ||||
| -rw-r--r-- | usr/src/lib/libzfs_jni/Makefile | 10 | ||||
| -rw-r--r-- | usr/src/lib/libzfs_jni/Makefile.com | 12 | ||||
| -rw-r--r-- | usr/src/lib/libzfs_jni/common/libzfs_jni_pool.c | 2 | ||||
| -rw-r--r-- | usr/src/lib/libzpool/Makefile.com | 12 | ||||
| -rw-r--r-- | usr/src/pkgdefs/etc/exception_list_i386 | 11 | ||||
| -rw-r--r-- | usr/src/pkgdefs/etc/exception_list_sparc | 11 |
21 files changed, 127 insertions, 109 deletions
diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint index 1095ed2958..d7e724c006 100644 --- a/usr/src/Makefile.lint +++ b/usr/src/Makefile.lint @@ -45,6 +45,7 @@ COMMON_SUBDIRS = \ cmd/auditstat \ cmd/auths \ cmd/autopush \ + cmd/availdevs \ cmd/awk \ cmd/banner \ cmd/bart \ diff --git a/usr/src/Targetdirs b/usr/src/Targetdirs index ad73d84eed..98ef5c6f3a 100644 --- a/usr/src/Targetdirs +++ b/usr/src/Targetdirs @@ -100,6 +100,7 @@ ROOT.SYS= \ /etc/svc/volatile \ /etc/tm \ /etc/usb \ + /etc/zfs \ /etc/zones \ /export \ /home \ diff --git a/usr/src/cmd/availdevs/Makefile b/usr/src/cmd/availdevs/Makefile index 99015803ba..d962ff85e7 100644 --- a/usr/src/cmd/availdevs/Makefile +++ b/usr/src/cmd/availdevs/Makefile @@ -27,39 +27,31 @@ # PROG= availdevs -OBJS_COMMON= availdevs.o -OBJS= $(OBJS_COMMON) -SRCS= $(OBJS_COMMON:%.o=%.c) include ../Makefile.cmd ROOTCMDDIR= $(ROOTLIB)/zfs -INCS += -I../../lib/libzfs_jni/common \ - -I/usr/include/libxml2 +INCS += -I/usr/include/libxml2 + +# +# There is no lint library for libxml2, so we need to avoid linking against +# it during lint, as well as turning off the warnings lint would generate. +# +LDLIBS += -lzfs_jni +all install := LDLIBS += -lxml2 +LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2 -LDLIBS += -lzfs_jni -lxml2 CPPFLAGS += $(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT .KEEP_STATE: -.PARALLEL: - all: $(PROG) -$(PROG): $(OBJS) - $(LINK.c) -o $@ $(OBJS) $(LDLIBS) - $(POST_PROCESS) - -%.o: %.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - install: all $(ROOTCMD) clean: - $(RM) $(OBJS) -FRC: +lint: lint_PROG include ../Makefile.targ diff --git a/usr/src/cmd/availdevs/availdevs.c b/usr/src/cmd/availdevs/availdevs.c index e11f449b2e..f17e475b2d 100644 --- a/usr/src/cmd/availdevs/availdevs.c +++ b/usr/src/cmd/availdevs/availdevs.c @@ -63,7 +63,7 @@ add_disk_to_xml(dmgt_disk_t *dp, void *data) available, NULL, (xmlChar *)ELEMENT_DISK, NULL); xmlSetProp(disk, (xmlChar *)ATTR_DISK_NAME, (xmlChar *)dp->name); - snprintf(tmp, sizeof (tmp), "%llu", dp->size); + (void) snprintf(tmp, sizeof (tmp), "%llu", dp->size); xmlSetProp(disk, (xmlChar *)ATTR_DISK_SIZE, (xmlChar *)tmp); if (dp->aliases != NULL) { @@ -84,11 +84,11 @@ add_disk_to_xml(dmgt_disk_t *dp, void *data) xmlSetProp(slice, (xmlChar *)ATTR_SLICE_NAME, (xmlChar *)sp->name); - snprintf(tmp, sizeof (tmp), "%llu", sp->size); + (void) snprintf(tmp, sizeof (tmp), "%llu", sp->size); xmlSetProp(slice, (xmlChar *)ATTR_SLICE_SIZE, (xmlChar *)tmp); - snprintf(tmp, sizeof (tmp), "%llu", sp->start); + (void) snprintf(tmp, sizeof (tmp), "%llu", sp->start); xmlSetProp(slice, (xmlChar *)ATTR_SLICE_START, (xmlChar *)tmp); @@ -127,7 +127,7 @@ add_pool_to_xml(char *name, uint64_t guid, xmlSetProp(pool, (xmlChar *)ATTR_POOL_STATE, (xmlChar *)state); xmlSetProp(pool, (xmlChar *)ATTR_POOL_HEALTH, (xmlChar *)health); - snprintf(tmp, sizeof (tmp), "%llu", guid); + (void) snprintf(tmp, sizeof (tmp), "%llu", guid); xmlSetProp(pool, (xmlChar *)ATTR_POOL_ID, (xmlChar *)tmp); return (0); diff --git a/usr/src/cmd/mdb/common/modules/zfs/zfs.c b/usr/src/cmd/mdb/common/modules/zfs/zfs.c index d34f71f5df..27b0630c72 100644 --- a/usr/src/cmd/mdb/common/modules/zfs/zfs.c +++ b/usr/src/cmd/mdb/common/modules/zfs/zfs.c @@ -1374,6 +1374,14 @@ spa_vdevs(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) return (DCMD_ERR); } + /* + * Unitialized spa_t structures can have a NULL root vdev. + */ + if (spa.spa_root_vdev == NULL) { + mdb_printf("no associated vdevs\n"); + return (DCMD_OK); + } + v.a_type = MDB_TYPE_STRING; v.a_un.a_str = errors ? "-re" : "-r"; diff --git a/usr/src/cmd/zpool/Makefile b/usr/src/cmd/zpool/Makefile index 818c7b7fe8..174fe73722 100644 --- a/usr/src/cmd/zpool/Makefile +++ b/usr/src/cmd/zpool/Makefile @@ -29,8 +29,7 @@ PROG= zpool OBJS= zpool_main.o zpool_vdev.o zpool_iter.o zpool_util.o zpool_dataset.o SRCS= $(OBJS:%.o=%.c) -POFILES= zpool_main.po zpool_vdev.po zpool_iter.po zpool_util.po \ - zpool_dataset.po +POFILES=$(OBJS:%.o=%.po) POFILE= zpool.po include ../Makefile.cmd @@ -43,28 +42,21 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2 -CACHEDIR= $(ROOTETC)/zfs - ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%) .KEEP_STATE: -.PARALLEL: - all: $(PROG) $(PROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTSBINPROG) $(CACHEDIR) $(ROOTUSRSBINLINKS) - -$(CACHEDIR): - $(INS.dir) +install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(POFILE): $(POFILES) $(RM) $@ - cat $(POFILES) > $@ + $(CAT) $(POFILES) > $@ clean: $(RM) $(OBJS) @@ -75,6 +67,4 @@ lint: lint_SRCS $(ROOTUSRSBINLINKS): -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@ -FRC: - include ../Makefile.targ diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c index 72eb0165d5..7be0e0a0ad 100644 --- a/usr/src/cmd/zpool/zpool_main.c +++ b/usr/src/cmd/zpool/zpool_main.c @@ -337,7 +337,7 @@ zpool_do_add(int argc, char **argv) if ((zhp = zpool_open(poolname)) == NULL) return (1); - if ((config = zpool_get_config(zhp)) == NULL) { + if ((config = zpool_get_config(zhp, NULL)) == NULL) { (void) fprintf(stderr, gettext("pool '%s' is unavailable\n"), poolname); zpool_close(zhp); @@ -1254,6 +1254,20 @@ print_vdev_stats(const char *name, nvlist_t *oldnv, nvlist_t *newnv, oldnv ? oldchild[c] : NULL, newchild[c], cb, depth + 2); } +static int +refresh_iostat(zpool_handle_t *zhp, void *data) +{ + iostat_cbdata_t *cb = data; + + /* + * If the pool has disappeared, remove it from the list and continue. + */ + if (zpool_refresh_stats(zhp) != 0) + pool_list_remove(cb->cb_list, zhp); + + return (0); +} + /* * Callback to print out the iostats for the given pool. */ @@ -1263,33 +1277,20 @@ print_iostat(zpool_handle_t *zhp, void *data) iostat_cbdata_t *cb = data; nvlist_t *oldconfig, *newconfig; nvlist_t *oldnvroot, *newnvroot; - uint64_t oldtxg, newtxg; - if (zpool_refresh_stats(zhp, &oldconfig, &newconfig) != 0) { - /* - * This pool has disappeared, so remove it - * from the list and continue. - */ - pool_list_remove(cb->cb_list, zhp); - return (0); - } + newconfig = zpool_get_config(zhp, &oldconfig); - if (cb->cb_iteration == 1) { - if (oldconfig != NULL) - nvlist_free(oldconfig); + if (cb->cb_iteration == 1) oldconfig = NULL; - } - verify(nvlist_lookup_uint64(newconfig, ZPOOL_CONFIG_POOL_TXG, - &newtxg) == 0); verify(nvlist_lookup_nvlist(newconfig, ZPOOL_CONFIG_VDEV_TREE, &newnvroot) == 0); - if (oldconfig == NULL || - nvlist_lookup_uint64(oldconfig, ZPOOL_CONFIG_POOL_TXG, &oldtxg) || - oldtxg != newtxg || - nvlist_lookup_nvlist(oldconfig, ZPOOL_CONFIG_VDEV_TREE, &oldnvroot)) + if (oldconfig == NULL) oldnvroot = NULL; + else + verify(nvlist_lookup_nvlist(oldconfig, ZPOOL_CONFIG_VDEV_TREE, + &oldnvroot) == 0); /* * Print out the statistics for the pool. @@ -1299,9 +1300,6 @@ print_iostat(zpool_handle_t *zhp, void *data) if (cb->cb_verbose) print_iostat_separator(cb); - if (oldconfig != NULL) - nvlist_free(oldconfig); - return (0); } @@ -1311,7 +1309,7 @@ get_namewidth(zpool_handle_t *zhp, void *data) iostat_cbdata_t *cb = data; nvlist_t *config, *nvroot; - if ((config = zpool_get_config(zhp)) != NULL) { + if ((config = zpool_get_config(zhp, NULL)) != NULL) { verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); if (!cb->cb_verbose) @@ -1457,6 +1455,13 @@ zpool_do_iostat(int argc, char **argv) break; /* + * Refresh all statistics. This is done as an explicit step + * before calculating the maximum name width, so that any + * configuration changes are properly accounted for. + */ + (void) pool_list_iter(list, FALSE, refresh_iostat, &cb); + + /* * Iterate over all pools to determine the maximum width * for the pool / device name column across all pools. */ @@ -1549,7 +1554,7 @@ list_callback(zpool_handle_t *zhp, void *data) if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { config = NULL; } else { - config = zpool_get_config(zhp); + config = zpool_get_config(zhp, NULL); total = zpool_get_space_total(zhp); used = zpool_get_space_used(zhp); } @@ -1813,7 +1818,7 @@ zpool_do_attach_or_replace(int argc, char **argv, int replacing) if ((zhp = zpool_open(poolname)) == NULL) return (1); - if ((config = zpool_get_config(zhp)) == NULL) { + if ((config = zpool_get_config(zhp, NULL)) == NULL) { (void) fprintf(stderr, gettext("pool '%s' is unavailable\n"), poolname); zpool_close(zhp); @@ -2223,7 +2228,7 @@ status_callback(zpool_handle_t *zhp, void *data) int reason; char *health; - config = zpool_get_config(zhp); + config = zpool_get_config(zhp, NULL); reason = zpool_get_status(zhp, &msgid); cbp->cb_count++; diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index 4ae89dfeaa..fc0ae46d34 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -331,6 +331,7 @@ HDRSUBDIRS= libaio \ libwrap \ libxcurses2 \ libzfs \ + libzfs_jni \ libzoneinfo \ lvm \ openssl \ diff --git a/usr/src/lib/libsec/Makefile b/usr/src/lib/libsec/Makefile index 2a61f47756..fc15cb667b 100644 --- a/usr/src/lib/libsec/Makefile +++ b/usr/src/lib/libsec/Makefile @@ -51,8 +51,6 @@ $(POFILE): pofile_MSGFILES lint: $(SUBDIRS) -# install rule for install_h target - install_h: $(ROOTHDRS) check: $(CHECKHDRS) diff --git a/usr/src/lib/libsec/Makefile.com b/usr/src/lib/libsec/Makefile.com index 0cf7541cd0..531db17548 100644 --- a/usr/src/lib/libsec/Makefile.com +++ b/usr/src/lib/libsec/Makefile.com @@ -42,7 +42,6 @@ LIBS = $(DYNLIB) $(LINTLIB) CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRCDIR) -I../../../common/acl -DYNFLAGS += $(MAPOPTS) LDLIBS += -lc # install this library in the root filesystem diff --git a/usr/src/lib/libzfs/common/libzfs.h b/usr/src/lib/libzfs/common/libzfs.h index dc6681e1cb..71e4328276 100644 --- a/usr/src/lib/libzfs/common/libzfs.h +++ b/usr/src/lib/libzfs/common/libzfs.h @@ -129,9 +129,8 @@ extern zpool_status_t zpool_import_status(nvlist_t *, char **msgid); /* * Statistics and configuration functions. */ -extern nvlist_t *zpool_get_config(zpool_handle_t *); -extern int zpool_refresh_stats(zpool_handle_t *, - nvlist_t **oldconfig, nvlist_t **newconfig); +extern nvlist_t *zpool_get_config(zpool_handle_t *, nvlist_t **oldconfig); +extern int zpool_refresh_stats(zpool_handle_t *); /* * Import and export functions diff --git a/usr/src/lib/libzfs/common/libzfs_config.c b/usr/src/lib/libzfs/common/libzfs_config.c index 4c5a22a459..73f090dc98 100644 --- a/usr/src/lib/libzfs/common/libzfs_config.c +++ b/usr/src/lib/libzfs/common/libzfs_config.c @@ -184,8 +184,10 @@ namespace_reload() * describing the vdevs, as well as the statistics associated with each one. */ nvlist_t * -zpool_get_config(zpool_handle_t *zhp) +zpool_get_config(zpool_handle_t *zhp, nvlist_t **oldconfig) { + if (oldconfig) + *oldconfig = zhp->zpool_old_config; return (zhp->zpool_config); } @@ -196,11 +198,11 @@ zpool_get_config(zpool_handle_t *zhp) * been destroyed. */ int -zpool_refresh_stats(zpool_handle_t *zhp, nvlist_t **oldconfig, - nvlist_t **newconfig) +zpool_refresh_stats(zpool_handle_t *zhp) { zfs_cmd_t zc = { 0 }; int error; + nvlist_t *config; (void) strcpy(zc.zc_name, zhp->zpool_name); @@ -240,19 +242,33 @@ zpool_refresh_stats(zpool_handle_t *zhp, nvlist_t **oldconfig, } verify(nvlist_unpack((void *)(uintptr_t)zc.zc_config_dst, - zc.zc_config_dst_size, newconfig, 0) == 0); + zc.zc_config_dst_size, &config, 0) == 0); zhp->zpool_config_size = zc.zc_config_dst_size; free((void *)(uintptr_t)zc.zc_config_dst); - set_pool_health(*newconfig); + set_pool_health(config); - if (oldconfig != NULL) - *oldconfig = zhp->zpool_config; - else - nvlist_free(zhp->zpool_config); + if (zhp->zpool_config != NULL) { + uint64_t oldtxg, newtxg; + + verify(nvlist_lookup_uint64(zhp->zpool_config, + ZPOOL_CONFIG_POOL_TXG, &oldtxg) == 0); + verify(nvlist_lookup_uint64(config, + ZPOOL_CONFIG_POOL_TXG, &newtxg) == 0); + + if (zhp->zpool_old_config != NULL) + nvlist_free(zhp->zpool_old_config); + + if (oldtxg != newtxg) { + nvlist_free(zhp->zpool_config); + zhp->zpool_old_config = NULL; + } else { + zhp->zpool_old_config = zhp->zpool_config; + } + } - zhp->zpool_config = *newconfig; + zhp->zpool_config = config; return (error); } diff --git a/usr/src/lib/libzfs/common/libzfs_impl.h b/usr/src/lib/libzfs/common/libzfs_impl.h index 3fdd98c997..c9e51de33b 100644 --- a/usr/src/lib/libzfs/common/libzfs_impl.h +++ b/usr/src/lib/libzfs/common/libzfs_impl.h @@ -56,6 +56,7 @@ struct zpool_handle { int zpool_state; size_t zpool_config_size; nvlist_t *zpool_config; + nvlist_t *zpool_old_config; }; void zfs_error(const char *, ...); diff --git a/usr/src/lib/libzfs/common/libzfs_import.c b/usr/src/lib/libzfs/common/libzfs_import.c index c71bc437f5..b7eb81873d 100644 --- a/usr/src/lib/libzfs/common/libzfs_import.c +++ b/usr/src/lib/libzfs/common/libzfs_import.c @@ -720,7 +720,8 @@ zpool_in_use(int fd, char **statestr, char **namestr) * it's not in use. */ if ((zhp = zpool_open_canfail(name)) != NULL && - (pool_config = zpool_get_config(zhp)) != NULL) { + (pool_config = zpool_get_config(zhp, NULL)) + != NULL) { nvlist_t *nvroot; verify(nvlist_lookup_nvlist(pool_config, diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c index 6b6f381bb1..c517d43115 100644 --- a/usr/src/lib/libzfs/common/libzfs_pool.c +++ b/usr/src/lib/libzfs/common/libzfs_pool.c @@ -139,7 +139,6 @@ zpool_handle_t * zpool_open_canfail(const char *pool) { zpool_handle_t *zhp; - nvlist_t *newconfig; int error; /* @@ -155,7 +154,7 @@ zpool_open_canfail(const char *pool) (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); - if ((error = zpool_refresh_stats(zhp, NULL, &newconfig)) != 0) { + if ((error = zpool_refresh_stats(zhp)) != 0) { if (error == ENOENT || error == EINVAL) { zfs_error(dgettext(TEXT_DOMAIN, "cannot open '%s': no " "such pool"), pool); @@ -179,14 +178,13 @@ zpool_handle_t * zpool_open_silent(const char *pool) { zpool_handle_t *zhp; - nvlist_t *newconfig; int error; zhp = zfs_malloc(sizeof (zpool_handle_t)); (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); - if ((error = zpool_refresh_stats(zhp, NULL, &newconfig)) != 0) { + if ((error = zpool_refresh_stats(zhp)) != 0) { if (error == ENOENT || error == EINVAL) { free(zhp); return (NULL); @@ -232,6 +230,8 @@ zpool_close(zpool_handle_t *zhp) { if (zhp->zpool_config) nvlist_free(zhp->zpool_config); + if (zhp->zpool_old_config) + nvlist_free(zhp->zpool_old_config); free(zhp); } diff --git a/usr/src/lib/libzfs_jni/Makefile b/usr/src/lib/libzfs_jni/Makefile index 2e46af841e..d062bd767f 100644 --- a/usr/src/lib/libzfs_jni/Makefile +++ b/usr/src/lib/libzfs_jni/Makefile @@ -30,6 +30,7 @@ include ../Makefile.lib HDRS= libzfs_jni_dataset.h \ libzfs_jni_disk.h \ libzfs_jni_diskmgt.h \ + libzfs_jni_ipool.h \ libzfs_jni_main.h \ libzfs_jni_pool.h \ libzfs_jni_property.h \ @@ -46,28 +47,19 @@ clobber := TARGET= clobber install := TARGET= install lint := TARGET= lint -MSGFILES = - -POFILE = - .KEEP_STATE: all clean clobber install: spec .WAIT $(SUBDIRS) -$(POFILE): pofile_MSGFILES - lint: $(SUBDIRS) install_h: $(ROOTHDRS) check: $(CHECKHDRS) -_msg: $(MSGDOMAINPOFILE) - $(SUBDIRS) spec: FRC @cd $@; pwd; $(MAKE) $(TARGET) FRC: include ../Makefile.targ -include ../../Makefile.msg.targ diff --git a/usr/src/lib/libzfs_jni/Makefile.com b/usr/src/lib/libzfs_jni/Makefile.com index b9282caa84..0f6c0ff9d1 100644 --- a/usr/src/lib/libzfs_jni/Makefile.com +++ b/usr/src/lib/libzfs_jni/Makefile.com @@ -28,28 +28,24 @@ LIBRARY= libzfs_jni.a VERS= .1 -OBJS_COMMON= libzfs_jni_dataset.o \ +OBJECTS= libzfs_jni_dataset.o \ libzfs_jni_disk.o \ libzfs_jni_diskmgt.o \ libzfs_jni_main.o \ libzfs_jni_pool.o \ libzfs_jni_property.o \ libzfs_jni_util.o -OBJECTS= $(OBJS_COMMON) include ../../Makefile.lib LIBS= $(DYNLIB) $(LINTLIB) -INCS += -I$(SRCDIR) \ - -I../../../common/zfsj \ - -I$(JAVA_ROOT)/include \ +INCS += -I$(JAVA_ROOT)/include \ -I$(JAVA_ROOT)/include/solaris LDLIBS += -lc -lnvpair -ldiskmgt -lzfs CPPFLAGS += $(INCS) -SRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c) $(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC) SRCDIR= ../common @@ -62,8 +58,4 @@ all: $(LIBS) lint: lintcheck -pics/%.o: ../../../common/zfsj/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - include ../../Makefile.targ diff --git a/usr/src/lib/libzfs_jni/common/libzfs_jni_pool.c b/usr/src/lib/libzfs_jni/common/libzfs_jni_pool.c index 89638d3c8c..4bbf428595 100644 --- a/usr/src/lib/libzfs_jni/common/libzfs_jni_pool.c +++ b/usr/src/lib/libzfs_jni/common/libzfs_jni_pool.c @@ -540,7 +540,7 @@ zjni_get_root_vdev(zpool_handle_t *zhp) nvlist_t *root = NULL; if (zhp != NULL) { - nvlist_t *attrs = zpool_get_config(zhp); + nvlist_t *attrs = zpool_get_config(zhp, NULL); if (attrs != NULL) { int result = nvlist_lookup_nvlist( diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com index c39f5f08ed..44a1b55287 100644 --- a/usr/src/lib/libzpool/Makefile.com +++ b/usr/src/lib/libzpool/Makefile.com @@ -28,6 +28,7 @@ LIBRARY= libzpool.a VERS= .1 +# include the list of ZFS sources include ../../../uts/common/Makefile.files KERNEL_OBJS = kernel.o taskq.o util.o LIST_OBJS = list.o @@ -38,11 +39,11 @@ OBJECTS=$(ZFS_COMMON_OBJS) $(ZFS_SHARED_OBJS) $(KERNEL_OBJS) $(LIST_OBJS) include ../../Makefile.lib ZFS_COMMON_SRCS= $(ZFS_COMMON_OBJS:%.o=../../../uts/common/fs/zfs/%.c) -SHARED_SRCS= $(ZFS_SHARED_OBJS:%.o=../../../common/zfs/%.c) +ZFS_SHARED_SRCS= $(ZFS_SHARED_OBJS:%.o=../../../common/zfs/%.c) KERNEL_SRCS= $(KERNEL_OBJS:%.o=../common/%.c) LIST_SRCS= $(LIST_OBJS:%.o=../../../uts/common/os/%.c) -SRCS=$(ZFS_COMMON_SRCS) $(KERNEL_SRCS) $(LIST_SRCS) +SRCS=$(ZFS_COMMON_SRCS) $(ZFS_SHARED_SRCS) $(KERNEL_SRCS) $(LIST_SRCS) SRCDIR= ../common LIBS += $(LINTLIB) @@ -69,15 +70,14 @@ lint: $(LINTLIB) include ../../Makefile.targ -objs/%.o pics/%.o: ../../../uts/common/fs/zfs/%.c +pics/%.o: ../../../uts/common/fs/zfs/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -objs/%.o pics/%.o: ../../../common/zfs/%.c +pics/%.o: ../../../common/zfs/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -objs/%.o pics/%.o: ../../../uts/common/os/%.c +pics/%.o: ../../../uts/common/os/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) - diff --git a/usr/src/pkgdefs/etc/exception_list_i386 b/usr/src/pkgdefs/etc/exception_list_i386 index b1e20e48ad..b9c59eb0e9 100644 --- a/usr/src/pkgdefs/etc/exception_list_i386 +++ b/usr/src/pkgdefs/etc/exception_list_i386 @@ -748,6 +748,17 @@ usr/lib/llib-lzpool.ln i386 usr/lib/amd64/llib-lzfs.ln i386 usr/lib/amd64/llib-lzfs_jni.ln i386 usr/lib/amd64/llib-lzpool.ln i386 +# +# ZFS JNI headers +# +usr/include/libzfs_jni_dataset.h i386 +usr/include/libzfs_jni_disk.h i386 +usr/include/libzfs_jni_diskmgt.h i386 +usr/include/libzfs_jni_ipool.h i386 +usr/include/libzfs_jni_main.h i386 +usr/include/libzfs_jni_pool.h i386 +usr/include/libzfs_jni_property.h i386 +usr/include/libzfs_jni_util.h i386 # # These files are installed in the proto area for Solaris scsi_vhci driver diff --git a/usr/src/pkgdefs/etc/exception_list_sparc b/usr/src/pkgdefs/etc/exception_list_sparc index 02e1ae373d..89c6c4299c 100644 --- a/usr/src/pkgdefs/etc/exception_list_sparc +++ b/usr/src/pkgdefs/etc/exception_list_sparc @@ -814,6 +814,17 @@ usr/lib/llib-lzpool sparc usr/lib/sparcv9/llib-lzfs.ln sparc usr/lib/sparcv9/llib-lzfs_jni.ln sparc usr/lib/sparcv9/llib-lzpool.ln sparc +# +# ZFS JNI headers +# +usr/include/libzfs_jni_dataset.h sparc +usr/include/libzfs_jni_disk.h sparc +usr/include/libzfs_jni_diskmgt.h sparc +usr/include/libzfs_jni_ipool.h sparc +usr/include/libzfs_jni_main.h sparc +usr/include/libzfs_jni_pool.h sparc +usr/include/libzfs_jni_property.h sparc +usr/include/libzfs_jni_util.h sparc # # These files are installed in the proto area for Solaris scsi_vhci driver |
