summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2017-06-20 11:50:48 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2017-06-20 11:50:48 +0000
commit184c8efbadff7177bbb6dc1ba6b13cd9ba3c934a (patch)
treef84d92190989d1ce4359999dbc792566791892ad /usr/src/lib
parent2f7409fa41fda5d823048e31a9426049cf1fc51a (diff)
parent192a5ca9fe8b81784c9921860f876735fc9a1e3e (diff)
downloadillumos-joyent-184c8efbadff7177bbb6dc1ba6b13cd9ba3c934a.tar.gz
[illumos-gate merge]
commit 192a5ca9fe8b81784c9921860f876735fc9a1e3e 8371 remove warlock files in usr/src/uts commit cabd62a218e426e3dea29d3051d184458cdddbdf 8393 bnxe: left shift of negative value and bad macro commit a17ce84520dc4e972c913e0fa1d1545ddd22b55e 8392 Do not cast the return value of xdr_free() commit 5c25b6f10367f6cb7b3d8b8bc7e374712eb977c2 8367 remove warlock leftovers from usr/src/uts Makefiles commit eb28af623974cfc31cb4545d2965bbaca3fb6888 8329 ldapcachemgr: misleading-indentation 8364 ldapcachemgr does not set log file in debug mode if -l was not used commit 0d56f5df8a4bc5dd756cf0ea58ab3e0519c76032 8223 libshell: misleading-indentation commit 7bdb5b9a077c9ce26caedc489a6a5ee9e45214ed 7876 libast: misleading-indentation errors commit f15a6fde3c0a52aca95943ffd637d7b8220e2261 8379 illumos-gate 'install' make target is too eager building things 8360 ipdadm missing 'all' target 8359 libzpool Makefiles are slightly broken commit 99d29265ec47e10c7ec8c18a67fc83e7dd5ce4f8 8397 sysevent.h: C++11 requires a space between literal and string macro commit 02dc24bdf7a983da73ebfd10cc3b5627a74789c5 8410 ucoreadm links against libraries outside the proto area commit 00bdf9afcd6a60aceb896a5b75ac0a061981ee94 8394 fcoet: array subscript is above array bounds commit 24a150c1bcca7eba0f2d518d0f41645eb55f6066 8398 pcmcia: sizeof on array function parameter Conflicts: usr/src/uts/common/sys/sysevent.h
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libast/common/misc/magic.c34
-rw-r--r--usr/src/lib/libast/common/sfio/sfpool.c3
-rw-r--r--usr/src/lib/libast/common/vmalloc/vmbest.c3
-rw-r--r--usr/src/lib/libidmap/common/idmap_api.c48
-rw-r--r--usr/src/lib/libidmap/common/idmap_impl.h8
-rw-r--r--usr/src/lib/libshell/common/sh/nvdisc.c4
-rw-r--r--usr/src/lib/libzpool/Makefile.com3
7 files changed, 53 insertions, 50 deletions
diff --git a/usr/src/lib/libast/common/misc/magic.c b/usr/src/lib/libast/common/misc/magic.c
index f4b3037fc0..9a0345b00d 100644
--- a/usr/src/lib/libast/common/misc/magic.c
+++ b/usr/src/lib/libast/common/misc/magic.c
@@ -1145,24 +1145,24 @@ cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
mp->multi['X']++;
break;
}
- if (!mp->idtab)
- {
- if (mp->idtab = dtnew(mp->vm, &mp->dtdisc, Dthash))
- for (q = 0; q < elementsof(dict); q++)
- dtinsert(mp->idtab, &dict[q]);
- else if (mp->disc->errorf)
- (*mp->disc->errorf)(mp, mp->disc, 3, "out of space");
- q = 0;
- }
- if (mp->idtab)
- {
- *(b - 1) = 0;
- if (ip = (Info_t*)dtmatch(mp->idtab, s))
- mp->identifier[ip->value]++;
- *(b - 1) = c;
- }
- s = 0;
+ if (!mp->idtab)
+ {
+ if (mp->idtab = dtnew(mp->vm, &mp->dtdisc, Dthash))
+ for (q = 0; q < elementsof(dict); q++)
+ dtinsert(mp->idtab, &dict[q]);
+ else if (mp->disc->errorf)
+ (*mp->disc->errorf)(mp, mp->disc, 3, "out of space");
+ q = 0;
+ }
+ if (mp->idtab)
+ {
+ *(b - 1) = 0;
+ if (ip = (Info_t*)dtmatch(mp->idtab, s))
+ mp->identifier[ip->value]++;
+ *(b - 1) = c;
}
+ s = 0;
+ }
switch (c)
{
case '\t':
diff --git a/usr/src/lib/libast/common/sfio/sfpool.c b/usr/src/lib/libast/common/sfio/sfpool.c
index be01693b5d..6167d1738b 100644
--- a/usr/src/lib/libast/common/sfio/sfpool.c
+++ b/usr/src/lib/libast/common/sfio/sfpool.c
@@ -288,7 +288,8 @@ reg int mode;
/* f already in the same pool with pf */
if(f == pf || (pf && f->pool == pf->pool && f->pool != &_Sfpool) )
- { if(f)
+ {
+ if(f)
SFMTXUNLOCK(f);
if(pf)
SFMTXUNLOCK(pf);
diff --git a/usr/src/lib/libast/common/vmalloc/vmbest.c b/usr/src/lib/libast/common/vmalloc/vmbest.c
index a9c622d2ad..76e903d1f4 100644
--- a/usr/src/lib/libast/common/vmalloc/vmbest.c
+++ b/usr/src/lib/libast/common/vmalloc/vmbest.c
@@ -980,7 +980,8 @@ int type; /* !=0 to move, <0 for not copy */
CLRBITS(s);
}
else if(ISJUNK(s) )
- { if(!bestreclaim(vd,np,C_INDEX(s)) )
+ {
+ if(!bestreclaim(vd,np,C_INDEX(s)) )
/**/ASSERT(0); /* oops: did not see np! */
s = SIZE(np); /**/ASSERT(s%ALIGN == 0);
}
diff --git a/usr/src/lib/libidmap/common/idmap_api.c b/usr/src/lib/libidmap/common/idmap_api.c
index ddfefc39c2..54ee78bfe4 100644
--- a/usr/src/lib/libidmap/common/idmap_api.c
+++ b/usr/src/lib/libidmap/common/idmap_api.c
@@ -234,7 +234,7 @@ out:
_IDMAP_RESET_UDT_HANDLE(udthandle);
}
- (void) xdr_free(xdr_idmap_update_res, (caddr_t)&res);
+ xdr_free(xdr_idmap_update_res, (caddr_t)&res);
errno = idmap_stat2errno(retcode);
return (retcode);
}
@@ -414,9 +414,9 @@ idmap_udt_destroy(idmap_udt_handle_t *udthandle)
{
if (udthandle == NULL)
return;
- (void) xdr_free(xdr_idmap_update_batch, (caddr_t)&udthandle->batch);
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->error_rule);
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->conflict_rule);
+ xdr_free(xdr_idmap_update_batch, (caddr_t)&udthandle->batch);
+ xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->error_rule);
+ xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->conflict_rule);
free(udthandle);
}
@@ -461,7 +461,7 @@ idmap_udt_add_namerule(idmap_udt_handle_t *udthandle, const char *windomain,
errout:
/* The batch should still be usable */
if (rule)
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)rule);
+ xdr_free(xdr_idmap_namerule, (caddr_t)rule);
errno = idmap_stat2errno(retcode);
return (retcode);
}
@@ -506,7 +506,7 @@ idmap_udt_rm_namerule(idmap_udt_handle_t *udthandle, boolean_t is_user,
errout:
if (rule)
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)rule);
+ xdr_free(xdr_idmap_namerule, (caddr_t)rule);
errno = idmap_stat2errno(retcode);
return (retcode);
}
@@ -565,9 +565,9 @@ idmap_iter_set_limit(idmap_iter_t *iter, uint64_t limit)
* iter - iterator
*/
idmap_stat
-idmap_iter_namerules(const char *windomain,
- boolean_t is_user, boolean_t is_wuser, const char *winname,
- const char *unixname, idmap_iter_t **iter)
+idmap_iter_namerules(const char *windomain, boolean_t is_user,
+ boolean_t is_wuser, const char *winname, const char *unixname,
+ idmap_iter_t **iter)
{
idmap_iter_t *tmpiter;
@@ -965,7 +965,7 @@ idmap_get_create(idmap_get_handle_t **gh)
*/
idmap_stat
idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, uid_t *uid, idmap_stat *stat)
+ int flag, uid_t *uid, idmap_stat *stat)
{
return (idmap_getext_uidbysid(gh, sidprefix, rid, flag, uid,
NULL, stat));
@@ -989,7 +989,7 @@ idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
idmap_stat
idmap_getext_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, uid_t *uid, idmap_info *info, idmap_stat *stat)
+ int flag, uid_t *uid, idmap_info *info, idmap_stat *stat)
{
idmap_retcode retcode;
idmap_mapping *mapping = NULL;
@@ -1059,7 +1059,7 @@ errout:
*/
idmap_stat
idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, gid_t *gid, idmap_stat *stat)
+ int flag, gid_t *gid, idmap_stat *stat)
{
return (idmap_getext_gidbysid(gh, sidprefix, rid, flag, gid,
NULL, stat));
@@ -1083,7 +1083,7 @@ idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
*/
idmap_stat
idmap_getext_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, gid_t *gid, idmap_info *info, idmap_stat *stat)
+ int flag, gid_t *gid, idmap_info *info, idmap_stat *stat)
{
idmap_retcode retcode;
@@ -1156,7 +1156,7 @@ errout:
*/
idmap_stat
idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, uid_t *pid, int *is_user, idmap_stat *stat)
+ int flag, uid_t *pid, int *is_user, idmap_stat *stat)
{
return (idmap_getext_pidbysid(gh, sidprefix, rid, flag, pid, is_user,
NULL, stat));
@@ -1183,7 +1183,7 @@ idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
*/
idmap_stat
idmap_getext_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
- int flag, uid_t *pid, int *is_user, idmap_info *info, idmap_stat *stat)
+ int flag, uid_t *pid, int *is_user, idmap_info *info, idmap_stat *stat)
{
idmap_retcode retcode;
idmap_mapping *mapping = NULL;
@@ -1255,7 +1255,7 @@ errout:
*/
idmap_stat
idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag,
- char **sidprefix, idmap_rid_t *rid, idmap_stat *stat)
+ char **sidprefix, idmap_rid_t *rid, idmap_stat *stat)
{
return (idmap_getext_sidbyuid(gh, uid, flag, sidprefix, rid,
NULL, stat));
@@ -1279,7 +1279,7 @@ idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag,
*/
idmap_stat
idmap_getext_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag,
- char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat)
+ char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat)
{
idmap_retcode retcode;
@@ -1346,7 +1346,7 @@ errout:
*/
idmap_stat
idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag,
- char **sidprefix, idmap_rid_t *rid, idmap_stat *stat)
+ char **sidprefix, idmap_rid_t *rid, idmap_stat *stat)
{
return (idmap_getext_sidbygid(gh, gid, flag, sidprefix, rid,
NULL, stat));
@@ -1370,7 +1370,7 @@ idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag,
*/
idmap_stat
idmap_getext_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag,
- char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat)
+ char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat)
{
idmap_retcode retcode;
@@ -1569,7 +1569,7 @@ idmap_get_mappings(idmap_get_handle_t *gh)
out:
_IDMAP_RESET_GET_HANDLE(gh);
- (void) xdr_free(xdr_idmap_ids_res, (caddr_t)&res);
+ xdr_free(xdr_idmap_ids_res, (caddr_t)&res);
errno = idmap_stat2errno(retcode);
return (retcode);
}
@@ -1583,7 +1583,7 @@ idmap_get_destroy(idmap_get_handle_t *gh)
{
if (gh == NULL)
return;
- (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);
+ xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);
if (gh->retlist)
free(gh->retlist);
free(gh);
@@ -2105,7 +2105,7 @@ idmap_how_clear(idmap_how *how)
*/
idmap_stat
idmap_getuidbywinname(const char *name, const char *domain, int flag,
- uid_t *uid)
+ uid_t *uid)
{
idmap_retcode rc;
int is_user = 1;
@@ -2140,7 +2140,7 @@ idmap_getuidbywinname(const char *name, const char *domain, int flag,
*/
idmap_stat
idmap_getgidbywinname(const char *name, const char *domain, int flag,
- gid_t *gid)
+ gid_t *gid)
{
idmap_retcode rc;
int is_user = 0;
@@ -2176,7 +2176,7 @@ idmap_getgidbywinname(const char *name, const char *domain, int flag,
*/
idmap_stat
idmap_getwinnamebypid(uid_t pid, int is_user, int flag, char **name,
- char **domain)
+ char **domain)
{
idmap_retcode rc;
int len;
diff --git a/usr/src/lib/libidmap/common/idmap_impl.h b/usr/src/lib/libidmap/common/idmap_impl.h
index 8dd4a7efb2..bcae8b6d8d 100644
--- a/usr/src/lib/libidmap/common/idmap_impl.h
+++ b/usr/src/lib/libidmap/common/idmap_impl.h
@@ -53,11 +53,11 @@ struct idmap_udt_handle {
};
#define _IDMAP_RESET_UDT_HANDLE(uh) \
- (void) xdr_free(xdr_idmap_update_batch, (caddr_t)&uh->batch);\
+ xdr_free(xdr_idmap_update_batch, (caddr_t)&uh->batch);\
uh->next = 0;\
uh->error_index = -1;\
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)&uh->error_rule);\
- (void) xdr_free(xdr_idmap_namerule, (caddr_t)&uh->conflict_rule);
+ xdr_free(xdr_idmap_namerule, (caddr_t)&uh->error_rule);\
+ xdr_free(xdr_idmap_namerule, (caddr_t)&uh->conflict_rule);
typedef struct idmap_get_res {
idmap_id_type idtype;
@@ -78,7 +78,7 @@ struct idmap_get_handle {
};
#define _IDMAP_RESET_GET_HANDLE(gh) \
- (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);\
+ xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);\
if (gh->retlist) \
free(gh->retlist);\
gh->retlist = NULL;\
diff --git a/usr/src/lib/libshell/common/sh/nvdisc.c b/usr/src/lib/libshell/common/sh/nvdisc.c
index 7c8918ef1f..2caaaa5888 100644
--- a/usr/src/lib/libshell/common/sh/nvdisc.c
+++ b/usr/src/lib/libshell/common/sh/nvdisc.c
@@ -915,8 +915,8 @@ int nv_clone(Namval_t *np, Namval_t *mp, int flags)
nv_setsize(mp,nv_size(np));
if(mp->nvflag == flag)
mp->nvflag = (np->nvflag&~(NV_MINIMAL))|(mp->nvflag&NV_MINIMAL);
- if(nv_isattr(np,NV_EXPORT))
- mp->nvflag |= (np->nvflag&NV_MINIMAL);
+ if(nv_isattr(np,NV_EXPORT))
+ mp->nvflag |= (np->nvflag&NV_MINIMAL);
if(mp->nvalue.cp==val && !nv_isattr(np,NV_INTEGER))
{
if(np->nvalue.cp && np->nvalue.cp!=Empty && (flags&NV_COMVAR) && !(flags&NV_MOVE))
diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com
index b016ffaa70..17f24d1a11 100644
--- a/usr/src/lib/libzpool/Makefile.com
+++ b/usr/src/lib/libzpool/Makefile.com
@@ -21,6 +21,7 @@
#
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
+# Copyright 2017 Joyent, Inc.
#
LIBRARY= libzpool.a
@@ -46,7 +47,7 @@ SRCDIR= ../common
# There should be a mapfile here
MAPFILES =
-LIBS += $(LINTLIB)
+LIBS += $(LINTLIB) $(DYNLIB)
INCS += -I../common
INCS += -I../../../uts/common/fs/zfs