diff options
| author | John Sonnenschein <johns@joyent.com> | 2011-12-15 22:43:18 +0000 |
|---|---|---|
| committer | John Sonnenschein <johns@joyent.com> | 2011-12-15 22:43:18 +0000 |
| commit | c4aa323138d7633d35c7cbf4123aa100970a91f9 (patch) | |
| tree | 596fe3d0c3374835bf0e2e1d31e3ea8f3659422a /usr/src/lib | |
| parent | 73c531dd5303a633bcaaf609c6eeb2554096b478 (diff) | |
| parent | f9b22ee9e48b04a9ef01426e92a13c5b164c0763 (diff) | |
| download | illumos-joyent-c4aa323138d7633d35c7cbf4123aa100970a91f9.tar.gz | |
Merge branch 'master' into gcc4
Diffstat (limited to 'usr/src/lib')
| -rw-r--r-- | usr/src/lib/brand/joyent/zone/statechange.ksh | 8 | ||||
| -rwxr-xr-x | usr/src/lib/brand/kvm/zone/statechange.ksh | 8 | ||||
| -rw-r--r-- | usr/src/lib/libdladm/common/libdladm.c | 10 | ||||
| -rw-r--r-- | usr/src/lib/libiscsit/common/libiscsit.c | 7 | ||||
| -rw-r--r-- | usr/src/lib/libiscsit/common/libiscsit.h | 10 | ||||
| -rw-r--r-- | usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_cache.c | 4 |
6 files changed, 38 insertions, 9 deletions
diff --git a/usr/src/lib/brand/joyent/zone/statechange.ksh b/usr/src/lib/brand/joyent/zone/statechange.ksh index 7d7d0213a4..ba4df02b99 100644 --- a/usr/src/lib/brand/joyent/zone/statechange.ksh +++ b/usr/src/lib/brand/joyent/zone/statechange.ksh @@ -142,6 +142,14 @@ setup_net() orig_global=$global_nic global_nic=$(eval echo \$SYSINFO_NIC_${orig_global}) + # If the global nic is specified as a device or etherstub name + # rather than a tag + if [[ -z $global_nic ]]; then + echo "$(dladm show-phys -p -o LINK) $(dladm show-etherstub -p -o LINK)" \ + | egrep "(^| )${orig_global}( |$)" > /dev/null + (( $? == 0 )) && global_nic=${orig_global} + fi + # For backwards compatibility with the other parts of the # system, check if this zone already has this vnic setup. # If so, move on to the next vnic. diff --git a/usr/src/lib/brand/kvm/zone/statechange.ksh b/usr/src/lib/brand/kvm/zone/statechange.ksh index 6efe6f3cb5..7c08ce6ea9 100755 --- a/usr/src/lib/brand/kvm/zone/statechange.ksh +++ b/usr/src/lib/brand/kvm/zone/statechange.ksh @@ -115,6 +115,14 @@ setup_net() orig_global=$global_nic global_nic=$(eval echo \$SYSINFO_NIC_${orig_global}) + # If the global nic is specified as a device or etherstub name + # rather than a tag + if [[ -z $global_nic ]]; then + echo "$(dladm show-phys -p -o LINK) $(dladm show-etherstub -p -o LINK)" \ + | egrep "(^| )${orig_global}( |$)" > /dev/null + (( $? == 0 )) && global_nic=${orig_global} + fi + # For backwards compatibility with the other parts of the # system, check if this zone already has this vnic setup. # If so, move on to the next vnic. diff --git a/usr/src/lib/libdladm/common/libdladm.c b/usr/src/lib/libdladm/common/libdladm.c index 7ecb54ab54..e0150d6529 100644 --- a/usr/src/lib/libdladm/common/libdladm.c +++ b/usr/src/lib/libdladm/common/libdladm.c @@ -535,10 +535,10 @@ dladm_str2bw(char *oarg, uint64_t *bw) } /* - * Convert bandwidth in bps to a string in mpbs. For values greater - * than 1mbps or 1000000, print a whole mbps value. For values that - * have fractional Mbps in whole Kbps , print the bandwidth in a manner - * simlilar to a floating point format. + * Convert bandwidth in bps to a string in Mbps. For values greater + * than 1Mbps or 1000000, print a whole Mbps value. For values that + * have fractional Mbps in whole Kbps, print the bandwidth in a manner + * similar to a floating point format. * * bps string * 0 0 @@ -1069,7 +1069,7 @@ fail: /* * Convert an array of strings (which can be ranges or individual * elements) into a single mac_propval_range_t structure which - * allocated here but should be freed by the caller. + * is allocated here but should be freed by the caller. */ dladm_status_t dladm_strs2range(char **prop_val, uint_t val_cnt, diff --git a/usr/src/lib/libiscsit/common/libiscsit.c b/usr/src/lib/libiscsit/common/libiscsit.c index 9530419701..c45b9b1c1d 100644 --- a/usr/src/lib/libiscsit/common/libiscsit.c +++ b/usr/src/lib/libiscsit/common/libiscsit.c @@ -21,6 +21,9 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #include <sys/types.h> #include <sys/stat.h> @@ -1846,10 +1849,10 @@ it_iqn_generate(char *iqn_buf, int iqn_buf_len, char *opt_iqn_suffix) uuid_unparse(id, id_str); if (opt_iqn_suffix) { - ret = snprintf(iqn_buf, iqn_buf_len, "iqn.1986-03.com.sun:" + ret = snprintf(iqn_buf, iqn_buf_len, DEFAULT_IQN "%02d:%s.%s", TARGET_NAME_VERS, id_str, opt_iqn_suffix); } else { - ret = snprintf(iqn_buf, iqn_buf_len, "iqn.1986-03.com.sun:" + ret = snprintf(iqn_buf, iqn_buf_len, DEFAULT_IQN "%02d:%s", TARGET_NAME_VERS, id_str); } diff --git a/usr/src/lib/libiscsit/common/libiscsit.h b/usr/src/lib/libiscsit/common/libiscsit.h index 861529e86f..704c790edc 100644 --- a/usr/src/lib/libiscsit/common/libiscsit.h +++ b/usr/src/lib/libiscsit/common/libiscsit.h @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #ifndef _LIBISCSIT_H #define _LIBISCSIT_H @@ -45,6 +48,13 @@ extern "C" { #define IS_EUI_NAME(s) (strncmp((s), "eui.", 4) == 0) /* + * We change the default IQN here to org.illumos. + * Other distros using it need to change accordingly. + */ + +#define DEFAULT_IQN "iqn.2010-08.org.illumos:" + +/* * Object Hierarchy * * _______________________ diff --git a/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_cache.c b/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_cache.c index 706ca9e61e..b938851c78 100644 --- a/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_cache.c +++ b/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_cache.c @@ -420,8 +420,8 @@ smb_netbios_cache_status(unsigned char *buf, int bufsize, unsigned char *scope) (strcasecmp((char *)scope, (char *)name->scope) == 0)) { bcopy(name->name, scan, NETBIOS_NAME_SZ); scan += NETBIOS_NAME_SZ; - *scan++ = (uint8_t)(PUBLIC_BITS(name->attributes) >> 8); - *scan++ = (uint8_t)PUBLIC_BITS(name->attributes); + *scan++ = (PUBLIC_BITS(name->attributes) >> 8) & 0xff; + *scan++ = PUBLIC_BITS(name->attributes) & 0xff; (*numnames)++; } |
