summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-06-21 10:25:31 -0400
committerDan McDonald <danmcd@joyent.com>2021-06-21 10:25:31 -0400
commita9b847ec2e204c21561a215d258d6a5ca277a2cf (patch)
tree6f39c1141bce31d57e4fa78198443da22152df19
parent179a42abb379d203e6ff3867a77f8be89e1ac5e9 (diff)
parent247ccfcd15f7f6b949ea71990372f0f9a93058d2 (diff)
downloadillumos-joyent-a9b847ec2e204c21561a215d258d6a5ca277a2cf.tar.gz
[illumos-gate merge]
commit 247ccfcd15f7f6b949ea71990372f0f9a93058d2 13807 diff: variable may be used uninitialized commit 1872d23e4f4f89383cc3d7774072ee4bfbb49e91 13418 picl: removal of unused dependency recommended
-rw-r--r--usr/src/cmd/diff/Makefile7
-rw-r--r--usr/src/cmd/diff/diff.c105
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile4
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile4
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/envmon/Makefile3
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/frudata/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile3
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile3
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile3
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile4
-rw-r--r--usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile2
-rw-r--r--usr/src/cmd/picl/plugins/sun4v/pri/Makefile7
19 files changed, 71 insertions, 90 deletions
diff --git a/usr/src/cmd/diff/Makefile b/usr/src/cmd/diff/Makefile
index a29c75c671..02f8655486 100644
--- a/usr/src/cmd/diff/Makefile
+++ b/usr/src/cmd/diff/Makefile
@@ -31,7 +31,6 @@ LIBDIFFH= diffh
include ../Makefile.cmd
CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += $(CNOWARN_UNINIT)
CERRWARN += -_gcc=-Wno-address
#
@@ -46,7 +45,7 @@ ROOTLIBDIFFH = $(LIBDIFFH:%=$(ROOTLIB)/%)
.KEEP_STATE:
-all: $(PROG)
+all: $(PROG)
#
# Use private rule
@@ -69,8 +68,4 @@ install: all $(ROOTBINDIFF) $(ROOTLIBDIFFH)
clean:
-lint:
- $(LINT.c) diff.c $(LDLIBS)
- $(LINT.c) diffh.c $(LDLIBS)
-
include ../Makefile.targ
diff --git a/usr/src/cmd/diff/diff.c b/usr/src/cmd/diff/diff.c
index 6832eafb8f..5a2ae27492 100644
--- a/usr/src/cmd/diff/diff.c
+++ b/usr/src/cmd/diff/diff.c
@@ -25,7 +25,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
@@ -37,8 +37,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* diff - differential file comparison
*
@@ -324,7 +322,7 @@ main(int argc, char **argv)
/* Not sure how it would get here, but just in case */
(void) fprintf(stderr, "diff: ");
(void) fprintf(stderr,
- gettext("invalid option -%c\n"), flag);
+ gettext("invalid option -%c\n"), flag);
usage();
}
}
@@ -343,8 +341,8 @@ main(int argc, char **argv)
if (hflag) {
if (opt) {
- error(
-gettext("-h doesn't support -e, -f, -n, -c, or -I"));
+ error(gettext(
+ "-h doesn't support -e, -f, -n, -c, or -I"));
} else {
diffargv[0] = "diffh";
(void) execv(diffh, diffargv);
@@ -392,7 +390,7 @@ gettext("-h doesn't support -e, -f, -n, -c, or -I"));
(stb2.st_mode & S_IFMT) == S_IFDIR) {
diffdir(argv);
done();
- }
+ }
filename(&file1, &file2, &stb1, &input_file1);
filename(&file2, &file1, &stb2, &input_file2);
@@ -586,8 +584,7 @@ unravel(int p)
for (i = 0; i <= len[0]; i++)
J[i] = i <= pref ? i :
- i > len[0] - suff ? i + len[1] - len[0]:
- 0;
+ i > len[0] - suff ? i + len[1] - len[0]: 0;
for (q = clist + p; q->y != 0; q = clist + q->pred)
J[q->x + pref] = q->y + pref;
}
@@ -832,9 +829,8 @@ change(int a, int b, int c, int d)
(void) printf("--- %s %s\n", input_file2,
time_buf);
- context_vec_start = (struct context_vec *)
- malloc(MAX_CONTEXT *
- sizeof (struct context_vec));
+ context_vec_start = malloc(MAX_CONTEXT *
+ sizeof (struct context_vec));
if (context_vec_start == NULL)
error(gettext(NO_MEM_ERR));
@@ -961,7 +957,7 @@ fetch(long *f, int a, int b, int filen, char *s, int oldfile)
} else {
endifname = oldfile ? ifdef1 : ifdef2;
(void) fprintf(stdout,
- "#ifdef %s\n", endifname);
+ "#ifdef %s\n", endifname);
}
}
inifdef = 1 + oldfile;
@@ -976,9 +972,9 @@ fetch(long *f, int a, int b, int filen, char *s, int oldfile)
while (ch = getbufwchar(filen, &mlen)) {
if (ch != '\n' && ch != WEOF) {
if (ch == '\t' && tflag)
- do
+ do {
(void) putchar(' ');
- while (++col & 7);
+ } while (++col & 7);
else {
(void) wcput(ch);
col++;
@@ -1014,7 +1010,7 @@ readhash(FILE *f, int filen, char *str)
/* In this case, diff doesn't have to take */
/* care of multibyte characters. */
for (shift = 0; (t = getc(f)) != '\n';
- shift += 7) {
+ shift += 7) {
if (t == EOF) {
if (shift) {
(void) fprintf(stderr,
@@ -1024,14 +1020,14 @@ readhash(FILE *f, int filen, char *str)
return (0);
}
sum += (isupper(t) ? tolower(t) : t) <<
- (shift &= HALFMASK);
+ (shift &= HALFMASK);
}
} else {
/* In this case, diff needs to take care of */
/* multibyte characters. */
for (shift = 0;
- (wt = getbufwchar(filen, &mlen)) != '\n';
- shift += 7) {
+ (wt = getbufwchar(filen, &mlen)) != '\n';
+ shift += 7) {
if (wt == WEOF) {
if (shift) {
(void) fprintf(stderr,
@@ -1041,7 +1037,7 @@ readhash(FILE *f, int filen, char *str)
return (0);
}
sum += NCCHRTRAN(wt) <<
- (shift &= HALFMASK);
+ (shift &= HALFMASK);
}
}
else
@@ -1082,7 +1078,7 @@ readhash(FILE *f, int filen, char *str)
space = 0;
}
sum += CHRTRAN(wt) <<
- (shift &= HALFMASK);
+ (shift &= HALFMASK);
shift += 7;
continue;
case L'\n':
@@ -1100,7 +1096,7 @@ readhash(FILE *f, int filen, char *str)
static void
dump_context_vec(void)
{
- int a, b, c, d;
+ int a, b = 0, c, d = 0;
char ch;
struct context_vec *cvp = context_vec_start;
int lowa, upb, lowc, upd;
@@ -1156,7 +1152,7 @@ dump_context_vec(void)
fetch(ixnew, c, d, 1, "+", 0);
} else if (ch == 'd') {
fetch(ixold, lowa, a - 1, 0, uflag ? " " :
- " ", 1);
+ " ", 1);
fetch(ixold, a, b, 0, uflag ? "-" : "- ", 1);
} else {
/* The last argument should not affect */
@@ -1250,7 +1246,7 @@ diffdir(char **argv)
if (opt == D_EDIT && (sflag || lflag)) {
(void) fprintf(stderr, "diff: ");
(void) fprintf(stderr, gettext(
- "warning: should not give -s or -l with -e\n"));
+ "warning: should not give -s or -l with -e\n"));
}
dirstatus = 0;
title[0] = 0;
@@ -1312,9 +1308,9 @@ diffdir(char **argv)
}
if (lflag) {
scanpr(dir1, ONLY,
- gettext("Only in %.*s"), file1, efile1, 0, 0);
+ gettext("Only in %.*s"), file1, efile1, 0, 0);
scanpr(dir2, ONLY,
- gettext("Only in %.*s"), file2, efile2, 0, 0);
+ gettext("Only in %.*s"), file2, efile2, 0, 0);
scanpr(dir1, SAME,
gettext("Common identical files in %.*s and %.*s"),
file1, efile1, file2, efile2);
@@ -1361,8 +1357,8 @@ setfile(char **fpp, char **epp, char *file)
}
static void
-scanpr(struct dir *dp, int test,
- char *title, char *file1, char *efile1, char *file2, char *efile2)
+scanpr(struct dir *dp, int test, char *title, char *file1, char *efile1,
+ char *file2, char *efile2)
{
int titled = 0;
@@ -1430,14 +1426,14 @@ setupdir(char *cp)
(void) strcpy(ep->d_entry, rp->d_name);
}
dp = (struct dir *)realloc((char *)dp,
- (nitems + 1) * sizeof (struct dir));
+ (nitems + 1) * sizeof (struct dir));
if (dp == 0)
error(gettext(NO_MEM_ERR));
}
dp[nitems].d_entry = 0; /* delimiter */
(void) closedir(dirp);
qsort(dp, nitems, sizeof (struct dir),
- (int (*)(const void *, const void *))entcmp);
+ (int (*)(const void *, const void *))entcmp);
return (dp);
}
@@ -1564,10 +1560,10 @@ compare(struct dir *dp)
* an event port
* an unknown type
*/
- (void) printf(
-gettext("File %s is %s while file %s is %s\n"),
- file1, pfiletype(fmt1),
- file2, pfiletype(fmt2));
+ (void) printf(gettext(
+ "File %s is %s while file %s is %s\n"),
+ file1, pfiletype(fmt1),
+ file2, pfiletype(fmt2));
}
}
(void) close(f1); (void) close(f2);
@@ -1600,7 +1596,7 @@ same:
dp->d_flags = SAME;
else
(void) printf(gettext("Files %s and %s are identical\n"),
- file1, file2);
+ file1, file2);
closem:
(void) close(f1); (void) close(f2);
@@ -1612,7 +1608,7 @@ notsame:
dp->d_flags |= DIFFER;
else if (opt == D_NORMAL || opt == D_CONTEXT)
(void) printf(
- gettext("Binary files %s and %s differ\n"),
+ gettext("Binary files %s and %s differ\n"),
file1, file2);
(void) close(f1); (void) close(f2);
return (1);
@@ -1868,7 +1864,7 @@ filename(char **pa1, char **pa2, struct stat *st, char **ifile)
if (*ifile == (char *)NULL) {
(void) fprintf(stderr, gettext(
- "no more memory - try again later\n"));
+ "no more memory - try again later\n"));
status = 2;
done();
}
@@ -1886,7 +1882,7 @@ filename(char **pa1, char **pa2, struct stat *st, char **ifile)
if (*ifile == (char *)NULL) {
(void) fprintf(stderr, gettext(
- "no more memory - try again later\n"));
+ "no more memory - try again later\n"));
status = 2;
done();
}
@@ -1940,7 +1936,7 @@ copytemp(char *fn)
if (write(ofd, buf, i) != i) {
(void) fprintf(stderr, "diff: ");
(void) fprintf(stderr,
- gettext("write failed %s\n"), template);
+ gettext("write failed %s\n"), template);
done();
}
(void) close(ifd); (void) close(ofd);
@@ -1969,13 +1965,12 @@ prune(void)
int i, j;
for (pref = 0; pref < len[0] && pref < len[1] &&
- file[0][pref + 1].value == file[1][pref + 1].value;
+ file[0][pref + 1].value == file[1][pref + 1].value;
pref++)
;
for (suff = 0; (suff < len[0] - pref) &&
- (suff < len[1] - pref) &&
- (file[0][len[0] - suff].value ==
- file[1][len[1] - suff].value);
+ (suff < len[1] - pref) &&
+ (file[0][len[0] - suff].value == file[1][len[1] - suff].value);
suff++)
;
@@ -2046,12 +2041,12 @@ static void
usage(void)
{
(void) fprintf(stderr, gettext(
- "usage: diff [-bitw] [-c | -e | -f | -h | -n | -u] file1 "
- "file2\n"
- " diff [-bitw] [-C number | -U number] file1 file2\n"
- " diff [-bitw] [-D string] file1 file2\n"
- " diff [-bitw] [-c | -e | -f | -h | -n | -u] [-l] [-r] "
- "[-s] [-S name] directory1 directory2\n"));
+ "usage: diff [-bitw] [-c | -e | -f | -h | -n | -u] file1 "
+ "file2\n"
+ " diff [-bitw] [-C number | -U number] file1 file2\n"
+ " diff [-bitw] [-D string] file1 file2\n"
+ " diff [-bitw] [-c | -e | -f | -h | -n | -u] [-l] [-r] "
+ "[-s] [-S name] directory1 directory2\n"));
status = 2;
done();
}
@@ -2081,7 +2076,7 @@ initbuf(FILE *iop, int filen, long offset)
}
/*
- * Reset a buff structure, and rewind the associated file.
+ * Reset a buff structure, and rewind the associated file.
*/
static void
resetbuf(int filen)
@@ -2169,7 +2164,7 @@ getbufwchar(int filen, int *len)
/* Not buffered */
bufwchar[filen].ptr = &(bufwchar[filen].buf[MB_LEN_MAX]);
num = fread((void *)bufwchar[filen].ptr,
- sizeof (char), NW, bufwchar[filen].iop);
+ sizeof (char), NW, bufwchar[filen].iop);
if (ferror(bufwchar[filen].iop)) {
(void) fprintf(stderr, "diff: ");
(void) fprintf(stderr, gettext("Error reading "));
@@ -2185,12 +2180,12 @@ getbufwchar(int filen, int *len)
if (bufwchar[filen].buffered < mbcurmax) {
for (i = 0; i < bufwchar[filen].buffered; i++) {
bufwchar[filen].buf[MB_LEN_MAX -
- (bufwchar[filen].buffered - i)] =
- *(bufwchar[filen].ptr + i);
+ (bufwchar[filen].buffered - i)] =
+ *(bufwchar[filen].ptr + i);
}
bufwchar[filen].ptr = &(bufwchar[filen].buf[MB_LEN_MAX]);
num = fread((void *)bufwchar[filen].ptr,
- sizeof (char), NW, bufwchar[filen].iop);
+ sizeof (char), NW, bufwchar[filen].iop);
if (ferror(bufwchar[filen].iop)) {
(void) fprintf(stderr, "diff: ");
(void) fprintf(stderr, gettext("Error reading "));
@@ -2199,7 +2194,7 @@ getbufwchar(int filen, int *len)
done();
}
bufwchar[filen].ptr = &(bufwchar[filen].buf[MB_LEN_MAX -
- bufwchar[filen].buffered]);
+ bufwchar[filen].buffered]);
bufwchar[filen].buffered += num;
if (bufwchar[filen].buffered < mbcurmax) {
mxlen = bufwchar[filen].buffered;
diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile
index 75a8b4c285..54a8edb934 100644
--- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile
@@ -61,7 +61,7 @@ LDLIBS += -L$(DEVTREE_SRC_DIR)
LDLIBS += -L$(SRC)/lib/libptree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
-LDLIBS += -lc -lpicldevtree -lpicltree -lnvpair
+LDLIBS += -lc -lpicltree -lnvpair
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile
index c46f80e843..7e2d47ea78 100644
--- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile
@@ -59,9 +59,9 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
-LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
+LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicltree
LDLIBS += -lpicld_pluginutil
-LDLIBS += -ldevinfo -lc
+LDLIBS += -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile
index 837f83cb8d..4e3d064d66 100644
--- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile
@@ -62,7 +62,7 @@ LDLIBS += -L$(DEVTREE_SRC_DIR)
LDLIBS += -L$(SRC)/lib/libptree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
-LDLIBS += -lc -lpicldevtree -lpicltree -lnvpair
+LDLIBS += -lc -lpicltree -lnvpair
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile
index 5341f7acd2..a32d03ee8d 100644
--- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile
@@ -57,7 +57,7 @@ LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin
DYNFLAGS += -R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM)
LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin
-LDLIBS += -lc -ldevice -lcfgadm
+LDLIBS += -lc -ldevice
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile
index 8f086c3b28..303c3f421c 100644
--- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile
@@ -59,9 +59,9 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
-LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
+LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicltree
LDLIBS += -lpicld_pluginutil
-LDLIBS += -ldevinfo -lc
+LDLIBS += -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile
index ac1a31716e..2d020c93f9 100644
--- a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile
@@ -54,8 +54,7 @@ LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
-LDLIBS += -lnvpair -ldevinfo -lc
-LDLIBS += -lpicltree -lpicld_pluginutil -lpiclevent -lpicldevtree
+LDLIBS += -lnvpair -lc -lpicltree -lpicld_pluginutil
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile
index e441499565..90fe8e9bc1 100644
--- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile
@@ -58,7 +58,7 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
-LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
+LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicltree
LDLIBS += -lpicld_pluginutil
LDLIBS += -ldevinfo -lc
diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile
index 375d7f990e..138d826a95 100644
--- a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile
@@ -57,7 +57,7 @@ LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
LDLIBS += -lc -lnvpair -lfruutils
-LDLIBS += -lpicltree -lpiclfrutree -lfruaccess -lpicld_pluginutil
+LDLIBS += -lpicltree -lfruaccess -lpicld_pluginutil
LDLIBS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/\$$PLATFORM/lib:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
index 481f1d6d48..e62cb2f0ea 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
@@ -57,7 +57,7 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
-LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
+LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicltree
LDLIBS += -lpicld_pluginutil -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
index 96f5b718fd..ecbcdf5db0 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
@@ -49,7 +49,7 @@ CFLAGS += $(CCVERBOSE)
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
-LDLIBS += -lc -lpicltree -lpicldevtree
+LDLIBS += -lc -lpicltree
LDLIBS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
PLATFORM= SUNW,Sun-Blade-100
diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile
index 5826a15c23..d20aa48ae9 100644
--- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile
@@ -59,7 +59,7 @@ DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(DEVTREE_SRC_DIR)
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
LDLIBS += -L$(SRC)/lib/libptree/$(MACH)
-LDLIBS += -lc -lpicltree -lpicldevtree
+LDLIBS += -lc -lpicltree
DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile
index 8f4b2cb9be..3113f013d9 100644
--- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile
@@ -65,8 +65,7 @@ LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg
-LDLIBS += -lpicltree -lpicldevtree -lpiclfrutree -lnvpair
-LDLIBS += -ldevinfo -lc
+LDLIBS += -lpicltree -ldevinfo -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile
index 5aa4aeded0..d76fe69b8d 100644
--- a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile
@@ -57,8 +57,7 @@ LDLIBS += -L$(DEVTREE_SRC_DIR)
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
-LDLIBS += -lc -lpicldevtree -lpiclmemcfg
-LDLIBS += -lpicltree -lnvpair -lkstat -ldevice
+LDLIBS += -lpicltree -lnvpair -lkstat -ldevice -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile
index f5fcac6054..1ff27dd885 100644
--- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile
@@ -89,8 +89,7 @@ LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/envmon
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins
LDLIBS += -lc -ldevinfo -ldevice
-LDLIBS += -lpicltree -lpicld_pluginutil -lnvpair -lkstat
-LDLIBS += -lpiclevent -lpiclenvmon -lpiclfrutree
+LDLIBS += -lpicltree -lpicld_pluginutil -lnvpair
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile
index ce349939a9..669527a5dd 100644
--- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile
@@ -61,9 +61,9 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
-LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
+LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicltree
LDLIBS += -lpicld_pluginutil
-LDLIBS += -ldevinfo -lc
+LDLIBS += -lc
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile b/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile
index fd05cab88f..f4261f5af8 100644
--- a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile
@@ -67,7 +67,7 @@ LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
DYNFLAGS += -R$(DYNFLAGS_COM)
-LDLIBS += -lc -lpicltree -ldevinfo -lpicldevtree -lcfgadm -lnvpair
+LDLIBS += -lc -lpicltree -ldevinfo -lcfgadm -lnvpair
.KEEP_STATE:
diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile b/usr/src/cmd/picl/plugins/sun4v/pri/Makefile
index 6b67dec843..7d4711ab20 100644
--- a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4v/pri/Makefile
@@ -69,12 +69,7 @@ LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
LDLIBS += -L$(ROOT)/usr/lib/libpri
LDLIBS += -L$(ROOT_PLATFORM)/lib -L$(ROOT_PLATFORM)/lib/picl/plugins
-LDLIBS += -lc -lpicl -lpicltree -lpicldevtree -lpri
-
-# No interfaces from libsnmpplugin.so directly used here, but we need the
-# snmp plugin to load and init before libpriplugin.so.
-#
-LDLIBS += -lsnmpplugin
+LDLIBS += -lc -lpicl -lpicltree -lpri
#DYNFLAGS += -R$(DYNFLAGS_COM)
$(SPARC_BLD)LDLIBS += -R$(DYNFLAGS_PLAT) \