diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-08-12 11:51:09 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-08-12 11:51:09 +0000 |
commit | 09f210323354e07890b312da9b4f5e33ae6b6df5 (patch) | |
tree | b1adf04da75c4c474f185ce5f92a18afbaa86106 /usr/src/cmd | |
parent | 1fc24ed72de4ac8eab15db9b0af90b3e9654262b (diff) | |
parent | 0ac8993002ee179cc3289243a0fc956ee0db04da (diff) | |
download | illumos-joyent-release-20200813.tar.gz |
[illumos-gate merge]release-20200813
commit 0ac8993002ee179cc3289243a0fc956ee0db04da
13013 Port OpenZFS zpool label clear improvements
13012 zpool_read_label semantics should match OpenZFS
commit 0904e7ecf266ebe6844dfc4b178441dc8d81296b
12944 remove long obsolete libsys
Diffstat (limited to 'usr/src/cmd')
-rw-r--r-- | usr/src/cmd/fs.d/zfs/fstyp/fstyp.c | 11 | ||||
-rw-r--r-- | usr/src/cmd/sgs/rtld/common/elf.c | 31 | ||||
-rw-r--r-- | usr/src/cmd/sgs/rtld/common/rtld.msg | 1 |
3 files changed, 11 insertions, 32 deletions
diff --git a/usr/src/cmd/fs.d/zfs/fstyp/fstyp.c b/usr/src/cmd/fs.d/zfs/fstyp/fstyp.c index d49d998404..2e7d4d397d 100644 --- a/usr/src/cmd/fs.d/zfs/fstyp/fstyp.c +++ b/usr/src/cmd/fs.d/zfs/fstyp/fstyp.c @@ -31,6 +31,7 @@ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> +#include <sys/debug.h> #include <sys/types.h> #include <unistd.h> #include <libintl.h> @@ -89,11 +90,17 @@ fstyp_mod_ident(fstyp_mod_handle_t handle) char *str; uint64_t u64; char buf[64]; + int num_labels = 0; - if (zpool_read_label(h->fd, &h->config, NULL) != 0) { - return (FSTYP_ERR_NO_MATCH); + if (zpool_read_label(h->fd, &h->config, &num_labels) != 0) { + /* This is the only reason zpool_read_label() can fail */ + VERIFY3S(errno, ==, ENOMEM); + return (FSTYP_ERR_NOMEM); } + if (num_labels == 0) + return (FSTYP_ERR_NO_MATCH); + if (nvlist_lookup_uint64(h->config, ZPOOL_CONFIG_POOL_STATE, &state) != 0 || state == POOL_STATE_DESTROYED) { nvlist_free(h->config); diff --git a/usr/src/cmd/sgs/rtld/common/elf.c b/usr/src/cmd/sgs/rtld/common/elf.c index ff89028c38..c8def82f61 100644 --- a/usr/src/cmd/sgs/rtld/common/elf.c +++ b/usr/src/cmd/sgs/rtld/common/elf.c @@ -126,40 +126,13 @@ elf_get_sec_dirs() } /* - * Redefine NEEDED name if necessary. + * For a.out we have actual work to do here, on ELF we just perform path + * expansion. */ static int elf_fix_name(const char *name, Rt_map *clmp, Alist **alpp, Aliste alni, uint_t orig) { - /* - * For ABI compliance, if we are asked for ld.so.1, then really give - * them libsys.so.1 (the SONAME of libsys.so.1 is ld.so.1). - */ - if (((*name == '/') && - /* BEGIN CSTYLED */ -#if defined(_ELF64) - (strcmp(name, MSG_ORIG(MSG_PTH_RTLD_64)) == 0)) || -#else - (strcmp(name, MSG_ORIG(MSG_PTH_RTLD)) == 0)) || -#endif - (strcmp(name, MSG_ORIG(MSG_FIL_RTLD)) == 0)) { - /* END CSTYLED */ - Pdesc *pdp; - - DBG_CALL(Dbg_file_fixname(LIST(clmp), name, - MSG_ORIG(MSG_PTH_LIBSYS))); - if ((pdp = alist_append(alpp, NULL, sizeof (Pdesc), - alni)) == NULL) - return (0); - - pdp->pd_pname = (char *)MSG_ORIG(MSG_PTH_LIBSYS); - pdp->pd_plen = MSG_PTH_LIBSYS_SIZE; - pdp->pd_flags = PD_FLG_PNSLASH; - - return (1); - } - return (expand_paths(clmp, name, alpp, alni, orig, 0)); } diff --git a/usr/src/cmd/sgs/rtld/common/rtld.msg b/usr/src/cmd/sgs/rtld/common/rtld.msg index add19eaf80..0c0cff9e86 100644 --- a/usr/src/cmd/sgs/rtld/common/rtld.msg +++ b/usr/src/cmd/sgs/rtld/common/rtld.msg @@ -352,7 +352,6 @@ @ MSG_PTH_LDPROF "/usr/lib/link_audit/ldprof.so.1" @ MSG_PTH_LDPROFSE "/usr/lib/secure/ldprof.so.1" -@ MSG_PTH_LIBSYS "/usr/lib/libsys.so.1" @ MSG_PTH_RTLD "/usr/lib/ld.so.1" @ MSG_PTH_LIB "/lib" @ MSG_PTH_USRLIB "/usr/lib" |