diff options
Diffstat (limited to 'usr/src/cmd')
222 files changed, 1332 insertions, 1960 deletions
diff --git a/usr/src/cmd/Adm/sun/Makefile b/usr/src/cmd/Adm/sun/Makefile index e249952dcc..636dc875e6 100644 --- a/usr/src/cmd/Adm/sun/Makefile +++ b/usr/src/cmd/Adm/sun/Makefile @@ -65,6 +65,8 @@ motd: $(ROOT)/buildstamp issue: issue.in $(ROOT)/buildstamp sed "s+build: 00000000T000000Z+$$(cat $(ROOT)/buildstamp)+" issue.in >$@ + @$(NOT_RELEASE_BUILD)-$(ECHO) $(DEV_CM) | sed -e "s/@(#)//" >> motd + @-$(CAT) release_info >> motd smbpasswd: $(TOUCH) smbpasswd diff --git a/usr/src/cmd/abi/appcert/scripts/abi_index.pl b/usr/src/cmd/abi/appcert/scripts/abi_index.pl index c1ff743a13..61a4e19cc8 100644 --- a/usr/src/cmd/abi/appcert/scripts/abi_index.pl +++ b/usr/src/cmd/abi/appcert/scripts/abi_index.pl @@ -20,9 +20,6 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -59,7 +56,6 @@ my $must_be_public = 0; # paths to skip outright. my @skip_list = qw( /etc - /usr/4lib /usr/perl5 ); my $path_skip = join('|', @skip_list); @@ -114,7 +110,7 @@ while (<$contents_fh>) { next unless ($pathname =~ m,\.so,); next unless ($pathname =~ m,/lib,); next unless ($pathname =~ m,/lib[^/]*\.so\b,); - next unless ($type =~ /regular file|symbolic link/i); + next unless ($type =~ /regular file|symbolic link/i); next unless ($status =~ /^\s*installed\s*$/); $pathname = trim($pathname); $link = trim($link); @@ -216,7 +212,7 @@ sub do_pvs next if ($path =~ /'/); # # quote the filename in case it has meta-characters - # (which should never happen in all normal usage) + # (which should never happen in all normal usage) # $paths .= "'$path'"; $cnt++; diff --git a/usr/src/cmd/abi/spectrans/parser/Makefile.targ b/usr/src/cmd/abi/spectrans/parser/Makefile.targ index 8c62e3e315..44c2de493f 100644 --- a/usr/src/cmd/abi/spectrans/parser/Makefile.targ +++ b/usr/src/cmd/abi/spectrans/parser/Makefile.targ @@ -40,7 +40,7 @@ SRCS = $(OBJECTS:%.o=../%.c) LINTFLAGS += -xsuF -errtags=yes CLEANFILES += $(LINTOUT) -CLOBBERFILES += $(LINTLIB) $(LIBRARY) +CLOBBERFILES += $(LIBRARY) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label diff --git a/usr/src/cmd/backup/lib/Makefile b/usr/src/cmd/backup/lib/Makefile index 0cccf936d7..60ca868cc3 100644 --- a/usr/src/cmd/backup/lib/Makefile +++ b/usr/src/cmd/backup/lib/Makefile @@ -67,10 +67,7 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable -LINTOUT= lint.out -CLEANFILES= $(OBJECTS) $(LINTOUT) $(LINTLIB) $(DEBUGS) *.ln \ - $(YSRC) $(LIBRARY) -LINTFLAGS += -y +CLEANFILES= $(OBJECTS) $(DEBUGS) $(YSRC) $(LIBRARY) # support for -g library GLIB= libdump_g.a @@ -103,15 +100,7 @@ install: all $(POFILE): $(POFILES) $(RM) $@; cat $(POFILES) > $@ -# rpcgen produces unused local variables that we can't easily suppress. -# It is also stupid about 32/64 bit integers. Since we don't support -# the RPC subsystem any more, just ignore complaints about it all. -# We have no control over yaccpar, and it has lots of 32/64 complaints. -# Assumes lint run with -s argument -lint: lint.out - sed -f lint.sed lint.out - -lint.out: $(LINTLIB) +lint: check: $(HDRS) $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS) diff --git a/usr/src/cmd/bhyve/Makefile b/usr/src/cmd/bhyve/Makefile index 34f54f34b8..740cd2679a 100644 --- a/usr/src/cmd/bhyve/Makefile +++ b/usr/src/cmd/bhyve/Makefile @@ -26,7 +26,6 @@ all := TARGET = all install := TARGET = install clean := TARGET = clean clobber := TARGET = clobber -lint := TARGET = lint SRCS = acpi.c \ atkbdc.c \ @@ -136,16 +135,8 @@ SMOFF += all_func_returns,leaks,no_if_block CSTD= $(CSTD_GNU99) C99MODE= -xc99=%all -$(PROG) := LDLIBS += \ - -lsocket \ - -lnsl \ - -ldlpi \ - -ldladm \ - -lmd \ - -lsunw_crypto \ - -luuid \ - -lvmmapi \ - -lz +$(PROG) := LDLIBS += -lsocket -lnsl -ldlpi -ldladm -lmd -lsunw_crypto -luuid \ + -lvmmapi -lz $(ZHYVE_PROG) := LDLIBS += -lnvpair $(MEVENT_TEST_PROG) := LDLIBS += -lsocket diff --git a/usr/src/cmd/bhyve/test/Makefile.com b/usr/src/cmd/bhyve/test/Makefile.com index 3367ae50ea..2bd67140f5 100644 --- a/usr/src/cmd/bhyve/test/Makefile.com +++ b/usr/src/cmd/bhyve/test/Makefile.com @@ -22,7 +22,6 @@ include $(SRC)/cmd/Makefile.cmd.64 # CSTD= $(CSTD_GNU99) C99MODE= -xc99=%all -C99LMODE= -Xc99=%all CFLAGS += $(CCVERBOSE) -_gcc=-Wimplicit-function-declaration \ -_gcc=-Wno-parentheses @@ -59,4 +58,3 @@ ROOTOUT = $(OUTFILES:%=$(ROOTTSTDIR)/%) ROOTTESTS = $(ROOTTSTEXES) $(ROOTTSTSH) $(ROOTOUT) FILEMODE = 0555 LDLIBS = $(LDLIBS.cmd) -LINTEXE = $(EXETESTS:%.exe=%.exe.ln) diff --git a/usr/src/cmd/bhyve/test/Makefile.subdirs b/usr/src/cmd/bhyve/test/Makefile.subdirs index 45f0aa67fa..ff7d6c91cb 100644 --- a/usr/src/cmd/bhyve/test/Makefile.subdirs +++ b/usr/src/cmd/bhyve/test/Makefile.subdirs @@ -19,9 +19,8 @@ all := TARGET += all clean := TARGET += clean clobber := TARGET += clobber install := TARGET += install -lint := TARGET += lint -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/bhyve/test/Makefile.targ b/usr/src/cmd/bhyve/test/Makefile.targ index e3ec55cfdb..13d28a0630 100644 --- a/usr/src/cmd/bhyve/test/Makefile.targ +++ b/usr/src/cmd/bhyve/test/Makefile.targ @@ -43,11 +43,6 @@ $(ROOTTSTDIR)/%.exe: %.exe $(ROOTTSTDIR) all: install -%.exe.ln: %.c $(SUPOBJS) - $(LINT.c) $< $(LDLIBS) - -lint: $(LINTEXE) - clean: -$(RM) *.o $(CLEANFILES) diff --git a/usr/src/cmd/bhyvectl/Makefile b/usr/src/cmd/bhyvectl/Makefile index af961ada45..72b3cd913f 100644 --- a/usr/src/cmd/bhyvectl/Makefile +++ b/usr/src/cmd/bhyvectl/Makefile @@ -51,8 +51,6 @@ install: all $(ROOTUSRSBINPROG) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: lint_SRCS - include ../Makefile.targ %.o: $(CONTRIB)/freebsd/lib/libutil/%.c diff --git a/usr/src/cmd/boot/bootadm/bootadm_loader.c b/usr/src/cmd/boot/bootadm/bootadm_loader.c index 5755efd7d5..15bf160745 100644 --- a/usr/src/cmd/boot/bootadm/bootadm_loader.c +++ b/usr/src/cmd/boot/bootadm/bootadm_loader.c @@ -27,6 +27,7 @@ * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2016 Toomas Soome <tsoome@me.com> * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2020 2020 Data Direct Networks. */ /* @@ -616,6 +617,9 @@ set_option(struct menu_lst *menu, char *dummy, char *opt) val = strchr(opt, '='); if (val != NULL) { *val++ = '\0'; + } else { + bam_error(_("missing value in key=value\n")); + return (BAM_ERROR); } if (strcmp(opt, "default") == 0) { diff --git a/usr/src/cmd/boot/filelist/i386/filelist.ramdisk b/usr/src/cmd/boot/filelist/i386/filelist.ramdisk index 387411504e..53d3936483 100644 --- a/usr/src/cmd/boot/filelist/i386/filelist.ramdisk +++ b/usr/src/cmd/boot/filelist/i386/filelist.ramdisk @@ -14,6 +14,7 @@ etc/mach etc/name_to_major etc/name_to_sysnum etc/path_to_inst +etc/ppt_aliases etc/rtc_config etc/system etc/system.d diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c index 6ee99a06c6..6abda78efc 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c @@ -776,45 +776,45 @@ usage(void) { (void) fprintf(stderr, "\nUsage: snoop\n"); (void) fprintf(stderr, - "\t[ -a ] # Listen to packets on audio\n"); + "\t[ -a ] # Listen to packets on audio\n"); (void) fprintf(stderr, - "\t[ -d link ] # Listen on named link\n"); + "\t[ -d link ] # Listen on named link\n"); (void) fprintf(stderr, - "\t[ -s snaplen ] # Truncate packets\n"); + "\t[ -s snaplen ] # Truncate packets\n"); (void) fprintf(stderr, - "\t[ -I IP interface ] # Listen on named IP interface\n"); + "\t[ -I IP interface ] # Listen on named IP interface\n"); (void) fprintf(stderr, - "\t[ -c count ] # Quit after count packets\n"); + "\t[ -c count ] # Quit after count packets\n"); (void) fprintf(stderr, - "\t[ -P ] # Turn OFF promiscuous mode\n"); + "\t[ -P ] # Turn OFF promiscuous mode\n"); (void) fprintf(stderr, - "\t[ -D ] # Report dropped packets\n"); + "\t[ -D ] # Report dropped packets\n"); (void) fprintf(stderr, - "\t[ -S ] # Report packet size\n"); + "\t[ -S ] # Report packet size\n"); (void) fprintf(stderr, - "\t[ -i file ] # Read previously captured packets\n"); + "\t[ -i file ] # Read previously captured packets\n"); (void) fprintf(stderr, - "\t[ -o file ] # Capture packets in file\n"); + "\t[ -o file ] # Capture packets in file\n"); (void) fprintf(stderr, - "\t[ -n file ] # Load addr-to-name table from file\n"); + "\t[ -n file ] # Load addr-to-name table from file\n"); (void) fprintf(stderr, - "\t[ -N ] # Create addr-to-name table\n"); + "\t[ -N ] # Create addr-to-name table\n"); (void) fprintf(stderr, - "\t[ -t r|a|d ] # Time: Relative, Absolute or Delta\n"); + "\t[ -t r|a|d ] # Time: Relative, Absolute or Delta\n"); (void) fprintf(stderr, - "\t[ -v ] # Verbose packet display\n"); + "\t[ -v ] # Verbose packet display\n"); (void) fprintf(stderr, - "\t[ -V ] # Show all summary lines\n"); + "\t[ -V ] # Show all summary lines\n"); (void) fprintf(stderr, - "\t[ -p first[,last] ] # Select packet(s) to display\n"); + "\t[ -p first[,last] ] # Select packet(s) to display\n"); (void) fprintf(stderr, - "\t[ -x offset[,length] ] # Hex dump from offset for length\n"); + "\t[ -x offset[,length] ] # Hex dump from offset for length\n"); (void) fprintf(stderr, - "\t[ -C ] # Print packet filter code\n"); + "\t[ -C ] # Print packet filter code\n"); (void) fprintf(stderr, - "\t[ -q ] # Suppress printing packet count\n"); + "\t[ -q ] # Suppress printing packet count\n"); (void) fprintf(stderr, - "\t[ -r ] # Do not resolve address to name\n"); + "\t[ -r ] # Do not resolve address to name\n"); (void) fprintf(stderr, "\t[ -z zone ] # Open links from named zone\n"); (void) fprintf(stderr, diff --git a/usr/src/cmd/dcs/sparc/sun4u/rdr_messages.c b/usr/src/cmd/dcs/sparc/sun4u/rdr_messages.c index 51b836a57b..187319c234 100644 --- a/usr/src/cmd/dcs/sparc/sun4u/rdr_messages.c +++ b/usr/src/cmd/dcs/sparc/sun4u/rdr_messages.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * WARNING: The contents of this file are shared by all projects * that wish to perform remote Dynamic Reconfiguration (DR) @@ -121,7 +119,7 @@ struct { { SHORTMSG, NOMSG }, /* RDR_CONF_HELP */ { SHORTMSG, NOMSG }, /* RDR_CONF_AP_ID_CMP */ { SHORTMSG, NOMSG }, /* RDR_CONF_ABORT_CMD */ - { SHORTMSG, SHORTMSG }, /* RDR_CONF_CONFIRM_CALLBACK */ + { SHORTMSG, SHORTMSG }, /* RDR_CONF_CONFIRM_CALLBACK */ { SHORTMSG, NOMSG }, /* RDR_CONF_MSG_CALLBACK */ { SHORTMSG, LONGMSG } /* RDR_RSRC_INFO */ }; @@ -129,7 +127,7 @@ struct { #define RDR_BAD_FD (-1) -#define RDR_MSG_HDR_SIZE sizeof (rdr_msg_hdr_t) +#define RDR_MSG_HDR_SIZE sizeof (rdr_msg_hdr_t) static const int RDR_ALIGN_64_BIT = 8; /* 8 bytes */ @@ -364,7 +362,7 @@ rdr_open(int family) int newfd; - if ((newfd = socket(family, SOCK_STREAM, 0)) == NULL) { + if ((newfd = socket(family, SOCK_STREAM, 0)) == -1) { return (RDR_BAD_FD); } @@ -2013,7 +2011,7 @@ static int unpack_change_state_request(change_state_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_change_state_t change_state_data; @@ -2105,7 +2103,7 @@ pack_change_state_reply(change_state_params_t *params, char **buf, int i; char *bufptr; rdr_change_state_reply_t change_state_data; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; (void) memset(&var_msg_info, 0, sizeof (rdr_variable_message_info_t)); @@ -2348,7 +2346,7 @@ static int unpack_private_func_request(private_func_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_private_func_t private_func_data; @@ -2443,7 +2441,7 @@ pack_private_func_reply(private_func_params_t *params, char **buf, int i; char *bufptr; rdr_private_func_reply_t private_func_data; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; (void) memset(&var_msg_info, 0, sizeof (rdr_variable_message_info_t)); @@ -2657,7 +2655,7 @@ static int unpack_test_request(test_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_test_t test_data; @@ -2733,7 +2731,7 @@ pack_test_reply(test_params_t *params, char **buf, int *buf_size) int i; char *bufptr; rdr_test_reply_t test_data; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; if ((params == NULL) || (buf == NULL) || (buf_size == NULL)) { @@ -2836,8 +2834,8 @@ pack_list_ext_request(list_ext_params_t *params, char **buf, int *buf_size) { int i; char *bufptr; - rdr_list_ext_t list_ext_data; - rdr_variable_message_info_t var_msg_info; + rdr_list_ext_t list_ext_data; + rdr_variable_message_info_t var_msg_info; if ((params == NULL) || (buf == NULL) || (buf_size == NULL)) { @@ -2959,7 +2957,7 @@ static int unpack_list_ext_request(list_ext_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_list_ext_t list_ext_data; @@ -3024,7 +3022,7 @@ unpack_list_ext_request(list_ext_params_t *params, const char *buf) } *(params->errstring) = NULL; } else { /* error_msg_ctl == RDR_DONT_GENERATE_ERR_MSGS */ - params->errstring = NULL; + params->errstring = NULL; } params->flags = list_ext_data.flags; params->permissions = list_ext_data.permissions; @@ -3044,8 +3042,8 @@ pack_list_ext_reply(list_ext_params_t *params, char **buf, int *buf_size) int i; char *bufptr; rdr_list_ext_reply_t list_ext_data; - rdr_variable_message_info_t var_msg_info; - int list_data_size; + rdr_variable_message_info_t var_msg_info; + int list_data_size; (void) memset(&var_msg_info, 0, sizeof (rdr_variable_message_info_t)); @@ -3132,8 +3130,8 @@ pack_list_ext_reply(list_ext_params_t *params, char **buf, int *buf_size) static int unpack_list_ext_reply(list_ext_params_t *params, const char *buf) { - int list_data_size; - char *bufptr; + int list_data_size; + char *bufptr; rdr_list_ext_reply_t list_ext_data; @@ -3160,7 +3158,7 @@ unpack_list_ext_reply(list_ext_params_t *params, const char *buf) return (RDR_MEM_ALLOC); } *(params->ap_id_list) = (rdr_list_t *) - malloc(sizeof (rdr_list_t) * list_ext_data.num_ap_ids); + malloc(sizeof (rdr_list_t) * list_ext_data.num_ap_ids); if (*(params->ap_id_list) == NULL) { return (RDR_MEM_ALLOC); } @@ -3177,7 +3175,7 @@ unpack_list_ext_reply(list_ext_params_t *params, const char *buf) return (RDR_MEM_ALLOC); } if (get_string_from_buf(params->errstring, - list_ext_data.errstring_size, bufptr)) { + list_ext_data.errstring_size, bufptr)) { return (RDR_ERROR); } bufptr += list_ext_data.errstring_size; @@ -3300,7 +3298,7 @@ static int unpack_help_request(help_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_help_t help_data; @@ -3569,8 +3567,8 @@ pack_confirm_request(confirm_callback_params_t *params, char **buf, int i; char *bufptr; rdr_confirm_callback_t confirm_callback_data; - int message_strlen; - int message_pad_sz; + int message_strlen; + int message_pad_sz; if ((params == NULL) || (buf == NULL) || (buf_size == NULL)) { @@ -3919,7 +3917,7 @@ pack_rsrc_info_request(rsrc_info_params_t *params, char **buf, int *buf_size) { char *bufptr; rdr_rsrc_info_t rsrc_info_data; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; if ((params == NULL) || (buf == NULL) || (buf_size == NULL)) { @@ -3992,7 +3990,7 @@ static int unpack_rsrc_info_request(rsrc_info_params_t *params, const char *buf) { char *bufptr; - rdr_variable_message_info_t var_msg_info; + rdr_variable_message_info_t var_msg_info; rdr_rsrc_info_t rsrc_info_data; @@ -4040,7 +4038,7 @@ pack_rsrc_info_reply(rsrc_info_params_t *params, char **buf, int *buf_size, rdr_rsrc_info_reply_t rsrc_info_data; int pack_status; caddr_t rsrc_info_bufp = NULL; - size_t rsrc_info_size; + size_t rsrc_info_size; if ((params == NULL) || (buf == NULL) || (buf_size == NULL)) { @@ -4100,7 +4098,7 @@ static int unpack_rsrc_info_reply(rsrc_info_params_t *params, const char *buf) { int unpack_status; - char *bufptr; + char *bufptr; rdr_rsrc_info_reply_t rsrc_info_data; @@ -4220,7 +4218,7 @@ unpack_ap_ids(int num_ap_ids, char **ap_ids, const char *buf, var_msg_info->ap_id_int_size = sizeof (int) * num_ap_ids; if (num_ap_ids > 0) { var_msg_info->ap_id_sizes = (int *) - malloc(sizeof (int) * var_msg_info->ap_id_int_size); + malloc(sizeof (int) * var_msg_info->ap_id_int_size); if (var_msg_info->ap_id_sizes == NULL) { return (RDR_MEM_ALLOC); } @@ -4236,7 +4234,7 @@ unpack_ap_ids(int num_ap_ids, char **ap_ids, const char *buf, continue; } if ((chars_copied + ap_id_size) > - var_msg_info->ap_id_char_size) { + var_msg_info->ap_id_char_size) { return (RDR_ERROR); } ap_ids[i] = (char *)malloc(ap_id_size); diff --git a/usr/src/cmd/init/Makefile b/usr/src/cmd/init/Makefile index a644c8087a..521c9c26a7 100644 --- a/usr/src/cmd/init/Makefile +++ b/usr/src/cmd/init/Makefile @@ -24,22 +24,26 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2020 Oxide Computer Company -PROG= init -OBJS= init.o +PROG= init ROOTFS_PROG= $(PROG) DEFAULTFILES= init.dfl include ../Makefile.cmd -include ../Makefile.ctf +OBJS = init.o bootbanner.o CSTD = $(CSTD_GNU99) LDLIBS += -lpam -lbsm -lcontract -lscf CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) -LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 CLOBBERFILES= $(STATIC) +CPPFLAGS += -DBOOTBANNER1='"$(BOOTBANNER1)"' +CPPFLAGS += -DBOOTBANNER2='"$(BOOTBANNER2)"' +CPPFLAGS += -DBOOTBANNER3='"$(BOOTBANNER3)"' +CPPFLAGS += -DBOOTBANNER4='"$(BOOTBANNER4)"' +CPPFLAGS += -DBOOTBANNER5='"$(BOOTBANNER5)"' # needs work SMATCH=off @@ -48,10 +52,6 @@ SMATCH=off all: $(ROOTFS_PROG) -$(ROOTFS_PROG): $(OBJS) - $(LINK.c) -o $@ $(OBJS) $(LDLIBS) - $(POST_PROCESS) - install: all $(ROOTETCDEFAULTFILES) $(ROOTSBINPROG) $(RM) $(ROOTETCPROG) $(RM) $(ROOTUSRSBINPROG) @@ -62,15 +62,17 @@ install: all $(ROOTETCDEFAULTFILES) $(ROOTSBINPROG) $(RM) $(ROOTETC)/TIMEZONE cd $(ROOTETC); $(SYMLINK) default/init TIMEZONE +$(PROG): $(OBJS) + $(LINK.c) $(OBJS) -o $@ $(LDLIBS) + $(POST_PROCESS) + +%.o: $(SRC)/common/bootbanner/%.c + $(COMPILE.c) $(OUTPUT_OPTION) $< + $(POST_PROCESS_O) + test: rtest $(PROG) clean: -lint: lint_PROG - -%.o: %.c - $(COMPILE.c) $< - $(POST_PROCESS_O) - include ../Makefile.targ diff --git a/usr/src/cmd/init/init.c b/usr/src/cmd/init/init.c index b37322aa5c..86f717d54a 100644 --- a/usr/src/cmd/init/init.c +++ b/usr/src/cmd/init/init.c @@ -20,6 +20,7 @@ */ /* + * Copyright 2020 Oxide Computer Company * Copyright (c) 2013 Gary Mills * * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. @@ -100,6 +101,7 @@ #include <sys/tty.h> #include <sys/types.h> #include <sys/utsname.h> +#include <sys/bootbanner.h> #include <bsm/adt_event.h> #include <bsm/libbsm.h> @@ -605,6 +607,7 @@ static int startd_failure_rate_critical(); static char *audit_boot_msg(); static int audit_put_record(int, int, char *); static void update_boot_archive(int new_state); +static void init_bootbanner_print(const char *, uint_t); int main(int argc, char *argv[]) @@ -674,34 +677,33 @@ main(int argc, char *argv[]) st_init(); if (booting && print_banner) { - struct utsname un; - char buf[BUFSIZ], *isa; - long ret; - int bits = 32; - /* * We want to print the boot banner as soon as * possible. In the global zone, the kernel does it, * but we do not have that luxury in non-global zones, * so we will print it here. */ +#ifdef LEGACY_BANNER + struct utsname un; + char buf[BUFSIZ]; + const char *bits; + int r; + (void) uname(&un); - ret = sysinfo(SI_ISALIST, buf, sizeof (buf)); - if (ret != -1L && ret <= sizeof (buf)) { - for (isa = strtok(buf, " "); isa; - isa = strtok(NULL, " ")) { - if (strcmp(isa, "sparcv9") == 0 || - strcmp(isa, "amd64") == 0) { - bits = 64; - break; - } - } + if ((r = sysinfo(SI_ADDRESS_WIDTH, buf, sizeof (buf))) > 0 && + r < sizeof (buf)) { + bits = buf; + } else { + bits = "64"; } console(B_FALSE, - "\n\n%s Release %s Version %s %d-bit\r\n", + "\n\n%s Release %s Version %s %s-bit\r\n", un.sysname, un.release, un.version, bits); console(B_FALSE, "Copyright 2010-2020 Joyent, Inc.\r\n"); +#else + bootbanner_print(init_bootbanner_print, 0); +#endif } /* @@ -918,6 +920,14 @@ main(int argc, char *argv[]) } static void +init_bootbanner_print(const char *line, uint_t num) +{ + const char *pfx = (num == 0) ? "\n\n" : ""; + + console(B_FALSE, "%s%s\r\n", pfx, line); +} + +static void update_boot_archive(int new_state) { if (new_state != LVL0 && new_state != LVL5 && new_state != LVL6) diff --git a/usr/src/cmd/ldap/i386/Makefile b/usr/src/cmd/ldap/i386/Makefile index 3d21272402..20c550edf4 100644 --- a/usr/src/cmd/ldap/i386/Makefile +++ b/usr/src/cmd/ldap/i386/Makefile @@ -20,17 +20,14 @@ # CDDL HEADER END # # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996-1997 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/ldap/sparc/Makefile -# + include ../Makefile.com .KEEP_STATE: -install: $(ALLPROG) $(ROOTPROG) $(ROOTLINKS) $(ROOTLINT) +install: $(ALLPROG) $(ROOTPROG) $(ROOTLINKS) FRC: diff --git a/usr/src/cmd/ldap/sparc/Makefile b/usr/src/cmd/ldap/sparc/Makefile index 3d21272402..20c550edf4 100644 --- a/usr/src/cmd/ldap/sparc/Makefile +++ b/usr/src/cmd/ldap/sparc/Makefile @@ -20,17 +20,14 @@ # CDDL HEADER END # # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996-1997 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/ldap/sparc/Makefile -# + include ../Makefile.com .KEEP_STATE: -install: $(ALLPROG) $(ROOTPROG) $(ROOTLINKS) $(ROOTLINT) +install: $(ALLPROG) $(ROOTPROG) $(ROOTLINKS) FRC: diff --git a/usr/src/cmd/ldmad/mdesc_lib.c b/usr/src/cmd/ldmad/mdesc_lib.c index cab9560fd6..44221b9f70 100644 --- a/usr/src/cmd/ldmad/mdesc_lib.c +++ b/usr/src/cmd/ldmad/mdesc_lib.c @@ -210,7 +210,7 @@ md_add_string_property(mmd_t *mdp, md_node_t *nodep, char *sp, char *bufp) propp = md_new_property(mdp, nodep, MDET_PROP_STR, sp); if (propp == NULL) { md_free_data_block(mdp, dbp); - return (NULL); + return (ENOMEM); } propp->d.dbp = dbp; return (0); diff --git a/usr/src/cmd/luxadm/fcalupdate.c b/usr/src/cmd/luxadm/fcalupdate.c index c9a8e158fa..41f800f3bd 100644 --- a/usr/src/cmd/luxadm/fcalupdate.c +++ b/usr/src/cmd/luxadm/fcalupdate.c @@ -66,7 +66,7 @@ #include <l_common.h> #include "luxadm.h" -/* Defines */ +/* Defines */ #define FEPROM_SIZE 256*1024 #define FEPROM_MAX_PROGRAM 25 #define FEPROM_MAX_ERASE 1000 @@ -632,7 +632,7 @@ getbootdev(unsigned int verbose) char *slot = ",0:slot"; ls = (char *)malloc(PATH_MAX); - (void) memset((char *)ls, NULL, PATH_MAX); + (void) memset((char *)ls, 0, PATH_MAX); (void) strcpy(ls, "ls -l "); (void) strcat(ls, bootdev); if ((ptr = popen(ls, "r")) != NULL) { @@ -827,9 +827,9 @@ loop1: /* * getsocpath(): - * Searches the /devices directory recursively returning all soc_name + * Searches the /devices directory recursively returning all soc_name * entries in sbussoc_list (global). This excludes port entries and - * onboard socal (which leaves only directory entries with + * onboard socal (which leaves only directory entries with * soc_name included). devcnt is updated to reflect number of soc_name * devices found. */ diff --git a/usr/src/cmd/luxadm/g_adm.c b/usr/src/cmd/luxadm/g_adm.c index b6377b00da..ed6a389c75 100644 --- a/usr/src/cmd/luxadm/g_adm.c +++ b/usr/src/cmd/luxadm/g_adm.c @@ -94,7 +94,7 @@ static void display_lun_info(L_disk_state, Path_struct *, struct mode_page *, int, WWN_list *, char *); static void display_fc_disk(struct path_struct *, char *, gfc_map_t *, L_inquiry, int); -static void adm_display_err(char *, int); +static void adm_display_err(char *, int); static void temperature_messages(struct l_state_struct *, int); static void ctlr_messages(struct l_state_struct *, int, int); static void fan_messages(struct l_state_struct *, int, int); @@ -285,7 +285,7 @@ char last_logical_path[MAXPATHLEN]; retval++; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; path_phys = NULL; @@ -482,7 +482,7 @@ char err_path[MAXNAMELEN]; if (((ptr = strstr(err_path, ", ")) != NULL) && ((*(ptr + 1) == 'f') || (*(ptr + 1) == 'r') || (*(ptr +1) == 's'))) { - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; path_phys = NULL; @@ -573,7 +573,7 @@ char ses_path[MAXPATHLEN], inq_path[MAXNAMELEN]; retval++; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; if ((err = l_convert_name(inq_path, &path_phys, @@ -2317,15 +2317,15 @@ int num_status_entries; (void) fprintf(stdout, MSGSTR(32, "Information from %s"), fc_stats->drvr_name); (void) fprintf(stdout, "\n"); - if ((*fc_stats->node_wwn != NULL) && - (*fc_stats->port_wwn[port] != NULL)) { + if ((*fc_stats->node_wwn != '\0') && + (*fc_stats->port_wwn[port] != '\0')) { (void) fprintf(stdout, MSGSTR(104, " Host Adapter WWN's: Node:%s" " Port:%s\n"), fc_stats->node_wwn, fc_stats->port_wwn[port]); } - if (*fc_stats->fw_revision != NULL) { + if (*fc_stats->fw_revision != '\0') { (void) fprintf(stdout, MSGSTR(105, " Host Adapter Firmware Revision: %s\n"), fc_stats->fw_revision); @@ -2613,15 +2613,15 @@ int p_on = 0, p_st = 0; "Information from %s"), ifp_stats.drvr_name); (void) fprintf(stdout, "\n"); - if ((*ifp_stats.node_wwn != NULL) && - (*ifp_stats.port_wwn != NULL)) { + if ((*ifp_stats.node_wwn != '\0') && + (*ifp_stats.port_wwn != '\0')) { (void) fprintf(stdout, MSGSTR(104, " Host Adapter WWN's: Node:%s" " Port:%s\n"), ifp_stats.node_wwn, ifp_stats.port_wwn); } - if (*ifp_stats.fw_revision != NULL) { + if (*ifp_stats.fw_revision != 0) { (void) fprintf(stdout, MSGSTR(105, " Host Adapter Firmware Revision: %s\n"), ifp_stats.fw_revision); @@ -2925,7 +2925,7 @@ char temp2path[MAXPATHLEN]; mp_pathlist_t pathlist; int p_pw = 0, p_on = 0, p_st = 0; gfc_dev_t map_root, map_dev; -int *port_addr, *hard_addr, pos = 0, count; +int *port_addr, *hard_addr, pos = 0, count; uchar_t *hba_port_wwn, *port_wwn, *node_wwn, *dtype_prop; uint_t map_topo; @@ -4062,7 +4062,7 @@ struct mode_page *pg_hdr; if (no_path_flag) { (void) fprintf(stdout, " "); - if (port_a_flag != NULL) { + if (port_a_flag != 0) { (void) fprintf(stdout, MSGSTR(142, "Status(Port B):")); } else { (void) fprintf(stdout, MSGSTR(141, "Status(Port A):")); @@ -4870,7 +4870,7 @@ Interconnect_st interconnect; (void) fprintf(stdout, MSGSTR(30, "Not Installed")); } else if (interconnect.code == S_CRITICAL) { - if (interconnect.eprom_fail != NULL) { + if (interconnect.eprom_fail != 0) { (void) fprintf(stdout, MSGSTR(2140, "Critical Failure: EEPROM failure")); } else { @@ -4879,7 +4879,7 @@ Interconnect_st interconnect; } revision_msg(l_state, elem_index + j); } else if (interconnect.code == S_NONCRITICAL) { - if (interconnect.eprom_fail != NULL) { + if (interconnect.eprom_fail != 0) { (void) fprintf(stdout, MSGSTR(2142, "Non-Critical Failure: EEPROM failure")); } else { @@ -5566,7 +5566,7 @@ cleanup_and_go: * * Sample output for ifp: * - * /devices/pci@1f,4000/SUNW,ifp@2:devctl CONNECTED + * /devices/pci@1f,4000/SUNW,ifp@2:devctl CONNECTED * /devices/pci@1f,2000/SUNW,ifp@1:devctl NOT CONNECTED * * Sample output for socal: diff --git a/usr/src/cmd/luxadm/hotplug.c b/usr/src/cmd/luxadm/hotplug.c index 2efec8ba3c..f3e962ae8f 100644 --- a/usr/src/cmd/luxadm/hotplug.c +++ b/usr/src/cmd/luxadm/hotplug.c @@ -104,7 +104,7 @@ static int h_pre_hotplug_sena(Hotplug_Devlist *, static int h_post_hotplug_sena(Hotplug_Devlist *, WWN_list *, int, int, int, int); static int h_remove_ses_nodes(struct dlist *); -static int h_print_list_warn(Hotplug_Devlist *, int, int); +static int h_print_list_warn(Hotplug_Devlist *, int, int); static int h_display_logical_nodes(struct dlist *); static void h_print_logical_nodes(struct dlist *); static int h_remove_nodes(struct dlist *); @@ -394,7 +394,7 @@ char choice[2]; for (list = bsyRsrv_disk_list; list != NULL; list = list->next, i++) { if ((list->dev_type == DTYPE_DIRECT) && (list->dev_location == SENA)) { - if (list->f_flag != NULL) { + if (list->f_flag != 0) { if (enc_type == DAK_ENC_TYPE) { (void) fprintf(stdout, MSGSTR(5663, " %d: Box Name: \"%s\" slot %d\n"), @@ -549,7 +549,7 @@ int p_pw = 0, p_on = 0, p_st = 0; err = 0; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; if ((err = l_convert_name(inq_path, &path_phys, @@ -687,7 +687,7 @@ int p_pw = 0, p_on = 0, p_st = 0; * set dev_path to NULL, * if disk has null wwn. */ - *dev_path = NULL; + *dev_path = '\0'; dev_location = SENA; goto getinfo; } @@ -2193,12 +2193,12 @@ Box_list *bl1, *box_list = NULL; */ static int h_post_remove_dev(Hotplug_Devlist *hotplug_disk, - int todo, int verbose_flag) + int todo, int verbose_flag) { -char device_name[MAXNAMELEN], *dev_path = NULL; -int tid, err; -gfc_map_t map; -int nArg; + char device_name[MAXNAMELEN], *dev_path = NULL; + int tid, err; + gfc_map_t map; + int nArg; tid = hotplug_disk->tid; @@ -2669,7 +2669,7 @@ char *tape_entries[] = { "", "b", "bn", "c", "cb", "cbn", "cn", (void) strcpy(buf, ptr); if ((ptr = strrchr(buf, 's')) == NULL) continue; - *(++ptr) = NULL; + *(++ptr) = '\0'; found_dev++; if (found_dev == 1) (void) fprintf(stdout, @@ -2695,7 +2695,7 @@ char *tape_entries[] = { "", "b", "bn", "c", "cb", "cbn", "cn", buf_ptr = ptr; while (*ptr >= '0' && *ptr <= '9') ptr++; - *ptr = NULL; + *ptr = '\0'; for (i = 0, ptr = tape_entries[0]; ptr != NULL; i++, ptr = tape_entries[i]) { @@ -2795,7 +2795,7 @@ Hotplug_Devlist *disk_list = disk_list_head; for (i = 1; disk_list; i++, disk_list = disk_list->next) { if ((disk_list->dev_type == DTYPE_DIRECT) && (disk_list->dev_location == SENA)) { - if (disk_list->f_flag != NULL) { + if (disk_list->f_flag != 0) { if (enc_type == DAK_ENC_TYPE) { (void) fprintf(stdout, MSGSTR(5665, " %d: Box Name: \"%s\" slot %d\n"), diff --git a/usr/src/cmd/luxadm/qlgcupdate.c b/usr/src/cmd/luxadm/qlgcupdate.c index 404f4b7c06..07b6941b91 100644 --- a/usr/src/cmd/luxadm/qlgcupdate.c +++ b/usr/src/cmd/luxadm/qlgcupdate.c @@ -159,8 +159,8 @@ q_qlgc_update(unsigned int verbose, char *file) * is "sbus@12". They are initialized to a random value and are * set such that they are not equal initially. */ - static char port1[MAXNAMELEN] = {NULL}; - static char port2[MAXNAMELEN] = {NULL}; + static char port1[MAXNAMELEN] = { 0 }; + static char port2[MAXNAMELEN] = { 0 }; if (file) { fflag++; @@ -401,8 +401,8 @@ q_findversion(int verbose, int index, uchar_t *version, uint16_t *chip_id) { int fd, ntries; struct ifp_fm_version *version_buffer = NULL; - char prom_ver[100] = {NULL}; - char mcode_ver[100] = {NULL}; + char prom_ver[100] = { 0 }; + char mcode_ver[100] = { 0 }; fcio_t fcio; if (strstr(&pcibus_list[index][0], fc_trans)) { @@ -516,7 +516,7 @@ q_findfileversion(char *dl_fcode, uchar_t *version_file, uint16_t *file_id, { int mark; int qlc_offset = 0; - char temp[4] = {NULL}; + char temp[4] = { 0 }; /* @@ -1328,7 +1328,7 @@ emulex_fcodeversion(di_node_t node, uchar_t *ver) { promprop)) != NULL) && (strcmp(promname, "fcode-version") == 0)) { size = di_prom_prop_data(promprop, &ver_data); - (void) memset(ver, NULL, size); + (void) memset(ver, 0, size); (void) memcpy(ver, ver_data, size); found = 1; } diff --git a/usr/src/cmd/mandoc/lib.in b/usr/src/cmd/mandoc/lib.in index 0d65eeb086..9e42725de5 100644 --- a/usr/src/cmd/mandoc/lib.in +++ b/usr/src/cmd/mandoc/lib.in @@ -77,6 +77,7 @@ LINE("libtecla", "Interactive Command Line Input Library (libtecla, \\-ltecla)") LINE("libtnfctl", "TNF Probe Control Library (libtnfctl, \\-ltnfctl)") LINE("libtsol", "Trusted Extensions Library (libtsol, \\-ltsol)") LINE("libumem", "Object-Caching Memory Allocation Library (libumem, \\-lumem") +LINE("libutempter", "UTEMPTER Library (libutempter, \\-lutempter)") LINE("libuuid", "UUID Library (libuuid, \\-luuid)") LINE("libvolmgt", "Volume Management Library (libvolmgt, \\-lvolmgt)") LINE("libxcurses", "X/Open Curses Library (libxcurses, \\-lxcurses)") diff --git a/usr/src/cmd/mandoc/msec.in b/usr/src/cmd/mandoc/msec.in index 10861ddd07..09069603b7 100644 --- a/usr/src/cmd/mandoc/msec.in +++ b/usr/src/cmd/mandoc/msec.in @@ -88,6 +88,7 @@ LINE("3SYSEVENT", "System Event Library Functions") LINE("3TECLA", "Interactive Command-line Input Library Functions") LINE("3TNF", "TNF Library Functions") LINE("3TSOL", "Trusted Extensions Library Functions") +LINE("3UTEMPTER", "UTEMPTER Library Functions") LINE("3UUID", "Universally Unique Identifier Library Functions") LINE("3VOLMGT", "Volume Management Library Functions") LINE("3XCURSES", "X/Open Curses Library Functions") diff --git a/usr/src/cmd/mdb/common/mdb/mdb_cmds.c b/usr/src/cmd/mdb/common/mdb/mdb_cmds.c index cd50cdce17..9943773424 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_cmds.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_cmds.c @@ -1956,14 +1956,14 @@ cmd_findsym(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) } else value = argv[i].a_un.a_val; - if (value != NULL) + if (value != (uintptr_t)NULL) symlist[len++] = value; } if (flags & DCMD_ADDRSPEC) symlist[len++] = addr; - symlist[len] = NULL; + symlist[len] = (uintptr_t)NULL; if (optg) type = MDB_TGT_BIND_GLOBAL | MDB_TGT_TYPE_FUNC; diff --git a/usr/src/cmd/mdb/common/modules/genunix/streams.c b/usr/src/cmd/mdb/common/modules/genunix/streams.c index 245fca6070..7f18b59f23 100644 --- a/usr/src/cmd/mdb/common/modules/genunix/streams.c +++ b/usr/src/cmd/mdb/common/modules/genunix/streams.c @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + */ + #include <mdb/mdb_modapi.h> #include <mdb/mdb_ks.h> @@ -147,7 +151,7 @@ static const struct str_flags stdf[] = { { SF(STRCLOSE), "wait for a close to complete" }, { SF(SNDMREAD), "used for read notification" }, { SF(OLDNDELAY), "use old NDELAY TTY semantics" }, - { SF(0x00020000), "unused" }, + { SF(STRXPG4TTY), "Use XPG4 TTY semantics" }, { SF(0x00040000), "unused" }, { SF(STRTOSTOP), "block background writes" }, { SF(STRCMDWAIT), "someone is doing an _I_CMD" }, diff --git a/usr/src/cmd/mdb/common/modules/sd/sd.c b/usr/src/cmd/mdb/common/modules/sd/sd.c index 3de82ff809..7e87cf005b 100644 --- a/usr/src/cmd/mdb/common/modules/sd/sd.c +++ b/usr/src/cmd/mdb/common/modules/sd/sd.c @@ -139,7 +139,7 @@ buf_avforw_walk_step(mdb_walk_state_t *wsp) } status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data, - wsp->walk_cbdata); + wsp->walk_cbdata); wsp->walk_addr = (uintptr_t)(((buf_t *)wsp->walk_data)->av_forw); return (status); @@ -221,37 +221,37 @@ static void dump_xbuf_attr(struct __ddi_xbuf_attr *xba_ptr, uintptr_t mem_addr) { mdb_printf("0x%8lx:\tmutex\t\tallocsize\tpending\n", - mem_addr + offsetof(struct __ddi_xbuf_attr, xa_mutex)); + mem_addr + offsetof(struct __ddi_xbuf_attr, xa_mutex)); mdb_printf(" \t%lx\t\t%d\t\t%d\n", - xba_ptr->xa_mutex._opaque[0], xba_ptr->xa_allocsize, - xba_ptr->xa_pending); + xba_ptr->xa_mutex._opaque[0], xba_ptr->xa_allocsize, + xba_ptr->xa_pending); mdb_printf("0x%8lx:\tactive_limit\tactive_count\tactive_lowater\n", - mem_addr + offsetof(struct __ddi_xbuf_attr, xa_active_limit)); + mem_addr + offsetof(struct __ddi_xbuf_attr, xa_active_limit)); mdb_printf(" \t%lx\t\t%lx\t\t%lx\n", - xba_ptr->xa_active_limit, xba_ptr->xa_active_count, - xba_ptr->xa_active_lowater); + xba_ptr->xa_active_limit, xba_ptr->xa_active_count, + xba_ptr->xa_active_lowater); mdb_printf("0x%8lx:\theadp\t\ttailp\n", - mem_addr + offsetof(struct __ddi_xbuf_attr, xa_headp)); + mem_addr + offsetof(struct __ddi_xbuf_attr, xa_headp)); mdb_printf(" \t%lx%c\t%lx\n", - xba_ptr->xa_headp, (xba_ptr->xa_headp == 0?'\t':' '), - xba_ptr->xa_tailp); + xba_ptr->xa_headp, (xba_ptr->xa_headp == 0?'\t':' '), + xba_ptr->xa_tailp); mdb_printf( "0x%8lx:\treserve_mutex\treserve_limit\treserve_count\treserve_headp\n", - mem_addr + offsetof(struct __ddi_xbuf_attr, xa_reserve_mutex)); + mem_addr + offsetof(struct __ddi_xbuf_attr, xa_reserve_mutex)); mdb_printf(" \t%lx\t\t%lx\t\t%lx\t\t%lx\n", - xba_ptr->xa_reserve_mutex._opaque[0], xba_ptr->xa_reserve_limit, - xba_ptr->xa_reserve_count, xba_ptr->xa_reserve_headp); + xba_ptr->xa_reserve_mutex._opaque[0], xba_ptr->xa_reserve_limit, + xba_ptr->xa_reserve_count, xba_ptr->xa_reserve_headp); mdb_printf("0x%8lx:\ttimeid\t\ttq\n", - mem_addr + offsetof(struct __ddi_xbuf_attr, xa_timeid)); + mem_addr + offsetof(struct __ddi_xbuf_attr, xa_timeid)); mdb_printf(" \t%lx%c\t%lx\n", - xba_ptr->xa_timeid, (xba_ptr->xa_timeid == 0?'\t':' '), - xba_ptr->xa_tq); + xba_ptr->xa_timeid, (xba_ptr->xa_timeid == 0?'\t':' '), + xba_ptr->xa_tq); } /* @@ -278,7 +278,7 @@ init_softstate_members(mdb_walk_state_t *wsp) SD_DATA(valid_root_count) = 0; if (mdb_vread((void *)&SD_DATA(sd_state_data), - sizeof (sd_state_str_t), wsp->walk_addr) == -1) { + sizeof (sd_state_str_t), wsp->walk_addr) == -1) { mdb_warn("failed to sd_state at %p", wsp->walk_addr); return (WALK_ERR); } @@ -333,7 +333,7 @@ sd_state_walk_init(mdb_walk_state_t *wsp) static int ssd_state_walk_init(mdb_walk_state_t *wsp) { - if (wsp->walk_addr == NULL && + if (wsp->walk_addr == (uintptr_t)NULL && mdb_readvar(&wsp->walk_addr, "ssd_state") == -1) { mdb_warn("failed to read 'ssd_state'"); return (WALK_ERR); @@ -381,7 +381,7 @@ sd_state_walk_step(mdb_walk_state_t *wsp) } status = wsp->walk_callback((uintptr_t)tp, wsp->walk_data, - wsp->walk_cbdata); + wsp->walk_cbdata); if (tp != 0) { /* Count the number of non-zero un entries. */ SD_DATA(valid_root_count++); @@ -442,7 +442,7 @@ process_semo_sleepq(uintptr_t walk_addr, int silent) } if (mdb_vread((void *)¤tBuf, sizeof (buf_t), - rootBuf) == -1) { + rootBuf) == -1) { mdb_warn("failed to read buf at %p", rootBuf); return (FAIL); } @@ -459,7 +459,7 @@ process_semo_sleepq(uintptr_t walk_addr, int silent) if (rootBuf == 0) { mdb_printf("------------------------------\n"); mdb_printf("Processed %d SEMOCLOSE SLEEP Q entries\n", - semo_sleepq_count); + semo_sleepq_count); mdb_printf("------------------------------\n"); } @@ -498,9 +498,9 @@ process_sdlun_waitq(uintptr_t walk_addr, int silent) } if (mdb_vread(¤tBuf, sizeof (buf_t), - (uintptr_t)rootBuf) == -1) { + (uintptr_t)rootBuf) == -1) { mdb_warn("failed to read buf at %p", - (uintptr_t)rootBuf); + (uintptr_t)rootBuf); return (FAIL); } @@ -550,7 +550,7 @@ process_xbuf(uintptr_t xbuf_attr, int silent) /* Process the Xbuf Attr struct for a device. */ if (mdb_vread((void *)&xba, sizeof (struct __ddi_xbuf_attr), - xbuf_attr) == -1) { + xbuf_attr) == -1) { mdb_warn("failed to read xbuf_attr at %p", xbuf_attr); return (FAIL); } @@ -578,9 +578,9 @@ process_xbuf(uintptr_t xbuf_attr, int silent) } if (mdb_vread((void *)&xba_current, sizeof (buf_t), - (uintptr_t)xba_root) == -1) { + (uintptr_t)xba_root) == -1) { mdb_warn("failed to read buf at %p", - (uintptr_t)xba_root); + (uintptr_t)xba_root); return (FAIL); } if (!silent) { @@ -612,10 +612,10 @@ static void print_footer(const void *walk_data) { if (SD_DATA_IN_CBACK(current_list_count) >= - (SD_DATA_IN_CBACK(sd_state_data.n_items) - 1)) { + (SD_DATA_IN_CBACK(sd_state_data.n_items) - 1)) { mdb_printf("---------------------------\n"); mdb_printf("Processed %d UN softstate entries\n", - SD_DATA_IN_CBACK(valid_root_count)); + SD_DATA_IN_CBACK(valid_root_count)); mdb_printf("---------------------------\n"); } } @@ -651,13 +651,13 @@ sd_callback(uintptr_t addr, const void *walk_data, void *flg_silent) if (SD_DATA_IN_CBACK(current_list_count) == 0) { mdb_printf("walk_addr = %lx\n", SD_DATA_IN_CBACK(sd_state)); mdb_printf("walking sd_state units via ptr: %lx\n", - SD_DATA_IN_CBACK(current_root)); + SD_DATA_IN_CBACK(current_root)); mdb_printf("%d entries in sd_state table\n", - SD_DATA_IN_CBACK(sd_state_data.n_items)); + SD_DATA_IN_CBACK(sd_state_data.n_items)); } mdb_printf("\nun %d: %lx\n", SD_DATA_IN_CBACK(current_list_count), - addr); + addr); mdb_printf("--------------\n"); @@ -691,7 +691,7 @@ sd_callback(uintptr_t addr, const void *walk_data, void *flg_silent) /* process device semoclose wait Q */ if (sdLun.un_semoclose._opaque[1] == 0) { process_semo_sleepq((uintptr_t)sdLun.un_semoclose._opaque[0], - silent); + silent); } /* print the actual number of soft state processed */ @@ -725,7 +725,7 @@ dcmd_sd_state(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) /* Enable the silent mode if '-s' option specified the user */ if (mdb_getopts(argc, argv, 's', MDB_OPT_SETBITS, TRUE, &silent, NULL) - != argc) { + != argc) { return (DCMD_USAGE); } @@ -764,7 +764,7 @@ dcmd_sd_state(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) /* process device's semoclose wait Q */ if (sdLun.un_semoclose._opaque[1] == 0) { process_semo_sleepq( - (uintptr_t)sdLun.un_semoclose._opaque[0], silent); + (uintptr_t)sdLun.un_semoclose._opaque[0], silent); } } return (DCMD_OK); @@ -797,7 +797,7 @@ dcmd_ssd_state(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) /* Enable the silent mode if '-s' option specified the user */ if (mdb_getopts(argc, argv, 's', MDB_OPT_SETBITS, TRUE, &silent, NULL) - != argc) { + != argc) { return (DCMD_USAGE); } @@ -835,7 +835,7 @@ dcmd_ssd_state(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) /* process device's semoclose wait Q */ if (sdLun.un_semoclose._opaque[1] == 0) { process_semo_sleepq( - (uintptr_t)sdLun.un_semoclose._opaque[0], silent); + (uintptr_t)sdLun.un_semoclose._opaque[0], silent); } } return (DCMD_OK); @@ -872,7 +872,7 @@ dcmd_buf_avforw(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) */ if ((flags & DCMD_ADDRSPEC)) { mdb_pwalk("buf_avforw", buf_callback, (void *)&buf_entries, - addr); + addr); return (DCMD_OK); } else { mdb_printf("buffer address required with the command\n"); diff --git a/usr/src/cmd/mdb/i86pc/modules/unix/unix.c b/usr/src/cmd/mdb/i86pc/modules/unix/unix.c index bd7dfda6ed..c3b7e809e4 100644 --- a/usr/src/cmd/mdb/i86pc/modules/unix/unix.c +++ b/usr/src/cmd/mdb/i86pc/modules/unix/unix.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2018 OmniOS Community Edition (OmniOSce) Association. * Copyright 2019 Joyent, Inc. */ diff --git a/usr/src/cmd/mdb/intel/Makefile.kmdb b/usr/src/cmd/mdb/intel/Makefile.kmdb index fea041a6dc..6151a2e46a 100644 --- a/usr/src/cmd/mdb/intel/Makefile.kmdb +++ b/usr/src/cmd/mdb/intel/Makefile.kmdb @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Copyright 2019, Joyent, Inc. +# Copyright 2019 Joyent, Inc. # PROMSRCS += \ diff --git a/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c b/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c index 728ece57a8..c03a73f31e 100644 --- a/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c +++ b/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c @@ -24,8 +24,8 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2018, Joyent, Inc. * Copyright 2019 Doma GergÅ‘ Mihály <doma.gergo.mihaly@gmail.com> + * Copyright 2018 Joyent, Inc. */ /* diff --git a/usr/src/cmd/mdb/sparc/kmdb/kaif.c b/usr/src/cmd/mdb/sparc/kmdb/kaif.c index b8a8565b16..6251b2e30e 100644 --- a/usr/src/cmd/mdb/sparc/kmdb/kaif.c +++ b/usr/src/cmd/mdb/sparc/kmdb/kaif.c @@ -397,7 +397,7 @@ kaif_wapt_reserve(kmdb_wapt_t *wp) else addrp = &kaif_vwapt_addr; - if (*addrp != NULL) + if (*addrp != 0) return (set_errno(EMDB_WPTOOMANY)); *addrp = wp->wp_addr; @@ -412,8 +412,8 @@ kaif_wapt_release(kmdb_wapt_t *wp) uint64_t *addrp = (wp->wp_type == DPI_WAPT_TYPE_PHYS ? &kaif_pwapt_addr : &kaif_vwapt_addr); - ASSERT(*addrp != NULL); - *addrp = NULL; + ASSERT(*addrp != 0); + *addrp = 0; } /*ARGSUSED*/ @@ -487,10 +487,10 @@ kaif_wapt_set_regs(void) ASSERT((kaif_lsuctl & ~KAIF_LSUCTL_WAPT_MASK) == NULL); - lsu = rdasi(ASI_LSU, NULL); + lsu = rdasi(ASI_LSU, (uintptr_t)NULL); lsu &= ~KAIF_LSUCTL_WAPT_MASK; lsu |= kaif_lsuctl; - wrasi(ASI_LSU, NULL, lsu); + wrasi(ASI_LSU, (uintptr_t)NULL, lsu); #endif /* sun4v */ } @@ -501,9 +501,9 @@ kaif_wapt_clear_regs(void) * Sun4v doesn't have watch point regs */ #ifndef sun4v - uint64_t lsu = rdasi(ASI_LSU, NULL); + uint64_t lsu = rdasi(ASI_LSU, (uintptr_t)NULL); lsu &= ~KAIF_LSUCTL_WAPT_MASK; - wrasi(ASI_LSU, NULL, lsu); + wrasi(ASI_LSU, (uintptr_t)NULL, lsu); #endif /* sun4v */ } @@ -742,7 +742,7 @@ static const mdb_bitmask_t krm_flag_bits[] = { { "M_PE", KAIF_CRUMB_F_MAIN_OBPPENT, KAIF_CRUMB_F_MAIN_OBPPENT }, { "M_NRM", KAIF_CRUMB_F_MAIN_NORMAL, KAIF_CRUMB_F_MAIN_NORMAL }, { "I_RE", KAIF_CRUMB_F_IVEC_REENTER, KAIF_CRUMB_F_IVEC_REENTER }, - { "I_OBP", KAIF_CRUMB_F_IVEC_INOBP, KAIF_CRUMB_F_IVEC_INOBP }, + { "I_OBP", KAIF_CRUMB_F_IVEC_INOBP, KAIF_CRUMB_F_IVEC_INOBP }, { "I_NRM", KAIF_CRUMB_F_IVEC_NORMAL, KAIF_CRUMB_F_IVEC_NORMAL }, { "O_NRM", KAIF_CRUMB_F_OBP_NORMAL, KAIF_CRUMB_F_OBP_NORMAL }, { "O_REVEC", KAIF_CRUMB_F_OBP_REVECT, KAIF_CRUMB_F_OBP_REVECT }, @@ -798,7 +798,7 @@ kaif_dump_crumbs(uintptr_t addr, int cpuid) { int i; - if (addr != NULL) { + if (addr != (uintptr_t)NULL) { /* dump_crumb will protect us from bogus addresses */ dump_crumb((kaif_crumb_t *)addr); diff --git a/usr/src/cmd/mdb/sparc/kmdb/kmdb_kdi_isadep.c b/usr/src/cmd/mdb/sparc/kmdb/kmdb_kdi_isadep.c index b7cc077dee..0b7b150c40 100644 --- a/usr/src/cmd/mdb/sparc/kmdb/kmdb_kdi_isadep.c +++ b/usr/src/cmd/mdb/sparc/kmdb/kmdb_kdi_isadep.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * SPARC-specific portions of the KDI */ @@ -66,7 +64,8 @@ kdi_cpu_ready_iter(int (*cb)(int, void *), void *arg) static int kdi_xc_one(int cpuid, void (*cb)(void)) { - return (mdb.m_kdi->mkdi_xc_one(cpuid, (void (*)())cb, NULL, NULL)); + return (mdb.m_kdi->mkdi_xc_one(cpuid, (void (*)())cb, (uintptr_t)NULL, + (uintptr_t)NULL)); } /*ARGSUSED1*/ @@ -157,7 +156,7 @@ kdi_halt_cpu(int cpuid, void *state_saverp) if (state != DPI_CPU_STATE_MASTER && state != DPI_CPU_STATE_SLAVE) { res = kdi_xc_one(cpuid, state_saver); - rc = 1; + rc = 1; if (res == KDI_XC_RES_OK) msg = "accepted the"; diff --git a/usr/src/cmd/mdb/sparc/kmdb/kmdb_makecontext.c b/usr/src/cmd/mdb/sparc/kmdb/kmdb_makecontext.c index 1d3781f1e9..3b233209de 100644 --- a/usr/src/cmd/mdb/sparc/kmdb/kmdb_makecontext.c +++ b/usr/src/cmd/mdb/sparc/kmdb/kmdb_makecontext.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Context-saving routine used for pipelines. Designed for use only * with kmdb_setcontext, and with the assumption that func() will never @@ -59,6 +57,6 @@ kmdb_makecontext(ucontext_t *ucp, void (*func)(void *), void *arg, caddr_t stk, ucp->uc_mcontext.gregs[REG_nPC] = (greg_t)func + 4; ucp->uc_mcontext.gregs[REG_O0] = (greg_t)arg; ucp->uc_mcontext.gregs[REG_SP] = (greg_t)(stack - STACK_BIAS); - ucp->uc_mcontext.gregs[REG_O7] = NULL; - ucp->uc_mcontext.gregs[REG_G7] = NULL; + ucp->uc_mcontext.gregs[REG_O7] = 0; + ucp->uc_mcontext.gregs[REG_G7] = 0; } diff --git a/usr/src/cmd/mdb/sparc/kmdb/kmdb_promif_isadep.c b/usr/src/cmd/mdb/sparc/kmdb/kmdb_promif_isadep.c index 6db4861bd7..ff7aa494a0 100644 --- a/usr/src/cmd/mdb/sparc/kmdb/kmdb_promif_isadep.c +++ b/usr/src/cmd/mdb/sparc/kmdb/kmdb_promif_isadep.c @@ -75,7 +75,7 @@ kmdb_prom_get_ddi_prop(kmdb_auxv_t *kav, char *propname) ssize_t len; char *val; - if ((node = prom_finddevice("/options")) == NULL) + if ((node = prom_finddevice("/options")) == 0) return (NULL); if ((len = prom_getproplen(node, propname)) < 0) diff --git a/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c b/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c index 50f60516a1..2839f47219 100644 --- a/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c +++ b/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c @@ -17,8 +17,6 @@ * implemented. */ -#ifndef _KMDB - #include <mdb/mdb_gcore.h> /* ARGSUSED */ @@ -54,5 +52,3 @@ gcore_prgetrvals(mdb_klwp_t *lwp, long *rval1, long *rval2) { return (0); } - -#endif /* _KMDB */ diff --git a/usr/src/cmd/mdb/sparc/modules/intr/intr.c b/usr/src/cmd/mdb/sparc/modules/intr/intr.c index cdfbf1c4ce..1ffb7edcce 100644 --- a/usr/src/cmd/mdb/sparc/modules/intr/intr.c +++ b/usr/src/cmd/mdb/sparc/modules/intr/intr.c @@ -64,7 +64,7 @@ static int detailed = 0; /* Print detailed view */ static int intr_walk_init(mdb_walk_state_t *wsp) { - wsp->walk_addr = NULL; + wsp->walk_addr = (uintptr_t)NULL; return (WALK_NEXT); } diff --git a/usr/src/cmd/mdb/sparc/v9/genunix/Makefile b/usr/src/cmd/mdb/sparc/v9/genunix/Makefile index 00dadda34b..8bfb17c607 100644 --- a/usr/src/cmd/mdb/sparc/v9/genunix/Makefile +++ b/usr/src/cmd/mdb/sparc/v9/genunix/Makefile @@ -38,6 +38,7 @@ KMODSRCS = \ MODSRCS = \ $(COMMONSRCS) \ + gcore.c \ typegraph.c # diff --git a/usr/src/cmd/mdb/sun4u/modules/opl/oplhwd/oplhwd.c b/usr/src/cmd/mdb/sun4u/modules/opl/oplhwd/oplhwd.c index 48aed6c313..5bdea9bc81 100644 --- a/usr/src/cmd/mdb/sun4u/modules/opl/oplhwd/oplhwd.c +++ b/usr/src/cmd/mdb/sun4u/modules/opl/oplhwd/oplhwd.c @@ -23,7 +23,6 @@ * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/mdb_modapi.h> #include <sys/types.h> @@ -151,7 +150,7 @@ dumpmemhwd(hwd_memory_t *memp, int v, int mv) mdb_printf("\tDIMM %d\tstatus\t0x%x (%s)\n", i, memp->mem_dimms[i].dimm_status, hwd_stat_decode( - memp->mem_dimms[i].dimm_status)); + memp->mem_dimms[i].dimm_status)); continue; } mdb_printf("\tDIMM %d\tstatus\t0x%x (%s)\tcapacity\t0x%llx\n", @@ -241,16 +240,16 @@ dumpchiphwd(hwd_cpu_chip_t *chipp, int ch, int v, int mv) mdb_printf("\tsharing\t%x\n", corep->core_l2_cache_sharing); mdb_printf("\t\tITLB entries\t0x%x\tDTLB entries " - "0x%x\n", corep->core_num_itlb_entries, + "0x%x\n", corep->core_num_itlb_entries, corep->core_num_dtlb_entries); } for (cp = 0; cp < HWD_CPUS_PER_CORE; cp++) { cpup = &corep->core_cpus[cp]; mdb_printf("\t\tCPU %d:\tstatus\t0x%x (%s)\tcpuid" - " = 0x%x\n", cp, cpup->cpu_status, - hwd_stat_decode(cpup->cpu_status), - cpup->cpu_cpuid); + " = 0x%x\n", cp, cpup->cpu_status, + hwd_stat_decode(cpup->cpu_status), + cpup->cpu_cpuid); if (v & DUMP_COMP_NAME) mdb_printf("\t\t\tcomponent name:%s\n", cpup->cpu_component_name); @@ -320,10 +319,10 @@ dumpahwd(int bd, int v) if (mdb_vread(&boardcfg, sizeof (opl_board_cfg_t), - tmptr + (bd * sizeof (opl_board_cfg_t))) == -1) { + tmptr + (bd * sizeof (opl_board_cfg_t))) == -1) { mdb_warn("failed to read opl_board_cfg at %p", - (tmptr + (bd * sizeof (opl_board_cfg_t)))); - return; + (tmptr + (bd * sizeof (opl_board_cfg_t)))); + return; } if (boardcfg.cfg_hwd == NULL) { @@ -335,9 +334,9 @@ dumpahwd(int bd, int v) /* We always need the header, for offsets */ if (mdb_vread(&hwd_hdr, sizeof (hwd_header_t), - (uintptr_t)boardcfg.cfg_hwd) == -1) { + (uintptr_t)boardcfg.cfg_hwd) == -1) { mdb_warn("failed to read hwd_header_t at %p\n", - boardcfg.cfg_hwd); + boardcfg.cfg_hwd); return; } @@ -370,7 +369,7 @@ dumpahwd(int bd, int v) if (mdb_vread(&hwd_sb_status, sizeof (hwd_sb_status_t), (uintptr_t)statusp) == -1) { mdb_warn("failed to read hwd_sb_status_t at %p\n", - statusp); + statusp); return; } mdb_printf("\nSTATUS:\tBoard\tStatus\n"); @@ -388,7 +387,7 @@ dumpahwd(int bd, int v) if (mdb_vread(&hwd_dinfo, sizeof (hwd_domain_info_t), (uintptr_t)dinfop) == -1) { mdb_warn("failed to read hwd_domain_info_t at %p\n", - dinfop); + dinfop); return; } mdb_printf("\nDomain info:\tReset reason\t0x%x", @@ -445,7 +444,7 @@ dumpahwd(int bd, int v) cmup = &hwd_sb.sb_cmu.cmu_ch; mdb_printf("\nCMU CH: status\t0x%x (%s)\tportid=0x%x" - " LSB = 0x%x\n", + " LSB = 0x%x\n", cmup->chan_status, hwd_stat_decode(cmup->chan_status), cmup->chan_portid, ((cmup->chan_portid) >> 4)); @@ -504,16 +503,16 @@ dumpahwd(int bd, int v) scp = &hwd_sb.sb_cmu.cmu_scs[sc]; - if (DONT_BOTHER(scp->sc_status, mv)) - mdb_printf("\nSC %d:\tstatus\t0x%x (%s)\n", - sc, scp->sc_status, - hwd_stat_decode(scp->sc_status)); - else { - mdb_printf("\nSC %d:\tstatus\t0x%x (%s)\t", - sc, scp->sc_status, - hwd_stat_decode(scp->sc_status)); - mdb_printf("register addr\t0x%llx\n", - scp->sc_register_address); + if (DONT_BOTHER(scp->sc_status, mv)) { + mdb_printf("\nSC %d:\tstatus\t0x%x (%s)\n", + sc, scp->sc_status, + hwd_stat_decode(scp->sc_status)); + } else { + mdb_printf("\nSC %d:\tstatus\t0x%x (%s)\t", + sc, scp->sc_status, + hwd_stat_decode(scp->sc_status)); + mdb_printf("register addr\t0x%llx\n", + scp->sc_register_address); } } @@ -607,7 +606,7 @@ oplhwd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) if (bdi < 0) { /* get active boards */ for (bdi = 0; bdi < OPL_MAX_BOARDS; bdi++) - dumpahwd(bdi, v_mode); + dumpahwd(bdi, v_mode); } else { dumpahwd(bdi, v_mode); } @@ -621,22 +620,22 @@ static void oplhwd_help(void) { mdb_printf("oplhwd will dump HWD only for a particular board" - " on which,"); + " on which,"); mdb_printf("an earlier DR operation has been executed.\n"); mdb_printf("-b NUM \tlist oplhwd entry for a board\n" - "-s \t\tlist oplhwd entry with SB status\n" - "-d \t\tlist oplhwd entry with Domain info.\n" - "-i \t\tlist oplhwd entry with SB info.\n" - "-h \t\tlist oplhwd entry with Chips details\n" - "-o \t\tlist oplhwd entry with Core details\n" - "-m \t\tlist oplhwd entry with Memory info.\n" - "-k \t\tlist oplhwd entry with Memory Bank info.\n" - "-r \t\tlist oplhwd entry with SC info.\n" - "-c \t\tlist oplhwd entry with CMU channels\n" - "-p \t\tlist oplhwd entry with PCI channels\n" - "-a \t\tlist oplhwd entry with all possible info.\n" - "-C \t\tlist oplhwd entry with component names\n" - "-v \t\tlist oplhwd entry in verbose mode\n"); + "-s \t\tlist oplhwd entry with SB status\n" + "-d \t\tlist oplhwd entry with Domain info.\n" + "-i \t\tlist oplhwd entry with SB info.\n" + "-h \t\tlist oplhwd entry with Chips details\n" + "-o \t\tlist oplhwd entry with Core details\n" + "-m \t\tlist oplhwd entry with Memory info.\n" + "-k \t\tlist oplhwd entry with Memory Bank info.\n" + "-r \t\tlist oplhwd entry with SC info.\n" + "-c \t\tlist oplhwd entry with CMU channels\n" + "-p \t\tlist oplhwd entry with PCI channels\n" + "-a \t\tlist oplhwd entry with all possible info.\n" + "-C \t\tlist oplhwd entry with component names\n" + "-v \t\tlist oplhwd entry in verbose mode\n"); } /* diff --git a/usr/src/cmd/mdb/sun4u/modules/unix/sfmmu.c b/usr/src/cmd/mdb/sun4u/modules/unix/sfmmu.c index 20b59d7e56..ce4a1035f1 100644 --- a/usr/src/cmd/mdb/sun4u/modules/unix/sfmmu.c +++ b/usr/src/cmd/mdb/sun4u/modules/unix/sfmmu.c @@ -131,7 +131,7 @@ sfmmu_vtop(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) if (ret == 0) { mdb_printf("address space %p: virtual %lr mapped to physical " - "%llr", asp, addr, paddr); + "%llr", asp, addr, paddr); } else { return (DCMD_ERR); } @@ -174,7 +174,7 @@ sfmmu_vtop_common(struct as *asp, uintptr_t addr, physaddr_t *pap) static int sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, - physaddr_t *pap) + physaddr_t *pap) { struct hmehash_bucket *uhme_hash; struct hmehash_bucket *khme_hash; @@ -225,7 +225,7 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, } ism_blkp = &mism_blk; ism_map = ism_blkp->iblk_maps; - for (i = 0; ism_map[i].imap_ismhat && i < ISM_MAP_SLOTS; i++) { + for (i = 0; i < ISM_MAP_SLOTS && ism_map[i].imap_ismhat; i++) { if ((caddr_t)addr >= ism_start(ism_map[i]) && (caddr_t)addr < ism_end(ism_map[i])) { sfmmup = ism_hatid = ism_map[i].imap_ismhat; @@ -252,18 +252,18 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, #ifdef __sparcv9 SFMMU_VTOP_DBG_DBG("hblktag=%lx %lx\n", - (uint64_t)hblktag.htag_tag[0], - (uint64_t)hblktag.htag_tag[1]); + (uint64_t)hblktag.htag_tag[0], + (uint64_t)hblktag.htag_tag[1]); #else SFMMU_VTOP_DBG_DBG("hblktag=%llx\n", - (uint64_t)hblktag.htag_tag); + (uint64_t)hblktag.htag_tag); #endif hmebp = shmebp = HME_HASH_FUNCTION(sfmmup, addr, hmeshift); SFMMU_VTOP_DBG_DBG("hmebp=%p\n", hmebp); if (mdb_vread(&mbucket, sizeof (mbucket), - (uintptr_t)hmebp) == -1) { + (uintptr_t)hmebp) == -1) { mdb_warn("couldn't read mbucket at %p\n", hmebp); return (DCMD_ERR); } @@ -271,7 +271,7 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, hmebp = &mbucket; for (hmeblkp = hmebp->hmeblkp; hmeblkp; - hmeblkp = hmeblkp->hblk_next) { + hmeblkp = hmeblkp->hblk_next) { SFMMU_VTOP_DBG_DBG("hmeblkp=%p\n", hmeblkp); @@ -279,9 +279,9 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, break; if (mdb_vread(&mhmeblkmax, sizeof (struct hme_blk), - (uintptr_t)hmeblkp) == -1) { + (uintptr_t)hmeblkp) == -1) { mdb_warn("couldn't read hme_blk at %p\n", - hmeblkp); + hmeblkp); return (DCMD_ERR); } @@ -298,7 +298,7 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, sfmmu_vtop_print_hmeblk(hmeblkp); sfhmep = mdb_sfmmu_hblktohme(hmeblkp, (caddr_t)addr, - &sfhmeinx); + &sfhmeinx); SFMMU_VTOP_DBG_DBG("sfhmeinx=%d ", sfhmeinx); @@ -307,28 +307,26 @@ sfmmu_vtop_impl(uintptr_t addr, sfmmu_t *sfmmup, sfmmu_t *msfmmup, sizeof (struct sf_hment) * (sfhmeinx - 1); if (mdb_vread(sfhmep, sizeof (struct sf_hment), - thmeblkp) == -1) { + thmeblkp) == -1) { mdb_warn("couldn't read msfhme at %p\n", - sfhmep); + sfhmep); return (DCMD_ERR); } } SFMMU_VTOP_DBG_VRB("sfmmup=%p hmebp=%p hmeblkp=%p\n", - sfmmup, shmebp, thmeblkp); + sfmmup, shmebp, thmeblkp); tte = sfhmep->hme_tte; SFMMU_VTOP_DBG_VRB("tte=%llx ", tte.ll); if (TTE_IS_VALID(&tte)) { start_pfn = TTE_TO_TTEPFN(&tte); *pap = (start_pfn << MMU_PAGESHIFT) + - (addr & TTE_PAGE_OFFSET(tte.tte_size)); + (addr & TTE_PAGE_OFFSET(tte.tte_size)); pfn = *pap >> MMU_PAGESHIFT; pp = (sfhmep->hme_page != 0) ? - sfhmep->hme_page + (pfn - start_pfn) : - 0; - SFMMU_VTOP_DBG_VRB("pfn=%lx pp=%p\n", - pfn, pp); + sfhmep->hme_page + (pfn - start_pfn) : 0; + SFMMU_VTOP_DBG_VRB("pfn=%lx pp=%p\n", pfn, pp); ret = 0; } break; @@ -345,13 +343,13 @@ static void sfmmu_vtop_print_hmeblk(struct hme_blk *hmeblkp) { - if ((sfmmu_vtop_dbg & SFMMU_VTOP_DBG_DEBUG) == NULL) + if ((sfmmu_vtop_dbg & SFMMU_VTOP_DBG_DEBUG) == 0) return; mdb_printf(" hblk_nextpa=%llx\n", hmeblkp->hblk_nextpa); #ifdef __sparcv9 mdb_printf(" hblktag=%lx %lx\n", hmeblkp->hblk_tag.htag_tag[0], - hmeblkp->hblk_tag.htag_tag[1]); + hmeblkp->hblk_tag.htag_tag[1]); #else mdb_printf(" hblktag=%llx\n", hmeblkp->hblk_tag.htag_tag); #endif @@ -403,7 +401,7 @@ memseg_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) if (DCMD_HDRSPEC(flags)) mdb_printf("%<u>%?s %?s %?s %?s %?s%</u>\n", "ADDR", - "PAGES", "EPAGES", "BASE", "END"); + "PAGES", "EPAGES", "BASE", "END"); if (mdb_vread(&ms, sizeof (struct memseg), addr) == -1) { mdb_warn("can't read memseg at %#lx", addr); @@ -411,7 +409,7 @@ memseg_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) } mdb_printf("%0?lx %0?lx %0?lx %0?lx %0?lx\n", addr, - ms.pages, ms.epages, ms.pages_base, ms.pages_end); + ms.pages, ms.epages, ms.pages_base, ms.pages_end); return (DCMD_OK); } @@ -422,7 +420,7 @@ memseg_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) int memseg_walk_init(mdb_walk_state_t *wsp) { - if (wsp->walk_addr != NULL) { + if (wsp->walk_addr != (uintptr_t)NULL) { mdb_warn("memseg only supports global walks\n"); return (WALK_ERR); } @@ -535,9 +533,9 @@ tsbinfo_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) } if (mdb_getopts(argc, argv, - 'l', MDB_OPT_SETBITS, TRUE, &lflag, - 'a', MDB_OPT_SETBITS, TRUE, &aflag, - NULL) != argc) { + 'l', MDB_OPT_SETBITS, TRUE, &lflag, + 'a', MDB_OPT_SETBITS, TRUE, &aflag, + NULL) != argc) { return (DCMD_USAGE); } @@ -600,24 +598,24 @@ tsbinfo_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) UM_SLEEP); if (mdb_vread(tsbp, sizeof (struct tsbe) * entries, - (uintptr_t)tsbinfo.tsb_va) == -1) { + (uintptr_t)tsbinfo.tsb_va) == -1) { mdb_warn("failed to read TSB at %p", tsbinfo.tsb_va); return (DCMD_ERR); } mdb_printf( - "TSB @ %lx (%d entries)\n" - "%-?s %-17s %s\n" - "%<u>%-?s %1s %1s %-11s " - "%1s %1s %1s %1s %1s %1s %8s " - "%1s %1s %1s %1s %1s %1s %1s " - "%1s %1s %1s %1s %1s %1s%</u>\n", - tsbinfo.tsb_va, entries, "", "TAG", "TTE", - "ADDR", "I", "L", "VA 63:22", - "V", "S", "N", "I", "H", "S", "PA 42:13", - "N", "U", "R", "W", "E", "X", "L", - "P", "V", "E", "P", "W", "G"); + "TSB @ %lx (%d entries)\n" + "%-?s %-17s %s\n" + "%<u>%-?s %1s %1s %-11s " + "%1s %1s %1s %1s %1s %1s %8s " + "%1s %1s %1s %1s %1s %1s %1s " + "%1s %1s %1s %1s %1s %1s%</u>\n", + tsbinfo.tsb_va, entries, "", "TAG", "TTE", + "ADDR", "I", "L", "VA 63:22", + "V", "S", "N", "I", "H", "S", "PA 42:13", + "N", "U", "R", "W", "E", "X", "L", + "P", "V", "E", "P", "W", "G"); tsbend = tsbp + entries; for (tsbstart = tsbp; tsbp < tsbend; tsbp++) { @@ -626,8 +624,8 @@ tsbinfo_list(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) va = (caddr_t) (((uint64_t)tsbp->tte_tag.tag_vahi - << 32) + - tsbp->tte_tag.tag_valo); + << 32) + + tsbp->tte_tag.tag_valo); pa = (tsbp->tte_data.tte_pahi << 19) + tsbp->tte_data.tte_palo; mdb_printf("%0?lx %-1u %-1u %011lx " diff --git a/usr/src/cmd/mdb/sun4u/modules/unix/unix.c b/usr/src/cmd/mdb/sun4u/modules/unix/unix.c index 09303f5345..e43449f9db 100644 --- a/usr/src/cmd/mdb/sun4u/modules/unix/unix.c +++ b/usr/src/cmd/mdb/sun4u/modules/unix/unix.c @@ -676,7 +676,7 @@ ttrace_walk_init(mdb_walk_state_t *wsp) ttrace_cpu_data_t *tc; struct trap_trace_record *buf; - if (wsp->walk_addr != NULL) { + if (wsp->walk_addr != (uintptr_t)NULL) { mdb_warn("ttrace only supports global walks\n"); return (WALK_ERR); } @@ -965,7 +965,7 @@ httrace_walk_init(mdb_walk_state_t *wsp) struct htrap_trace_record *buf; htrap_trace_hdr_t *hdr; - if (wsp->walk_addr != NULL) { + if (wsp->walk_addr != (uintptr_t)NULL) { mdb_warn("httrace only supports global walks\n"); return (WALK_ERR); } @@ -1347,7 +1347,7 @@ vecint_walk_init(mdb_walk_state_t *wsp) { vecint_walk_data_t *vecint; - if (wsp->walk_addr != NULL) { + if (wsp->walk_addr != (uintptr_t)NULL) { mdb_warn("vecint walk only supports global walks\n"); return (WALK_ERR); } @@ -1378,13 +1378,14 @@ vecint_walk_step(mdb_walk_state_t *wsp) intr_vec_t iv; int status; - if (wsp->walk_addr == NULL) { + if (wsp->walk_addr == (uintptr_t)NULL) { while ((vecint->vec_idx < max) && ((wsp->walk_addr = - (uintptr_t)vecint->vec_table[vecint->vec_idx++]) == NULL)) + (uintptr_t)vecint->vec_table[vecint->vec_idx++]) == + (uintptr_t)NULL)) continue; } - if (wsp->walk_addr == NULL) + if (wsp->walk_addr == (uintptr_t)NULL) return (WALK_DONE); status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data, @@ -1443,7 +1444,7 @@ softint_walk_init(mdb_walk_state_t *wsp) { intr_vec_t *list; - if (wsp->walk_addr != NULL) { + if (wsp->walk_addr != (uintptr_t)NULL) { mdb_warn("softint walk only supports global walks\n"); return (WALK_ERR); } @@ -1471,7 +1472,7 @@ softint_walk_step(mdb_walk_state_t *wsp) intr_vec_t iv; int status; - if (wsp->walk_addr == NULL) + if (wsp->walk_addr == (uintptr_t)NULL) return (WALK_DONE); status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data, @@ -1568,7 +1569,7 @@ mutex_owner_step(mdb_walk_state_t *wsp) if (!MUTEX_TYPE_ADAPTIVE(&mtx)) return (WALK_DONE); - if ((owner = (uintptr_t)MUTEX_OWNER(&mtx)) == NULL) + if ((owner = (uintptr_t)MUTEX_OWNER(&mtx)) == (uintptr_t)NULL) return (WALK_DONE); if (mdb_vread(&thr, sizeof (thr), owner) != -1) diff --git a/usr/src/cmd/mdb/sun4v/modules/errh/errh.c b/usr/src/cmd/mdb/sun4v/modules/errh/errh.c index 6525746f3b..3554e1d559 100644 --- a/usr/src/cmd/mdb/sun4v/modules/errh/errh.c +++ b/usr/src/cmd/mdb/sun4v/modules/errh/errh.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/time.h> #include <sys/sysmacros.h> @@ -208,14 +206,13 @@ errh_prtaddr(uintptr_t addr, const void *data, void *private) return (WALK_NEXT); } -/*ARGSUSED*/ int rq_walk_init(mdb_walk_state_t *wsp) { cpu_t cpu; uintptr_t *ao, *lower, *upper; - if (wsp->walk_addr == NULL) { + if (wsp->walk_addr == (uintptr_t)NULL) { mdb_warn("address of struct cpu_t is required\n"); return (WALK_ERR); } @@ -245,14 +242,13 @@ rq_walk_init(mdb_walk_state_t *wsp) return (WALK_NEXT); } -/*ARGSUSED*/ int nrq_walk_init(mdb_walk_state_t *wsp) { cpu_t cpu; uintptr_t *ao, *lower, *upper; - if (wsp->walk_addr == NULL) { + if (wsp->walk_addr == (uintptr_t)NULL) { mdb_warn("address of struct cpu_t is required\n"); return (WALK_ERR); } @@ -282,14 +278,13 @@ nrq_walk_init(mdb_walk_state_t *wsp) return (WALK_NEXT); } -/*ARGSUSED*/ int errh_walk_step(mdb_walk_state_t *wsp) { int status; uintptr_t *ao, *lower, *upper; - if (wsp->walk_addr == NULL) + if (wsp->walk_addr == (uintptr_t)NULL) return (WALK_DONE); status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data, diff --git a/usr/src/cmd/mdb/sun4v/modules/ldc/ldc.c b/usr/src/cmd/mdb/sun4v/modules/ldc/ldc.c index 8cd92bc435..766f799e6e 100644 --- a/usr/src/cmd/mdb/sun4v/modules/ldc/ldc.c +++ b/usr/src/cmd/mdb/sun4v/modules/ldc/ldc.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This module provides debugging tools for the LDoms channels (ldc) */ @@ -233,13 +231,13 @@ ldc_walk_init(mdb_walk_state_t *wsp) ldc_soft_state_t softstate; /* Must have a start addr. */ - if (wsp->walk_addr == NULL) { + if (wsp->walk_addr == (uintptr_t)NULL) { if (mdb_readvar(&wsp->walk_addr, "ldcssp") == -1) { mdb_warn("failed to read 'ldcssp'"); return (WALK_ERR); } - if (wsp->walk_addr == NULL) + if (wsp->walk_addr == (uintptr_t)NULL) return (WALK_DONE); if (mdb_vread(&softstate, sizeof (softstate), wsp->walk_addr) @@ -263,7 +261,7 @@ ldc_walk_step(mdb_walk_state_t *wsp) int status; ldc_chan_t ldcp; - if (wsp->walk_addr == NULL) + if (wsp->walk_addr == (uintptr_t)NULL) return (WALK_DONE); if (mdb_vread(&ldcp, sizeof (ldc_chan_t), wsp->walk_addr) == -1) { @@ -289,7 +287,7 @@ int ldcmsg(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) { ldc_msg_t msg; - uint64_t count = 1; + uint64_t count = 1; int i; /* @@ -476,7 +474,7 @@ ldcmhdl(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) mdb_printf("\n"); } - if ((addr = (uintptr_t)mhdl.next) == NULL) + if ((addr = (uintptr_t)mhdl.next) == (uintptr_t)NULL) break; } diff --git a/usr/src/cmd/mdb/sun4v/modules/mdesc/mdesc.c b/usr/src/cmd/mdb/sun4v/modules/mdesc/mdesc.c index d0184bc7c8..b2c791690e 100644 --- a/usr/src/cmd/mdb/sun4v/modules/mdesc/mdesc.c +++ b/usr/src/cmd/mdb/sun4v/modules/mdesc/mdesc.c @@ -68,7 +68,7 @@ mdhdr(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) else mdb_printf("%p\n", mdp); - } while ((mdp = (uintptr_t)md.next) != NULL); + } while ((mdp = (uintptr_t)md.next) != (uintptr_t)NULL); return (DCMD_OK); } diff --git a/usr/src/cmd/mdb/sun4v/modules/vdsk/vdsk.c b/usr/src/cmd/mdb/sun4v/modules/vdsk/vdsk.c index b43c3f9d95..c404a3fb98 100644 --- a/usr/src/cmd/mdb/sun4v/modules/vdsk/vdsk.c +++ b/usr/src/cmd/mdb/sun4v/modules/vdsk/vdsk.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This module provides debugging tools for the LDoms vDisk drivers * (vds and vdc). @@ -41,7 +39,7 @@ int vd_dring_entry_walk_init(mdb_walk_state_t *wsp) { /* Must have a start addr. */ - if (wsp->walk_addr == NULL) { + if (wsp->walk_addr == (uintptr_t)NULL) { mdb_warn("Descriptor Ring base address required\n"); return (WALK_ERR); diff --git a/usr/src/cmd/modload/Makefile b/usr/src/cmd/modload/Makefile index c186767c6a..7e258fa01a 100644 --- a/usr/src/cmd/modload/Makefile +++ b/usr/src/cmd/modload/Makefile @@ -21,9 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/modload/Makefile -# -# makefile for loadable module utilities +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. DRVPROG = add_drv rem_drv update_drv MODPROG = modinfo modunload modload @@ -36,19 +34,18 @@ XPRIV = $(ETCSEC)/extra_privs $(XPRIV) := FILEMODE = 644 -SUBDIRS += $(MACH64) +SUBDIRS += $(MACH64) all := TARGET = all install := TARGET = install clean := TARGET = clean clobber := TARGET = clobber -lint := TARGET = lint .KEEP_STATE: all: $(SUBDIRS) -clean clobber lint: $(SUBDIRS) +clean clobber: $(SUBDIRS) install: $(SUBDIRS) $(XPRIV) diff --git a/usr/src/cmd/modload/Makefile.com b/usr/src/cmd/modload/Makefile.com index cf82649c7d..19d24ebb74 100644 --- a/usr/src/cmd/modload/Makefile.com +++ b/usr/src/cmd/modload/Makefile.com @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # makefile for loadable module utilities @@ -52,18 +53,6 @@ COMMONSRC = $(DRVCOMMONSRC) $(MODCOMMONSRC) CLOBBERFILES = $(PROG) -# lint is complicated here by the fact that we -# build multiple commands and with differing -# common source, drvsubr vs modsubr/plcysubr -# -LINT_PROG= $(PROG:%=lint_%.c) -LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 - -CERRWARN += -_gcc=-Wno-parentheses - -# not linted -SMATCH=off - # install specifics $(ROOTDRVPROG) := FILEMODE = 0555 @@ -72,10 +61,6 @@ add_drv := LDLIBS += -ldevinfo -lelf rem_drv := LDLIBS += -ldevinfo update_drv := LDLIBS += -ldevinfo -lint_add_drv.c := LDLIBS += -ldevinfo -lelf -lint_rem_drv.c := LDLIBS += -ldevinfo -lint_update_drv.c := LDLIBS += -ldevinfo - .KEEP_STATE: %.o: ../%.c @@ -110,9 +95,4 @@ modinfo: modinfo.o $(MODCOMMONOBJ) clean: $(RM) $(OBJECTS) -lint_%.c: - $(LINT.c) $(@:lint_%.c=../%.c) $(COMMONSRC) $(LDLIBS) - -lint: $(LINT_PROG) - include ../../Makefile.targ diff --git a/usr/src/cmd/modload/addrem.h b/usr/src/cmd/modload/addrem.h index 98448a0625..dc2a1732d4 100644 --- a/usr/src/cmd/modload/addrem.h +++ b/usr/src/cmd/modload/addrem.h @@ -20,6 +20,7 @@ */ /* * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. */ #ifndef _CMD_MODLOAD_ADDREM_H @@ -44,7 +45,7 @@ extern "C" { #define MAX_CMD_LINE 256 #define MAX_N2M_ALIAS_LINE FILENAME_MAX + FILENAME_MAX + 1 -#define MAXLEN_NAM_TO_MAJ_ENT FILENAME_MAX + MAX_STR_MAJOR + 1 +#define MAXLEN_NAM_TO_MAJ_ENT FILENAME_MAX + MAX_STR_MAJOR + 1 #define OPT_LEN 128 #define CADDR_HEX_STR 16 #define UINT_STR 10 @@ -118,7 +119,7 @@ extern char *get_perm_entry(char *, char *); extern int check_perms_aliases(int, int); extern int check_name_to_major(int); extern void enter_lock(void); -extern void err_exit(void); +extern void err_exit(void) __NORETURN; extern void exit_unlock(void); extern char *get_entry(char *, char *, char, int); extern int build_filenames(char *); diff --git a/usr/src/cmd/modload/amd64/Makefile b/usr/src/cmd/modload/amd64/Makefile index cd2153b08c..87cd1cb261 100644 --- a/usr/src/cmd/modload/amd64/Makefile +++ b/usr/src/cmd/modload/amd64/Makefile @@ -22,10 +22,9 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. include ../Makefile.com include ../../Makefile.cmd.64 -LINTFLAGS64 += -erroff=E_NAME_DEF_NOT_USED2 - install: all $(ROOTUSRSBINPROG) diff --git a/usr/src/cmd/modload/drvsubr.c b/usr/src/cmd/modload/drvsubr.c index 83282f471f..75662833e9 100644 --- a/usr/src/cmd/modload/drvsubr.c +++ b/usr/src/cmd/modload/drvsubr.c @@ -26,6 +26,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + */ #include <stdio.h> #include <stdlib.h> @@ -116,7 +119,7 @@ log_minorperm_error(minorperm_err_t err, int key) * open file * for each entry in list * where list entries are separated by <list_separator> - * append entry : driver_name <entry_separator> entry + * append entry : driver_name <entry_separator> entry * close file * return error/noerr */ @@ -207,7 +210,7 @@ append_to_file( * open file * for each entry in list * where list entries are separated by <list_separator> - * append entry : driver_name <entry_separator> entry + * append entry : driver_name <entry_separator> entry * close file * return error/noerr */ @@ -347,7 +350,7 @@ delete_entry( int rv, i; int status = NOERR; int drvr_found = 0; - boolean_t nomatch = B_TRUE; + boolean_t nomatch = B_TRUE; char newfile[MAXPATHLEN]; char *cp; char line[MAX_DBFILE_ENTRY]; @@ -1213,9 +1216,6 @@ exec_devfsadm( int n = 0; char *cmdline[MAX_CMD_LINE]; char maj_num[128]; - char *previous; - char *current; - int len; int rv; /* build command line */ @@ -1242,24 +1242,35 @@ exec_devfsadm( cmdline[n++] = "-x"; if (aliases != NULL) { + char *buf, *p; + size_t len; + int n_start = n; + len = strlen(aliases); - previous = aliases; - do { - cmdline[n++] = "-a"; - cmdline[n] = calloc(len + 1, 1); - if (cmdline[n] == NULL) { - (void) fprintf(stderr, - gettext(ERR_NO_MEM)); - return (ERROR); - } - current = get_entry(previous, - cmdline[n++], ' ', 0); - previous = current; - } while (*current != '\0'); + p = buf = calloc(len + 1, 1); + if (buf == NULL) { + (void) fprintf(stderr, gettext(ERR_NO_MEM)); + return (ERROR); + } + while (*aliases != '\0') { + while (n < MAX_CMD_LINE - 3 && *aliases != '\0') { + cmdline[n++] = "-a"; + aliases = get_entry(aliases, p, ' ', 0); + cmdline[n++] = p; + p += strlen(p) + 1; + } + cmdline[n] = NULL; + rv = exec_command(DRVCONFIG_PATH, cmdline); + if (rv != NOERR) + break; + n = n_start; + } + free(buf); + return (rv == NOERR ? NOERR : ERROR); } - cmdline[n] = (char *)0; + cmdline[n] = NULL; rv = exec_command(DRVCONFIG_PATH, cmdline); if (rv == NOERR) @@ -1387,7 +1398,7 @@ create_reconfig(char *basedir) * open file * for each entry in list * where list entries are separated by <list_separator> - * modify entry : driver_name <entry_separator> entry + * modify entry : driver_name <entry_separator> entry * close file * * return error/noerr @@ -1538,7 +1549,7 @@ update_minor_entry(char *driver_name, char *perm_list) } if (!match) { - (void) bzero(line, sizeof (&line[0])); + (void) bzero(line, sizeof (line)); (void) snprintf(line, sizeof (line), "%s:%s %s %s %s\n", driver_name, minor, perm, own, grp); @@ -1929,7 +1940,7 @@ unique_drv_alias(char *drv_alias) continue; /* sanity-check */ if (sscanf(line, - "%" VAL2STR(FILENAME_MAX) "s" /* drv */ + "%" VAL2STR(FILENAME_MAX) "s" /* drv */ "%" VAL2STR(FILENAME_MAX) "s", /* alias */ drv, alias) != 2) (void) fprintf(stderr, gettext(ERR_BAD_LINE), @@ -1965,8 +1976,7 @@ unique_drv_alias(char *drv_alias) * from the remainder of the line by white space. */ int -unique_driver_name(char *driver_name, char *file_name, - int *is_unique) +unique_driver_name(char *driver_name, char *file_name, int *is_unique) { int ret, err; @@ -2174,7 +2184,7 @@ update_name_to_major(char *driver_name, major_t *major_num, int server) /* * if driver_name already in rem_name_to_major - * delete entry from rem_nam_to_major + * delete entry from rem_nam_to_major * put entry into name_to_major */ diff --git a/usr/src/cmd/modload/plcysubr.c b/usr/src/cmd/modload/plcysubr.c index 1fa59159ac..c17d6e9245 100644 --- a/usr/src/cmd/modload/plcysubr.c +++ b/usr/src/cmd/modload/plcysubr.c @@ -27,7 +27,9 @@ * drvsubr.c because of static linking requirements. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + */ #include <stdio.h> #include <stdlib.h> @@ -87,18 +89,16 @@ devplcy_init(void) devplcysys_sz = DEVPLCYSYS_SZ(privimplinfo); toktab[RDPOL].off = - (char *)DEVPLCYSYS_RDP((devplcysys_t *)0, privimplinfo) - - (char *)0; + (char *)DEVPLCYSYS_RDP((devplcysys_t *)0, privimplinfo) - (char *)0; toktab[WRPOL].off = - (char *)DEVPLCYSYS_WRP((devplcysys_t *)0, privimplinfo) - - (char *)0; + (char *)DEVPLCYSYS_WRP((devplcysys_t *)0, privimplinfo) - (char *)0; } /* * Read a configuration file line and return a static buffer pointing to it. * It returns a static struct fileentry which has several fields: * - rawbuf, which includes the lines including empty lines and comments - * leading up to the file and the entry as found in the file + * leading up to the file and the entry as found in the file * - orgentry, pointer in rawbuf to the start of the entry proper. * - entry, a pre-parsed entry, escaped newlines removed. * - startline, the line number of the first line in the file @@ -481,13 +481,14 @@ parse_plcy_token(char *token, devplcysys_t *dp) case PSET: pset = priv_str_to_set(val, ",", &perr); if (pset == NULL) { - if (perr == NULL) - (void) fprintf(stderr, - gettext(ERR_NO_MEM)); - else - (void) fprintf(stderr, - gettext(ERR_BAD_PRIVS), - perr - val, val, perr); + if (perr == NULL) { + (void) fprintf(stderr, + gettext(ERR_NO_MEM)); + } else { + (void) fprintf(stderr, + gettext(ERR_BAD_PRIVS), + perr - val, val, perr); + } return (1); } priv_copyset(pset, item); @@ -495,8 +496,8 @@ parse_plcy_token(char *token, devplcysys_t *dp) break; default: (void) fprintf(stderr, - "Internal Error: bad token type: %d\n", - toktab[i].type); + "Internal Error: bad token type: %d\n", + toktab[i].type); return (1); } /* Standard cleanup & return for good tokens */ @@ -547,6 +548,7 @@ check_plcy_entry(char *entry, const char *driver, boolean_t todel) if (res == NULL || ds == NULL) { (void) fprintf(stderr, gettext(ERR_NO_MEM)); + free(res); return (NULL); } @@ -612,7 +614,7 @@ check_plcy_entry(char *entry, const char *driver, boolean_t todel) tokseen = B_TRUE; } } - if (todel && tokseen || *res == '\0' || !todel && !tokseen) { + if ((todel && tokseen) || *res == '\0' || (!todel && !tokseen)) { (void) fprintf(stderr, gettext(ERR_INVALID_PLCY)); free(res); return (NULL); @@ -690,7 +692,7 @@ check_priv_entry(const char *privlist, boolean_t add) if (add && modctl(MODALLOCPRIV, pr) != 0) { (void) fprintf(stderr, gettext(ERR_BAD_PRIV), pr, - strerror(errno)); + strerror(errno)); return (ERROR); } } diff --git a/usr/src/cmd/modload/sparcv9/Makefile b/usr/src/cmd/modload/sparcv9/Makefile index cd2153b08c..87cd1cb261 100644 --- a/usr/src/cmd/modload/sparcv9/Makefile +++ b/usr/src/cmd/modload/sparcv9/Makefile @@ -22,10 +22,9 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. include ../Makefile.com include ../../Makefile.cmd.64 -LINTFLAGS64 += -erroff=E_NAME_DEF_NOT_USED2 - install: all $(ROOTUSRSBINPROG) diff --git a/usr/src/cmd/picl/plugins/common/memcfg/Makefile b/usr/src/cmd/picl/plugins/common/memcfg/Makefile index d1d28fadb3..cb92bf8c29 100644 --- a/usr/src/cmd/picl/plugins/common/memcfg/Makefile +++ b/usr/src/cmd/picl/plugins/common/memcfg/Makefile @@ -35,14 +35,10 @@ include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/picl/plugins/Makefile.com -SRCS= $(OBJECTS:%.o=%.c) - LIBS = $(DYNLIB) ROOTLIBDIR = $(USR_LIB_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u/sys -I$(SRC)/cmd/picl/plugins/common/memcfg CFLAGS += $(CCVERBOSE) $(C_PICFLAGS) @@ -58,7 +54,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE= piclmemcfg_comm.po @@ -81,8 +76,7 @@ $(LIBLINKS): FRC include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ -lint : - $(LINT.c) $(SRCS) +lint: $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com index e803da9e56..e9aae72fa4 100644 --- a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com +++ b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com @@ -36,17 +36,9 @@ SRCS= $(OBJECTS:%.o=../%.c) CLOBBERFILES += $(LIBLINKS) -LIBS = $(DYNLIB) $(LINTLIB) +LIBS = $(DYNLIB) -LINTFLAGS = -uxmn -I.. -I$(SRC)/lib/libpicl -I$(SRC)/lib/libpicltree -LINTFLAGS += -D_REENTRANT -LINTOUT= lint.out - -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) +CLEANFILES= $(LINTOUT) XGETFLAGS += -a POFILE= picld_pluginutil.po @@ -62,15 +54,11 @@ DYNFLAGS += $(ZNOLAZYLOAD) LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) LDLIBS += -lc -lpicltree -$(LINTLIB) := SRCS = ../llib-lpicld_pluginutil -$(LINTLIB) := LINTFLAGS = -nvx -I.. - .KEEP_STATE: all : $(LIBS) lint : - $(LINT.c) $(SRCS) %.po: ../%.c $(CP) $< $<.i @@ -89,6 +77,3 @@ include $(SRC)/lib/Makefile.targ pics/%.o: ../%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) - -$(ROOTLINTDIR)/%: ../% - $(INS.file) diff --git a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/i386/Makefile b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/i386/Makefile index 8787dcca02..19d62a5750 100644 --- a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/i386/Makefile +++ b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/i386/Makefile @@ -22,8 +22,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com @@ -37,4 +35,4 @@ $(LIBLINKS): $(ROOTLIBDIR): $(INS.dir) -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/sparc/Makefile b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/sparc/Makefile index 8787dcca02..19d62a5750 100644 --- a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/sparc/Makefile +++ b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/sparc/Makefile @@ -22,8 +22,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com @@ -37,4 +35,4 @@ $(LIBLINKS): $(ROOTLIBDIR): $(INS.dir) -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile index 391bc77645..6b7ed5294d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile @@ -40,8 +40,6 @@ CONF= picldevtree.conf picl_asr.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -60,9 +57,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile index 1d09484472..ced1eefb21 100644 --- a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile @@ -42,8 +42,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -52,9 +50,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -72,9 +69,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile index 01da1eba92..315203cbe7 100644 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile @@ -41,8 +41,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -51,7 +49,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -61,9 +58,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile index a7d32c8460..34bd6109f2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile @@ -60,8 +60,6 @@ OTHERINFOS += fru_usb-a-3_data.info fru_usb-a-4_data.info OTHERINFOS += fru_FT0_data.info fru_FT1_data.info fru_FT2_data.info OTHERINFOS += fru_FT3_data.info fru_FT4_data.info fru_FT5_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS = @@ -70,7 +68,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(LIBS) $(LIBLINKS) $(CONFS) @@ -91,9 +88,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile index cb4272fbe3..1821150cc0 100644 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile @@ -71,8 +71,6 @@ OTHERINFOS += $(INCDIR2)/fru_FT3_data.info OTHERINFOS += $(INCDIR2)/fru_FT4_data.info OTHERINFOS += $(INCDIR2)/fru_FT5_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -81,9 +79,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -101,9 +98,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile index ce6525bcdd..c0cd68fe4d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile @@ -38,8 +38,6 @@ CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,9 +46,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile index f6aa7e7964..55c254dffe 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile @@ -41,8 +41,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -51,9 +49,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -71,9 +68,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile index 36eebd137e..afe6ef852a 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile index c6bda23a4f..eeedf0de23 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile @@ -48,8 +48,6 @@ OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info OTHERINFOS += fru_SC_data.info SB-tables.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS = @@ -58,7 +56,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(LIBS) $(LIBLINKS) $(CONFS) @@ -77,9 +74,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile index a8bab74a81..1ad6d3e9cb 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile @@ -51,8 +51,6 @@ OTHERINFOS += $(INCDIR2)/fru_PS0_data.info OTHERINFOS += $(INCDIR2)/fru_PS1_data.info OTHERINFOS += $(INCDIR2)/fru_SC_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -61,9 +59,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -81,9 +78,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile index 197b3a4b80..bc3320138c 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile @@ -20,13 +20,9 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 2001 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/picl/plugins/sun4u/cherrystone/conf/Makefile -# OBJECTS= @@ -44,16 +40,12 @@ install := FILEMODE = 0444 CONF= platsvcd.conf psvcobj.conf ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) -SRCS= +SRCS= LIBS = $(DYNLIB) -CLEANFILES= $(LINTOUT) $(LINTLIB) - ZDEFS = -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -62,7 +54,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile index 1532dd3343..ed24f0138b 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile @@ -39,8 +39,6 @@ install := FILEMODE = 0444 CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile index f53806da57..5461817470 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile @@ -38,9 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile index f8cdfe960c..75a8b4c285 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile @@ -53,11 +53,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= $(CONF:%.conf=%.info) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree @@ -78,7 +73,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONF) @@ -99,11 +93,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c index bc565320be..286567a046 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * PICL plug-in that creates the FRU Hierarchy for the * SUNW,Sun-Fire-480R (Cherrystone) platform @@ -267,8 +265,8 @@ picl_frutree_fini(void) * * It processes the following events: * - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED + * PICLEVENT_SYSEVENT_DEVICE_ADDED + * PICLEVENT_SYSEVENT_DEVICE_REMOVED */ /* ARGSUSED */ static void @@ -1024,10 +1022,10 @@ frudr_completion_handler(char *ename, void *earg, size_t size) * now frudata has been notified that the node is to be * removed, we can actually remove it */ - fruh = NULL; + fruh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { + if (fruh != 0) { (void) remove_picl_node(fruh); } } @@ -1048,7 +1046,7 @@ post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) ev_name = strdup(ename); if (ev_name == NULL) return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) { free(ev_name); return; } @@ -1111,7 +1109,7 @@ add_power_supply(int slotnum) return (err); /* Post picl-fru-added event */ - post_frudr_event(PICL_FRU_ADDED, NULL, powermodh); + post_frudr_event(PICL_FRU_ADDED, 0, powermodh); } } return (PICL_SUCCESS); @@ -1141,7 +1139,7 @@ remove_power_supply(int slotnum) } (void) ptree_destroy_node(powermodh); /* Post picl-fru-removed event */ - post_frudr_event(PICL_FRU_REMOVED, NULL, powermodh); + post_frudr_event(PICL_FRU_REMOVED, 0, powermodh); } return (PICL_SUCCESS); } diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile index 77267c4004..9c5e25dfe6 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile @@ -42,8 +42,6 @@ ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -56,8 +54,6 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -69,7 +65,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -91,7 +86,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile index fbc632dfb6..827839e69e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libpsvcpolicy_psr.a VERS= .1 @@ -43,8 +41,6 @@ LIBS = $(DYNLIB) PLATFORM=SUNW,Sun-Fire-480R -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -59,8 +55,6 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin LDLIBS += -lc -ldevice -ldevinfo -lHBAAPI -LINTFLAGS += - .KEEP_STATE: PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/ @@ -76,7 +70,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -107,7 +100,6 @@ $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile index b7f00d4e1d..c46f80e843 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile @@ -29,7 +29,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -54,12 +54,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) @@ -80,7 +74,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(CONF) $(LIBLINKS) @@ -110,11 +103,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c index 0d4578e9eb..5b3cbf2bdd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -83,23 +81,23 @@ typedef struct { */ static sensor_node_t sensor_nodes[] = { {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_CPU0, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_CPU1, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_MB, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_ADT7462, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_LM95221, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_FIRE, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_LSI1064, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_FRONT_PANEL, - NULL, NULL, NULL, NULL}, + NULL, 0, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_PSU, - NULL, NULL, NULL, NULL} + NULL, 0, 0, 0} }; #define N_SENSOR_NODES (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) @@ -109,7 +107,7 @@ static sensor_node_t sensor_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -120,15 +118,15 @@ typedef struct { */ static fan_node_t fan_nodes[] = { {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN0, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN1, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN2, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN3, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN4, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL} + NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0} }; #define N_FAN_NODES (sizeof (fan_nodes)/sizeof (fan_nodes[0])) @@ -138,7 +136,7 @@ static fan_node_t fan_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *disk_name; /* disk name */ - env_disk_t *diskp; /* disk information */ + env_disk_t *diskp; /* disk information */ picl_nodehdl_t nodeh; /* "disk" node handle */ picl_prophdl_t proph; /* "Temperature" property handle */ } disk_node_t; @@ -147,10 +145,10 @@ typedef struct { * Disk node array */ static disk_node_t disk_nodes[] = { - {DISK0_NODE_PATH, ENV_DISK0, NULL, NULL, NULL}, - {DISK1_NODE_PATH, ENV_DISK1, NULL, NULL, NULL}, - {DISK2_NODE_PATH, ENV_DISK2, NULL, NULL, NULL}, - {DISK3_NODE_PATH, ENV_DISK3, NULL, NULL, NULL} + {DISK0_NODE_PATH, ENV_DISK0, NULL, 0, 0}, + {DISK1_NODE_PATH, ENV_DISK1, NULL, 0, 0}, + {DISK2_NODE_PATH, ENV_DISK2, NULL, 0, 0}, + {DISK3_NODE_PATH, ENV_DISK3, NULL, 0, 0} }; #define N_DISK_NODES (sizeof (disk_nodes)/sizeof (disk_nodes[0])) @@ -168,7 +166,7 @@ static void delete_fan_nodes_and_props(void); static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; int i; @@ -197,7 +195,7 @@ get_current_temp(ptree_rarg_t *parg, void *buf) static int get_disk_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; disk_node_t *dnodep; int i; @@ -492,12 +490,12 @@ delete_sensor_nodes_and_props(void) for (i = 0; i < N_SENSOR_NODES; i++) { snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -634,11 +632,11 @@ delete_disk_nodes_and_props(void) for (i = 0; i < N_DISK_NODES; i++) { dnodep = &disk_nodes[i]; - if (dnodep->nodeh != NULL) { + if (dnodep->nodeh != 0) { (void) ptree_delete_node(dnodep->nodeh); (void) ptree_destroy_node(dnodep->nodeh); - dnodep->nodeh = NULL; - dnodep->proph = NULL; + dnodep->nodeh = 0; + dnodep->proph = 0; } } } @@ -772,10 +770,10 @@ delete_fan_nodes_and_props(void) for (i = 0; i < N_FAN_NODES; i++) { fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -947,9 +945,9 @@ env_picl_setup(void) for (i = 0; i < N_SENSOR_NODES; i++) { snodep = &sensor_nodes[i]; snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->target_proph = 0; } /* @@ -958,8 +956,8 @@ env_picl_setup(void) for (i = 0; i < N_FAN_NODES; i++) { fnodep = &fan_nodes[i]; fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* @@ -968,8 +966,8 @@ env_picl_setup(void) for (i = 0; i < N_DISK_NODES; i++) { dnodep = &disk_nodes[i]; dnodep->diskp = disk_lookup(dnodep->disk_name); - dnodep->nodeh = NULL; - dnodep->proph = NULL; + dnodep->nodeh = 0; + dnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile index 7c880814c8..62d8f7e5ce 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile index d968a8f8da..fa3ad7676f 100644 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile @@ -40,8 +40,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONF) +all: $(CONF) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -64,9 +61,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile index e90180b858..a0b392bda0 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile @@ -20,13 +20,9 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 2000 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/picl/plugins/sun4u/daktari/conf/Makefile -# OBJECTS= @@ -44,16 +40,12 @@ install := FILEMODE = 0444 CONF= platsvcd.conf psvcobj.conf ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) -SRCS= +SRCS= LIBS = $(DYNLIB) -CLEANFILES= $(LINTOUT) $(LINTLIB) - ZDEFS = -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -62,7 +54,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile index e8ac4501da..36496be822 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile @@ -39,8 +39,6 @@ install := FILEMODE = 0444 CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile index e0bb53d26e..3df0acb5f9 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile @@ -38,9 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile index fe246c15c3..837f83cb8d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile @@ -54,11 +54,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= $(CONF:%.conf=%.info) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree @@ -79,7 +74,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONF) @@ -100,11 +94,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c index d9a2264f39..0c2849b678 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * PICL plug-in that creates the FRU Hierarchy for the * SUNW,Sun-Fire-880 (Daktari) platform @@ -328,8 +326,8 @@ picl_frutree_fini(void) * * It processes the following events: * - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED + * PICLEVENT_SYSEVENT_DEVICE_ADDED + * PICLEVENT_SYSEVENT_DEVICE_REMOVED */ /* ARGSUSED */ static void @@ -1149,10 +1147,10 @@ frudr_completion_handler(char *ename, void *earg, size_t size) * now frudata has been notified that the node is to be * removed, we can actually remove it */ - fruh = NULL; + fruh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { + if (fruh != 0) { (void) remove_picl_node(fruh); } } @@ -1173,7 +1171,7 @@ post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) ev_name = strdup(ename); if (ev_name == NULL) return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) { free(ev_name); return; } @@ -1236,7 +1234,7 @@ add_power_supply(int slotnum) return (err); /* Post picl-fru-added event */ - post_frudr_event(PICL_FRU_ADDED, NULL, powermodh); + post_frudr_event(PICL_FRU_ADDED, 0, powermodh); } } return (PICL_SUCCESS); @@ -1268,7 +1266,7 @@ remove_power_supply(int slotnum) } /* Post picl-fru-removed event */ - post_frudr_event(PICL_FRU_REMOVED, NULL, powermodh); + post_frudr_event(PICL_FRU_REMOVED, 0, powermodh); } return (PICL_SUCCESS); diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile index 0c5b10e469..a3cea6f5e9 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile @@ -45,8 +45,6 @@ DYNFLAGS_COM = /usr/lib/picl/plugins ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -59,8 +57,6 @@ DYNFLAGS += -R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM) LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -72,7 +68,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -94,7 +89,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile index 1d70cb512d..5341f7acd2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile @@ -22,10 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile -# + LIBRARY= libpsvcpolicy_psr.a VERS= .1 @@ -46,10 +43,8 @@ DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins DYNFLAGS_SUN4U = /usr/platform/sun4u/lib/picl/plugins DYNFLAGS_COM = /usr/lib/picl/plugins -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(ROOT)/usr/platform/sun4u/include +CPPFLAGS += -I$(ROOT)/usr/platform/sun4u/include CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -64,8 +59,6 @@ DYNFLAGS += -R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM) LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin LDLIBS += -lc -ldevice -lcfgadm -LINTFLAGS += - .KEEP_STATE: PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/ @@ -81,7 +74,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -112,7 +104,6 @@ $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile index 8a82b9ee5a..8f086c3b28 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile @@ -29,7 +29,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -54,12 +54,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) @@ -80,7 +74,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(CONF) $(LIBLINKS) @@ -110,11 +103,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c index 8bcbef376e..144c9bb3f7 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains the environmental PICL plug-in module. */ @@ -319,21 +317,21 @@ static int set_cpu_tach(ptree_warg_t *parg, const void *buf); static int get_sys_tach(ptree_rarg_t *parg, void *buf); static int set_sys_tach(ptree_warg_t *parg, const void *buf); -static int shutdown_override = 0; -static int sensor_poll_interval = SENSORPOLL_INTERVAL; +static int shutdown_override = 0; +static int sensor_poll_interval = SENSORPOLL_INTERVAL; static int warning_interval = WARNING_INTERVAL; static int disk_warning_interval = DISK_WARNING_INTERVAL; static int disk_warning_duration = DISK_WARNING_DURATION; -static int shutdown_interval = SHUTDOWN_INTERVAL; -static int disk_shutdown_interval = DISK_SHUTDOWN_INTERVAL; +static int shutdown_interval = SHUTDOWN_INTERVAL; +static int disk_shutdown_interval = DISK_SHUTDOWN_INTERVAL; static int ovtemp_monitor = 1; /* enabled */ static int pm_monitor = 1; /* enabled */ static int mon_fanstat = 1; /* enabled */ -static int cpu_mode; -static int sys_mode; -static int cpu_tach; -static int sys_tach; +static int cpu_mode; +static int sys_mode; +static int cpu_tach; +static int sys_tach; static char shutdown_cmd[] = SHUTDOWN_CMD; env_tuneable_t tuneables[] = { @@ -1034,26 +1032,27 @@ envd_setup_fans(void) /* make sure cpu0/1 present for validating cpu fans */ if (fanp->id == CPU0_FAN_ID) { if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { - fanp->present = B_FALSE; - continue; + PICL_SUCCESS) { + fanp->present = B_FALSE; + continue; } } if (fanp->id == CPU1_FAN_ID) { if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { - fanp->present = B_FALSE; - continue; + PICL_SUCCESS) { + fanp->present = B_FALSE; + continue; } } if (fanp->id == DIMM_FAN_ID) { if (ptree_get_node_by_path(DIMM_FAN_CONTROLLER_PATH, - &tnodeh) != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "dimm Fan not found in the system.\n"); - fanp->present = B_FALSE; - continue; + &tnodeh) != PICL_SUCCESS) { + if (env_debug) + envd_log(LOG_ERR, + "dimm Fan not found in the " + "system.\n"); + fanp->present = B_FALSE; + continue; } } (void) strcpy(path, "/devices"); @@ -1074,11 +1073,12 @@ envd_setup_fans(void) */ i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; i2c_reg.reg_value = (PIC16F819_SW_AWARE_MODE | - PIC16F819_FAN_FAULT_CLEAR); + PIC16F819_FAN_FAULT_CLEAR); if (ioctl(fd, I2C_SET_REG, &i2c_reg) == -1) { if (env_debug) envd_log(LOG_ERR, - "Error in writing to COMMAND reg. of DIMM FAN controller\n"); + "Error in writing to COMMAND reg. " + "of DIMM FAN controller\n"); } } else { /* Get speed range value */ @@ -1114,39 +1114,39 @@ envd_setup_disks(void) */ if (ptree_get_node_by_path(SCSI_CONTROLLER_NODE_PATH, - &tnodeh) != PICL_SUCCESS) { + &tnodeh) != PICL_SUCCESS) { if (env_debug) envd_log(LOG_ERR, - "On-Board SCSI controller not found in the system.\n"); + "On-Board SCSI controller not found " + "in the system.\n"); monitor_disk_temp = 0; return (-1); } if ((ret = ptree_get_propval_by_name(tnodeh, VENDOR_ID, - &vendor_id, - sizeof (vendor_id))) != 0) { + &vendor_id, sizeof (vendor_id))) != 0) { if (env_debug) envd_log(LOG_ERR, -"Error in getting vendor-id for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); + "Error in getting vendor-id for SCSI controller. " + "ret = %d errno = 0x%d\n", + ret, errno); monitor_disk_temp = 0; return (-1); } if ((ret = ptree_get_propval_by_name(tnodeh, DEVICE_ID, - &device_id, - sizeof (device_id))) != 0) { + &device_id, sizeof (device_id))) != 0) { if (env_debug) envd_log(LOG_ERR, -"Error in getting device-id for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); + "Error in getting device-id for SCSI controller. " + "ret = %d errno = 0x%d\n", ret, errno); monitor_disk_temp = 0; return (-1); } if (env_debug) envd_log(LOG_ERR, "vendor-id=0x%x device-id=0x%x\n", - vendor_id, device_id); + vendor_id, device_id); if ((vendor_id != LSI1030_VENDOR_ID) || - (device_id != LSI1030_DEVICE_ID)) { + (device_id != LSI1030_DEVICE_ID)) { monitor_disk_temp = 0; return (-1); } @@ -1157,20 +1157,20 @@ envd_setup_disks(void) for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { if (ptree_get_node_by_path(diskp->nodepath, - &tnodeh) != PICL_SUCCESS) { + &tnodeh) != PICL_SUCCESS) { diskp->present = B_FALSE; if (env_debug) envd_log(LOG_ERR, - "DISK %d not found in the system.\n", - diskp->id); + "DISK %d not found in the system.\n", + diskp->id); continue; } diskp->fd = open(diskp->devfs_path, O_RDONLY); if (diskp->fd == -1) { diskp->present = B_FALSE; envd_log(LOG_ERR, - "Error in opening %s errno = 0x%x\n", - diskp->devfs_path, errno); + "Error in opening %s errno = 0x%x\n", + diskp->devfs_path, errno); continue; } diskp->present = B_TRUE; @@ -1179,23 +1179,23 @@ envd_setup_disks(void) * Find out if the Temperature page is supported by the disk. */ ret = scsi_log_sense(diskp->fd, SUPPORTED_LPAGES, - log_page, sizeof (log_page)); + log_page, sizeof (log_page)); if (ret != 0) { continue; } page_len = ((log_page[2] << 8) & 0xFF00) | log_page[3]; for (page_index = LOGPAGEHDRSIZE; - page_index < page_len + LOGPAGEHDRSIZE; page_index++) { + page_index < page_len + LOGPAGEHDRSIZE; page_index++) { switch (log_page[page_index]) { - case TEMPERATURE_PAGE: - diskp->tpage_supported = B_TRUE; + case TEMPERATURE_PAGE: + diskp->tpage_supported = B_TRUE; if (env_debug) envd_log(LOG_ERR, - "tpage supported for %s\n", - diskp->nodepath); - default: - break; + "tpage supported for %s\n", + diskp->nodepath); + default: + break; } } diskp->warning_tstamp = 0; @@ -1236,14 +1236,14 @@ envd_setup_sensors(void) /* make sure cpu0/1 sensors are present */ if (sensorp->id == CPU0_SENSOR_ID) { if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { + PICL_SUCCESS) { sensorp->present = B_FALSE; continue; } } if (sensorp->id == CPU1_SENSOR_ID) { if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { + PICL_SUCCESS) { sensorp->present = B_FALSE; continue; } @@ -1267,7 +1267,7 @@ envd_setup_sensors(void) */ if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tmin) != -1) { + &tmin) != -1) { sensorp->tmin = TMIN(tmin); } else { sensorp->tmin = -1; @@ -1383,7 +1383,7 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) /* Read ADM default value only for the first time */ if (tsave[tindex] == 0) { if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tsave[tindex]) == -1) { + &tsave[tindex]) == -1) { if (env_debug) envd_log(LOG_ERR, "read tminrange ioctl failed"); @@ -1408,27 +1408,27 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) * ADM 1031 Tmin/Trange register need to be reprogrammed. */ tdata = ((fanctl->fan_ctl_pairs[cur_lpstate].tMin / TMIN_UNITS) - << TMIN_SHIFT); + << TMIN_SHIFT); /* Need to pack tRange in ADM bits 2:0 */ switch (fanctl->fan_ctl_pairs[cur_lpstate].tRange) { - case 5: - break; + case 5: + break; - case 10: - tdata |= 1; - break; + case 10: + tdata |= 1; + break; - case 20: - tdata |= 2; - break; + case 20: + tdata |= 2; + break; - case 40: - tdata |= 3; - break; + case 40: + tdata |= 3; + break; - case 80: - tdata |= 4; - break; + case 80: + tdata |= 4; + break; } } else tdata = tsave[tindex]; @@ -1480,13 +1480,13 @@ pmthr(void *args) do { if (env_debug) { envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x" - "comp:%d oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); + "pmstate event:0x%x flags:%x" + "comp:%d oldval:%d newval:%d path:%s\n", + pmstate.event, pmstate.flags, + pmstate.component, + pmstate.old_level, + pmstate.new_level, + pmstate.physpath); } cur_lpstate = (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; @@ -1518,11 +1518,11 @@ pmthr(void *args) * * FAN ON * Tmin - * ------------------------------------------- + * ------------------------------------------- * - * FAN ON/OFF + * FAN ON/OFF * - * -------------------------------------------- + * -------------------------------------------- * Tmin - Hysterisis * FAN OFF * @@ -1674,13 +1674,13 @@ handle_overtemp_interrupt(int hwm_id) if (env_debug) envd_log(LOG_ERR, - "sensor name %s, cur temp %d, " - "HW %d LW %d SD %d LS %d\n", - sensorp->name, temp, - sensorp->es_ptr->high_warning, - (int)sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_shutdown, - (int)sensorp->es_ptr->low_shutdown); + "sensor name %s, cur temp %d, " + "HW %d LW %d SD %d LS %d\n", + sensorp->name, temp, + sensorp->es_ptr->high_warning, + (int)sensorp->es_ptr->low_warning, + sensorp->es_ptr->high_shutdown, + (int)sensorp->es_ptr->low_shutdown); if (TEMP_IN_WARNING_RANGE(sensorp->cur_temp, sensorp)) { /* @@ -1759,7 +1759,7 @@ wait_till_timeout: */ (void) pthread_mutex_lock(&env_monitor_mutex); ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); + &env_monitor_mutex, &to); to.tv_sec = SENSORPOLL_INTERVAL; to.tv_nsec = 0; if (ret != ETIMEDOUT) { @@ -1798,7 +1798,7 @@ ovtemp_thr(void *args) } if (env_debug) envd_log(LOG_ERR, "ovtemp thread for %s running...\n", - hwm_devs[hwm_id]); + hwm_devs[hwm_id]); for (;;) { /* @@ -1816,7 +1816,7 @@ ovtemp_thr(void *args) */ (void) pthread_mutex_lock(&env_monitor_mutex); ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); + &env_monitor_mutex, &to); to.tv_sec = INTERRUPTPOLL_INTERVAL; to.tv_nsec = 0; if (ret != ETIMEDOUT) { @@ -1841,27 +1841,27 @@ ovtemp_thr(void *args) if (err == -1) { if (env_debug) envd_log(LOG_ERR, - "OverTemp: Status Error"); + "OverTemp: Status Error"); continue; } if (env_debug) envd_log(LOG_ERR, "INTR %s, Stat1 %x, Stat2 %x", - hwm_devs[hwm_id], stat[0], stat[1]); + hwm_devs[hwm_id], stat[0], stat[1]); if (stat[0] & FANFAULT) { fanp = fan_lookup(hwm_fans[hwm_id][HWM_FAN1]); if (fanp && fanp->present) envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], - hwm_fans[hwm_id][HWM_FAN1]); + hwm_devs[hwm_id], + hwm_fans[hwm_id][HWM_FAN1]); } if (stat[1] & FANFAULT) { fanp = fan_lookup(hwm_fans[hwm_id][HWM_FAN2]); if (fanp && fanp->present) envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], - hwm_fans[hwm_id][HWM_FAN2]); + hwm_devs[hwm_id], + hwm_fans[hwm_id][HWM_FAN2]); } /* * Check respective Remote/Local High, Low before start @@ -1886,10 +1886,6 @@ dimm_fan_thr(void *args) pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; -#ifdef __lint - args = args; -#endif - for (;;) { /* * Sleep for specified seconds before issuing IOCTL @@ -1897,7 +1893,7 @@ dimm_fan_thr(void *args) */ (void) pthread_mutex_lock(&env_monitor_mutex); ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); + &env_monitor_mutex, &to); to.tv_sec = INTERRUPTPOLL_INTERVAL; to.tv_nsec = 0; if (ret != ETIMEDOUT) { @@ -1913,10 +1909,11 @@ dimm_fan_thr(void *args) i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; i2c_reg.reg_value = PIC16F819_SW_AWARE_MODE; if (ioctl(envd_dimm_fan.fd, - I2C_SET_REG, &i2c_reg) == -1) { + I2C_SET_REG, &i2c_reg) == -1) { if (env_debug) envd_log(LOG_ERR, - "Error in writing to COMMAND reg. of DIMM FAN controller\n"); + "Error in writing to COMMAND reg. " + "of DIMM FAN controller\n"); } /* * We initiate shutdown if fan status indicates @@ -1930,19 +1927,19 @@ dimm_fan_thr(void *args) */ envd_dimm_fan.present = B_FALSE; (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_DIMM_FAN_FAILURE_SHUTDOWN_MSG, - ENV_DIMM_FAN, - dimm_fan_rpm_string, dimm_fan_status_string, - dimm_fan_command_string, - dimm_fan_debug_string); + ENV_DIMM_FAN_FAILURE_SHUTDOWN_MSG, + ENV_DIMM_FAN, + dimm_fan_rpm_string, dimm_fan_status_string, + dimm_fan_command_string, + dimm_fan_debug_string); envd_log(LOG_ALERT, msgbuf); if (system_shutdown_started == B_FALSE) { system_shutdown_started = B_TRUE; (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", - SHUTDOWN_CMD, - msgbuf); + "%s \"%s\"", + SHUTDOWN_CMD, + msgbuf); envd_log(LOG_ALERT, syscmd); (void) system(syscmd); } @@ -1981,13 +1978,15 @@ scsi_log_sense(int fd, uchar_t page_code, uchar_t *pagebuf, uint16_t pagelen) if (ret_val == 0 && ucmd_buf.uscsi_status == 0) { if (env_debug) envd_log(LOG_ERR, - "log sense command for page_code 0x%x succeeded\n", page_code); + "log sense command for page_code 0x%x succeeded\n", + page_code); return (ret_val); } if (env_debug) envd_log(LOG_ERR, - "log sense command failed.ret_val = 0x%x status = 0x%x errno = 0x%x\n", - ret_val, ucmd_buf.uscsi_status, errno); + "log sense command failed.ret_val = 0x%x status = 0x%x " + "errno = 0x%x\n", + ret_val, ucmd_buf.uscsi_status, errno); return (1); } @@ -1998,8 +1997,8 @@ get_disk_temp(env_disk_t *diskp) uchar_t tpage[256]; ret = scsi_log_sense(diskp->fd, - TEMPERATURE_PAGE, - tpage, sizeof (tpage)); + TEMPERATURE_PAGE, + tpage, sizeof (tpage)); if (ret != 0) { diskp->current_temp = DISK_INVALID_TEMP; diskp->ref_temp = DISK_INVALID_TEMP; @@ -2011,7 +2010,7 @@ get_disk_temp(env_disk_t *diskp) * Temperature value of 255(0xFF) is considered INVALID. */ if ((tpage[7] == 0x02) && (tpage[4] == 0x00) && - (tpage[5] == 0x00)) { + (tpage[5] == 0x00)) { if (tpage[9] == 0xFF) { diskp->current_temp = DISK_INVALID_TEMP; return (-1); @@ -2026,7 +2025,7 @@ get_disk_temp(env_disk_t *diskp) * Temperature value of 255(0xFF) is considered INVALID. */ if ((tpage[13] == 0x02) && (tpage[10] == 0x00) && - (tpage[11] == 0x01)) { + (tpage[11] == 0x01)) { if (tpage[15] == 0xFF) { diskp->ref_temp = DISK_INVALID_TEMP; } else { @@ -2055,148 +2054,163 @@ disk_temp_thr(void *args) disk_pm_fd = open(PM_DEVICE, O_RDWR); if (disk_pm_fd == -1) { envd_log(LOG_ERR, - DISK_TEMP_THREAD_EXITING, - errno, strerror(errno)); + DISK_TEMP_THREAD_EXITING, + errno, strerror(errno)); return (NULL); } for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = disk_scan_interval; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (diskp->present == B_FALSE) - continue; - if (diskp->tpage_supported == B_FALSE) - continue; /* - * If the disk temperature is above the warning threshold - * continue monitoring until the temperature drops below - * warning threshold. - * if the temperature is in the NORMAL range monitor only - * when the disk is BUSY. - * We do not want to read the disk temperature if the disk is - * is idling. The reason for this is disk will never get into - * lowest power mode if we scan the disk temperature - * peridoically. To avoid this situation we first determine - * the idle_time of the disk. If the disk has been IDLE since - * we scanned the temperature last time we will not read the - * temperature. + * Sleep for specified seconds before issuing IOCTL + * again. */ - if (!DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { - pmstate.physpath = diskp->physpath; - pmstate.size = strlen(diskp->physpath); - pmstate.component = 0; - if ((idle_time = - ioctl(disk_pm_fd, - PM_GET_TIME_IDLE, &pmstate)) == -1) { - if (errno != EINTR) { - if (env_debug) + (void) pthread_mutex_lock(&env_monitor_mutex); + ret = pthread_cond_reltimedwait_np(&env_monitor_cv, + &env_monitor_mutex, &to); + to.tv_sec = disk_scan_interval; + to.tv_nsec = 0; + if (ret != ETIMEDOUT) { + (void) pthread_mutex_unlock(&env_monitor_mutex); + continue; + } + (void) pthread_mutex_unlock(&env_monitor_mutex); + for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { + if (diskp->present == B_FALSE) + continue; + if (diskp->tpage_supported == B_FALSE) + continue; + /* + * If the disk temperature is above the warning + * threshold continue monitoring until the temperature + * drops below warning threshold. + * If the temperature is in the NORMAL range monitor + * only when the disk is BUSY. + * We do not want to read the disk temperature if the + * disk is is idling. The reason for this is disk will + * never get into lowest power mode if we scan the disk + * temperature peridoically. + * To avoid this situation we first determine + * the idle_time of the disk. If the disk has been + * IDLE since we scanned the temperature last time + * we will not read the temperature. + */ + if (!DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, + diskp)) { + pmstate.physpath = diskp->physpath; + pmstate.size = strlen(diskp->physpath); + pmstate.component = 0; + if ((idle_time = + ioctl(disk_pm_fd, + PM_GET_TIME_IDLE, &pmstate)) == -1) { + if (errno != EINTR) { + if (env_debug) { + envd_log(LOG_ERR, + "ioctl " + "PM_GET_TIME_IDLE " + "failed for DISK0." + " errno=0x%x\n", + errno); + } + continue; + } + continue; + } + if (idle_time >= (disk_scan_interval/2)) { + if (env_debug) { envd_log(LOG_ERR, - "ioctl PM_GET_TIME_IDLE failed for DISK0. errno=0x%x\n", - errno); + "%s idle time = %d\n", + diskp->name, idle_time); + } continue; } - continue; } - if (idle_time >= (disk_scan_interval/2)) { - if (env_debug) { - envd_log(LOG_ERR, - "%s idle time = %d\n", - diskp->name, idle_time); - } - continue; + ret = get_disk_temp(diskp); + if (ret != 0) + continue; + if (env_debug) { + envd_log(LOG_ERR, + "%s temp = %d ref. temp = %d\n", + diskp->name, diskp->current_temp, + diskp->ref_temp); } - } - ret = get_disk_temp(diskp); - if (ret != 0) - continue; - if (env_debug) { - envd_log(LOG_ERR, - "%s temp = %d ref. temp = %d\n", - diskp->name, diskp->current_temp, diskp->ref_temp); - } - /* - * If this disk already triggered system shutdown, don't - * log any more shutdown/warning messages for it. - */ - if (diskp->shutdown_initiated) - continue; - - /* - * Check for the temperature in warning and shutdown range - * and take appropriate action. - */ - if (DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { /* - * Check if the temperature has been in warning - * range during last disk_warning_duration interval. - * If so, the temperature is truly in warning - * range and we need to log a warning message, - * but no more than once every disk_warning_interval - * seconds. + * If this disk already triggered system shutdown, don't + * log any more shutdown/warning messages for it. */ - time_t wtstamp = diskp->warning_tstamp; - - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->warning_start == 0) - diskp->warning_start = ct; - if (((ct - diskp->warning_start) >= - disk_warning_duration) && (wtstamp == 0 || - (ct - wtstamp) >= disk_warning_interval)) { - envd_log(LOG_CRIT, ENV_WARNING_MSG, - diskp->name, diskp->current_temp, - diskp->low_warning, - diskp->high_warning); - diskp->warning_tstamp = ct; - } - } else if (diskp->warning_start != 0) - diskp->warning_start = 0; - - if (!shutdown_override && - DISK_TEMP_IN_SHUTDOWN_RANGE(diskp->current_temp, diskp)) { - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->shutdown_tstamp == 0) - diskp->shutdown_tstamp = ct; + if (diskp->shutdown_initiated) + continue; /* - * Shutdown the system if the temperature remains - * in the shutdown range for over disk_shutdown_interval - * seconds. + * Check for the temperature in warning and shutdown + * range and take appropriate action. */ - if ((ct - diskp->shutdown_tstamp) >= - disk_shutdown_interval) { - /* log error */ - diskp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, diskp->name, - diskp->current_temp, diskp->low_shutdown, - diskp->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - - /* shutdown the system (only once) */ - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); + if (DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, + diskp)) { + /* + * Check if the temperature has been in warning + * range during last disk_warning_duration + * interval. + * If so, the temperature is truly in warning + * range and we need to log a warning message, + * but no more than once every + * disk_warning_interval seconds. + */ + time_t wtstamp = diskp->warning_tstamp; + + ct = (time_t)(gethrtime() / NANOSEC); + if (diskp->warning_start == 0) + diskp->warning_start = ct; + if (((ct - diskp->warning_start) >= + disk_warning_duration) && (wtstamp == 0 || + (ct - wtstamp) >= disk_warning_interval)) { + envd_log(LOG_CRIT, ENV_WARNING_MSG, + diskp->name, diskp->current_temp, + diskp->low_warning, + diskp->high_warning); + diskp->warning_tstamp = ct; } - } - } else if (diskp->shutdown_tstamp != 0) - diskp->shutdown_tstamp = 0; + } else if (diskp->warning_start != 0) + diskp->warning_start = 0; + + if (!shutdown_override && + DISK_TEMP_IN_SHUTDOWN_RANGE(diskp->current_temp, + diskp)) { + ct = (time_t)(gethrtime() / NANOSEC); + if (diskp->shutdown_tstamp == 0) + diskp->shutdown_tstamp = ct; + + /* + * Shutdown the system if the temperature + * remains in the shutdown range for over + * disk_shutdown_interval seconds. + */ + if ((ct - diskp->shutdown_tstamp) >= + disk_shutdown_interval) { + /* log error */ + diskp->shutdown_initiated = B_TRUE; + (void) snprintf(msgbuf, sizeof (msgbuf), + ENV_SHUTDOWN_MSG, diskp->name, + diskp->current_temp, + diskp->low_shutdown, + diskp->high_shutdown); + envd_log(LOG_ALERT, msgbuf); + + /* shutdown the system (only once) */ + if (system_shutdown_started == + B_FALSE) { + (void) snprintf(syscmd, + sizeof (syscmd), + "%s \"%s\"", shutdown_cmd, + msgbuf); + envd_log(LOG_ALERT, syscmd); + system_shutdown_started = + B_TRUE; + (void) system(syscmd); + } + } + } else if (diskp->shutdown_tstamp != 0) + diskp->shutdown_tstamp = 0; - } + } } /* end of forever loop */ } @@ -2208,7 +2222,7 @@ disk_temp_thr(void *args) static int envd_setup(void) { - int ret; + int ret; if (getenv("SUNW_piclenvd_debug") != NULL) env_debug = 1; @@ -2229,7 +2243,7 @@ envd_setup(void) * at least one sensor. */ if (envd_setup_sensors() <= 0) { - return (NULL); + return (0); } /* @@ -2259,13 +2273,13 @@ envd_setup(void) } if (envd_dimm_fan.present) { - if (dimm_fan_thr_created == B_FALSE) { - if (pthread_create(&dimm_fan_thr_id, &thr_attr, dimm_fan_thr, - NULL) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - dimm_fan_thr_created = B_TRUE; - } + if (dimm_fan_thr_created == B_FALSE) { + if (pthread_create(&dimm_fan_thr_id, &thr_attr, + dimm_fan_thr, NULL) != 0) + envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); + else + dimm_fan_thr_created = B_TRUE; + } } /* @@ -2279,13 +2293,13 @@ envd_setup(void) pmthr_created = B_TRUE; } if (monitor_disk_temp) { - if (disk_temp_thr_created == B_FALSE) { - if (pthread_create(&disk_temp_thr_id, &thr_attr, disk_temp_thr, - NULL) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - disk_temp_thr_created = B_TRUE; - } + if (disk_temp_thr_created == B_FALSE) { + if (pthread_create(&disk_temp_thr_id, &thr_attr, + disk_temp_thr, NULL) != 0) + envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); + else + disk_temp_thr_created = B_TRUE; + } } return (0); } @@ -2830,18 +2844,19 @@ is_dimm_fan_failed(void) if (retry_count != MAX_RETRIES_FOR_PIC16F819_REG_READ) { if (env_debug) envd_log(LOG_ERR, - "%d retries attempted in reading STATUS register.\n", + "%d retries attempted in reading STATUS " + "register.\n", (MAX_RETRIES_FOR_PIC16F819_REG_READ - retry_count)); } if (retry_count == 0) { (void) strncpy(dimm_fan_status_string, NOT_AVAILABLE, - sizeof (dimm_fan_status_string)); + sizeof (dimm_fan_status_string)); (void) strncpy(dimm_fan_command_string, NOT_AVAILABLE, - sizeof (dimm_fan_command_string)); + sizeof (dimm_fan_command_string)); (void) strncpy(dimm_fan_debug_string, NOT_AVAILABLE, - sizeof (dimm_fan_debug_string)); + sizeof (dimm_fan_debug_string)); (void) strncpy(dimm_fan_rpm_string, NOT_AVAILABLE, - sizeof (dimm_fan_rpm_string)); + sizeof (dimm_fan_rpm_string)); return (-1); } if (env_debug) @@ -2849,33 +2864,33 @@ is_dimm_fan_failed(void) "DIMM FAN STATUS reg = 0x%x\n", i2c_reg.reg_value); if (i2c_reg.reg_value & PIC16F819_FAN_FAILED) { (void) snprintf(dimm_fan_status_string, - sizeof (dimm_fan_status_string), "0x%x", - i2c_reg.reg_value); + sizeof (dimm_fan_status_string), "0x%x", + i2c_reg.reg_value); i2c_reg.reg_num = PIC16F819_DEBUG_REGISTER; if (ioctl(envd_dimm_fan.fd, I2C_GET_REG, &i2c_reg) == -1) { (void) strncpy(dimm_fan_debug_string, NOT_AVAILABLE, - sizeof (dimm_fan_debug_string)); + sizeof (dimm_fan_debug_string)); } else { (void) snprintf(dimm_fan_debug_string, - sizeof (dimm_fan_debug_string), - "0x%x", i2c_reg.reg_value); + sizeof (dimm_fan_debug_string), + "0x%x", i2c_reg.reg_value); } i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; if (ioctl(envd_dimm_fan.fd, I2C_GET_REG, &i2c_reg) == -1) { (void) strncpy(dimm_fan_command_string, NOT_AVAILABLE, - sizeof (dimm_fan_command_string)); + sizeof (dimm_fan_command_string)); } else { (void) snprintf(dimm_fan_command_string, - sizeof (dimm_fan_command_string), - "0x%x", i2c_reg.reg_value); + sizeof (dimm_fan_command_string), + "0x%x", i2c_reg.reg_value); } if (get_dimm_fan_speed(envd_dimm_fan.fd, &fan_speed) == -1) { (void) strncpy(dimm_fan_rpm_string, NOT_AVAILABLE, - sizeof (dimm_fan_rpm_string)); + sizeof (dimm_fan_rpm_string)); } else { (void) snprintf(dimm_fan_rpm_string, - sizeof (dimm_fan_rpm_string), - "%d", fan_speed); + sizeof (dimm_fan_rpm_string), + "%d", fan_speed); } return (1); } else return (0); diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c index 56dcf64224..ca9ebe3ac6 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -88,22 +86,22 @@ typedef struct { */ static sensor_node_t sensor_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_CPU0_DIE, NULL, NULL, NULL, NULL}, + SENSOR_CPU0_DIE, NULL, 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_CPU1_DIE, NULL, NULL, NULL, NULL}, + SENSOR_CPU1_DIE, NULL, 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_INT_AMB_0, NULL, NULL, NULL, NULL}, + SENSOR_INT_AMB_0, NULL, 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_SYS_OUT, NULL, NULL, NULL, NULL}, + SENSOR_SYS_OUT, NULL, 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_SYS_IN, NULL, NULL, NULL, NULL}, + SENSOR_SYS_IN, NULL, 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_INT_AMB_1, NULL, NULL, NULL, NULL}, + SENSOR_INT_AMB_1, NULL, 0, 0, 0}, }; #define N_SENSOR_NODES (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) @@ -115,7 +113,7 @@ static sensor_node_t sensor_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -127,19 +125,19 @@ typedef struct { */ static fan_node_t fan_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - ENV_CPU0_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_CPU0_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - ENV_CPU1_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_CPU1_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,52", - ENV_DIMM_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_DIMM_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, }; #define N_FAN_NODES (sizeof (fan_nodes)/sizeof (fan_nodes[0])) @@ -150,7 +148,7 @@ static fan_node_t fan_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *disk_name; /* disk name */ - env_disk_t *diskp; /* disk information */ + env_disk_t *diskp; /* disk information */ picl_nodehdl_t nodeh; /* "disk" node handle */ picl_prophdl_t proph; /* "Temperature" property handle */ } disk_node_t; @@ -159,8 +157,8 @@ typedef struct { * Disk node array */ static disk_node_t disk_nodes[] = { - {DISK0_NODE_PATH, ENV_DISK0, NULL, NULL, NULL}, - {DISK1_NODE_PATH, ENV_DISK1, NULL, NULL, NULL}, + {DISK0_NODE_PATH, ENV_DISK0, NULL, 0, 0}, + {DISK1_NODE_PATH, ENV_DISK1, NULL, 0, 0}, }; #define N_DISK_NODES (sizeof (disk_nodes)/sizeof (disk_nodes[0])) @@ -178,7 +176,7 @@ static void delete_fan_nodes_and_props(void); static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; int i; @@ -207,7 +205,7 @@ get_current_temp(ptree_rarg_t *parg, void *buf) static int get_disk_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; disk_node_t *dnodep; int i; @@ -497,12 +495,12 @@ delete_sensor_nodes_and_props(void) for (i = 0; i < N_SENSOR_NODES; ++i) { snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -529,11 +527,12 @@ add_disk_nodes_and_props() */ err = ptree_get_node_by_path(dnodep->parent_path, &nodeh); if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, "failed to get node for path %s\n", - dnodep->parent_path); - err = PICL_SUCCESS; - continue; + if (env_debug) + envd_log(LOG_ERR, + "failed to get node for path %s\n", + dnodep->parent_path); + err = PICL_SUCCESS; + continue; } diskp = dnodep->diskp; if (diskp->present == B_FALSE) @@ -584,24 +583,24 @@ add_disk_nodes_and_props() */ (void) add_regular_prop(cnodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_shutdown), - (void *)&(diskp->low_shutdown), &proph); + PICL_PTYPE_INT, PICL_READ, + sizeof (diskp->low_shutdown), + (void *)&(diskp->low_shutdown), &proph); (void) add_regular_prop(cnodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_warning), - (void *)&(diskp->low_warning), &proph); + PICL_PTYPE_INT, PICL_READ, + sizeof (diskp->low_warning), + (void *)&(diskp->low_warning), &proph); (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_warning), - (void *)&(diskp->high_warning), &proph); + PICL_PTYPE_INT, PICL_READ, + sizeof (diskp->high_warning), + (void *)&(diskp->high_warning), &proph); (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_shutdown), - (void *)&(diskp->high_shutdown), &proph); + PICL_PTYPE_INT, PICL_READ, + sizeof (diskp->high_shutdown), + (void *)&(diskp->high_shutdown), &proph); } if (err != PICL_SUCCESS) { @@ -633,11 +632,11 @@ delete_disk_nodes_and_props(void) for (i = 0; i < N_DISK_NODES; ++i) { dnodep = &disk_nodes[i]; - if (dnodep->nodeh != NULL) { + if (dnodep->nodeh != 0) { (void) ptree_delete_node(dnodep->nodeh); (void) ptree_destroy_node(dnodep->nodeh); - dnodep->nodeh = NULL; - dnodep->proph = NULL; + dnodep->nodeh = 0; + dnodep->proph = 0; } } } @@ -716,14 +715,14 @@ add_fan_nodes_and_props() * We do not permit setting of DIMM FAN speeds. */ err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ, sizeof (fanspeed_t), - get_current_speed, - NULL, &proph); + PICL_READ, sizeof (fanspeed_t), + get_current_speed, + NULL, &proph); } else { err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ|PICL_WRITE, sizeof (fanspeed_t), - get_current_speed, - set_current_speed, &proph); + PICL_READ|PICL_WRITE, sizeof (fanspeed_t), + get_current_speed, + set_current_speed, &proph); } if (err != PICL_SUCCESS) @@ -772,10 +771,10 @@ delete_fan_nodes_and_props(void) for (i = 0; i < N_FAN_NODES; ++i) { fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -943,9 +942,9 @@ env_picl_setup(void) for (i = 0; i < N_SENSOR_NODES; ++i) { snodep = &sensor_nodes[i]; snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->target_proph = 0; } /* @@ -954,8 +953,8 @@ env_picl_setup(void) for (i = 0; i < N_FAN_NODES; ++i) { fnodep = &fan_nodes[i]; fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* @@ -964,8 +963,8 @@ env_picl_setup(void) for (i = 0; i < N_DISK_NODES; ++i) { dnodep = &disk_nodes[i]; dnodep->diskp = disk_lookup(dnodep->disk_name); - dnodep->nodeh = NULL; - dnodep->proph = NULL; + dnodep->nodeh = 0; + dnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile index 742a6e15ea..3d3bc5207a 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile index fb9ff5bce6..e39aa55ba6 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile @@ -40,8 +40,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONF) +all: $(CONF) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -64,9 +61,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile index 4ac6eea388..5b2bb38b89 100644 --- a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile @@ -38,8 +38,6 @@ CONF= picldevtree.conf picl_asr.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,9 +46,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile index c187457c0b..6562f0e1be 100644 --- a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile @@ -41,8 +41,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -51,9 +49,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -71,9 +68,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile index 03a1424c95..0b25d4ea58 100644 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile index ff0ac687ba..bc16ab475b 100644 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile @@ -57,8 +57,6 @@ OTHERINFOS += fru_SC_data.info SB-tables.info OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info OTHERINFOS += fru_usb-b-1_data.info fru_usb-b-2_data.info -CLEANFILES = $(LINTOUT) $(LINTLIB) - .KEEP_STATE: all: $(CONFS) @@ -87,11 +85,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - @echo "nothing to lint" FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile index 7a6132b8ef..94f4690106 100644 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile @@ -60,8 +60,6 @@ OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info OTHERINFOS += $(INCDIR2)/fru_usb-b-1_data.info OTHERINFOS += $(INCDIR2)/fru_usb-b-2_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -70,9 +68,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -90,9 +87,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile index 8d1f065dee..ac1a31716e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile @@ -44,17 +44,10 @@ LIBS = $(DYNLIB) ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil CPPFLAGS += -D_REENTRANT CFLAGS += $(CCVERBOSE) -LINTFLAGS = -uxmn -I.. -I$(SRC)/lib/libpicl -I$(SRC)/lib/libpicltree DYNFLAGS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) @@ -62,7 +55,7 @@ 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 += -lpicltree -lpicld_pluginutil -lpiclevent -lpicldevtree .KEEP_STATE: @@ -72,7 +65,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE = piclenvmon_sun4u.po @@ -100,11 +92,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile index afe5362311..e441499565 100644 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile @@ -28,7 +28,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -53,12 +53,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) @@ -79,7 +73,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -109,11 +102,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c index c33b7ab029..64420e7306 100644 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -133,7 +131,7 @@ static sensor_node_t sensor_nodes[] = { */ typedef struct { char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -203,7 +201,7 @@ get_current_target_temp(ptree_rarg_t *parg, void *buf) static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; @@ -298,7 +296,7 @@ add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) */ static node_list_t * get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) + node_list_t *listp) { int err; char clname[PICL_CLASSNAMELEN_MAX+1]; @@ -507,7 +505,7 @@ add_sensor_nodes_and_props(picl_nodehdl_t plath) * Skip if already initialized or no sensor info */ sensorp = snodep->sensorp; - if (snodep->nodeh != NULL || sensorp == NULL) + if (snodep->nodeh != 0 || sensorp == NULL) continue; /* @@ -628,18 +626,18 @@ delete_sensor_nodes_and_props(void) */ for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - if (snodep->sdev_proph != NULL) { + if (snodep->sdev_proph != 0) { (void) ptree_delete_prop(snodep->sdev_proph); (void) ptree_destroy_prop(snodep->sdev_proph); - snodep->sdev_proph = NULL; + snodep->sdev_proph = 0; } - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -682,7 +680,7 @@ add_fan_nodes_and_props(picl_nodehdl_t plath) for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { /* Skip if already initialized or no fan info */ - if (fnodep->nodeh != NULL || fnodep->fanp == NULL) + if (fnodep->nodeh != 0 || fnodep->fanp == NULL) continue; /* @@ -731,9 +729,9 @@ add_fan_nodes_and_props(picl_nodehdl_t plath) */ pname = PICL_PROP_FAN_SPEED_UNIT; err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); + PICL_PTYPE_CHARSTRING, PICL_READ, + strlen(fnodep->speed_unit)+1, + (void *)fnodep->speed_unit, &proph); if (err != PICL_SUCCESS) break; @@ -770,10 +768,10 @@ delete_fan_nodes_and_props(void) */ for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -806,7 +804,7 @@ get_envmodel_conf_file(char *outfilename) } (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENVMODEL_CONF_FILE); + ENVMODEL_CONF_FILE); if (access(pname, R_OK) == 0) { (void) strlcpy(outfilename, pname, PATH_MAX); @@ -842,10 +840,10 @@ env_picl_setup(void) */ for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; - snodep->sdev_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->target_proph = 0; + snodep->sdev_proph = 0; } /* @@ -853,8 +851,8 @@ env_picl_setup(void) */ for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile index 00fda41e12..1f9357e218 100644 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile @@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 #INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile index 799e66fc55..0cf1ee4f96 100644 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile @@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -63,9 +60,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile index 988aa07611..375d7f990e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile @@ -43,7 +43,6 @@ LIBS = $(DYNLIB) ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) CSTYLE = cstyle -p -P HDRCHK = hdrchk @@ -69,7 +68,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE= $(LIBRARY:.a=.po) @@ -108,7 +106,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c b/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c index e0849ebc47..f73c2585c5 100644 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c +++ b/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c @@ -210,7 +210,7 @@ lock_container_lock(picl_nodehdl_t nodehdl, int object_type, int operation) static hash_obj_t * lookup_node_object(picl_nodehdl_t nodehdl, int object_type, - container_tbl_t *cont_tbl) + container_tbl_t *cont_tbl) { int index_to_hash; hash_obj_t *first_hash; @@ -561,7 +561,7 @@ free_packet_list(hash_obj_t *hash_obj, container_tbl_t *cont_tbl) static void free_segment_node(hash_obj_t *hash_obj, picl_nodehdl_t nodehdl, - container_tbl_t *cont_tbl) + container_tbl_t *cont_tbl) { hash_obj_t *prev_hash_obj; hash_obj_t *next_obj; @@ -1107,7 +1107,7 @@ frudata_delete_packet(ptree_warg_t *warg, const void *buf) static int add_row_to_table(hash_obj_t *seg_obj, picl_nodehdl_t tblhdl, packet_t *pkt, - container_tbl_t *cont_tbl) + container_tbl_t *cont_tbl) { int retval; int paylen; @@ -1195,7 +1195,7 @@ add_row_to_table(hash_obj_t *seg_obj, picl_nodehdl_t tblhdl, packet_t *pkt, static int frudata_read_packet(picl_nodehdl_t nodeh, picl_prophdl_t *tblhdl, - container_tbl_t *cont_tbl, door_cred_t *cred) + container_tbl_t *cont_tbl, door_cred_t *cred) { int cnt; int retval; @@ -1388,7 +1388,7 @@ freeup(picl_nodehdl_t nodeh) static int create_segment_node(hash_obj_t *sec_obj, picl_nodehdl_t sec_node, - segment_t *segment, container_tbl_t *cont_tbl, door_cred_t *cred) + segment_t *segment, container_tbl_t *cont_tbl, door_cred_t *cred) { int retval; @@ -1745,7 +1745,7 @@ frudata_add_segment(ptree_warg_t *warg, const void *buf) static int create_section_node(picl_nodehdl_t nodehdl, int section_count, - section_t *section, container_tbl_t *cont_tbl) + section_t *section, container_tbl_t *cont_tbl) { char sec_name[SECNAMESIZE]; hash_obj_t *hash_obj; @@ -2167,7 +2167,7 @@ delete_frudata_props(picl_nodehdl_t fru_hdl) /* ARGSUSED */ static void frudata_state_change_evhandler(const char *event_name, const void *event_arg, - size_t size, void *cookie) + size_t size, void *cookie) { int rc; nvlist_t *nvlp; @@ -2180,7 +2180,7 @@ frudata_state_change_evhandler(const char *event_name, const void *event_arg, if (strcmp(event_name, PICLEVENT_STATE_CHANGE) != 0) return; - if (nvlist_unpack((char *)event_arg, size, &nvlp, NULL)) { + if (nvlist_unpack((char *)event_arg, size, &nvlp, 0)) { return; } @@ -2271,7 +2271,7 @@ frudata_state_change_evhandler(const char *event_name, const void *event_arg, /* ARGSUSED */ static void frudata_event_handler(const char *event_name, const void *event_arg, - size_t size, void *cookie) + size_t size, void *cookie) { int retval; char fullfilename[PATH_MAX]; @@ -2316,7 +2316,7 @@ frudata_event_handler(const char *event_name, const void *event_arg, /* * Function : plugin_init() is called by daemon. this routine is specified - * while registering with daemon. it performs the initialization + * while registering with daemon. it performs the initialization * of plugin module. */ diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile index 6002d0c4d9..481f1d6d48 100644 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile @@ -28,7 +28,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -51,12 +51,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins @@ -77,7 +71,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -105,11 +98,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c index 6431df8bde..f456eb0fb2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -154,7 +152,7 @@ static sensor_node_t sensor_nodes[] = { */ typedef struct { char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -188,7 +186,7 @@ static void delete_fan_nodes_and_props(void); static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; @@ -275,7 +273,7 @@ add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) */ static node_list_t * get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) + node_list_t *listp) { int err; char clname[PICL_CLASSNAMELEN_MAX+1]; @@ -484,7 +482,7 @@ add_sensor_nodes_and_props(picl_nodehdl_t plath) * Skip if already initialized or no sensor info */ sensorp = snodep->sensorp; - if (snodep->nodeh != NULL || sensorp == NULL) + if (snodep->nodeh != 0 || sensorp == NULL) continue; /* @@ -590,18 +588,18 @@ delete_sensor_nodes_and_props(void) */ for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - if (snodep->sdev_proph != NULL) { + if (snodep->sdev_proph != 0) { (void) ptree_delete_prop(snodep->sdev_proph); (void) ptree_destroy_prop(snodep->sdev_proph); - snodep->sdev_proph = NULL; + snodep->sdev_proph = 0; } - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -644,7 +642,7 @@ add_fan_nodes_and_props(picl_nodehdl_t plath) for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { /* Skip if already initialized or no fan info */ - if (fnodep->nodeh != NULL || fnodep->fanp == NULL) + if (fnodep->nodeh != 0 || fnodep->fanp == NULL) continue; /* @@ -691,7 +689,7 @@ add_fan_nodes_and_props(picl_nodehdl_t plath) /* * Add other "fan" class properties */ - pname = PROP_FAN_SPEED_UNIT, + pname = PROP_FAN_SPEED_UNIT; err = add_regular_prop(cnodeh, pname, PICL_PTYPE_CHARSTRING, PICL_READ, strlen(fnodep->speed_unit)+1, @@ -732,10 +730,10 @@ delete_fan_nodes_and_props(void) */ for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -768,7 +766,7 @@ get_envmodel_conf_file(char *outfilename) } (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENVMODEL_CONF_FILE); + ENVMODEL_CONF_FILE); if (access(pname, R_OK) == 0) { (void) strlcpy(outfilename, pname, PATH_MAX); @@ -793,9 +791,9 @@ env_picl_setup(void) */ for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->sdev_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->sdev_proph = 0; } /* @@ -803,8 +801,8 @@ env_picl_setup(void) */ for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile index c6f93ba6b4..eabffc5363 100644 --- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile @@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -63,9 +60,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile index a1a6034e34..96f5b718fd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile @@ -44,12 +44,6 @@ LIBS = $(DYNLIB) ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/cmd/picl/plugins/common/memcfg CFLAGS += $(CCVERBOSE) LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) @@ -68,7 +62,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE= piclmemcfg.po @@ -91,11 +84,7 @@ $(LIBLINKS): FRC include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c index 30505cc151..0277cb3c4a 100644 --- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c +++ b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This plugin creates memory configuration nodes and properties in the * PICL tree for Grover/Grover+ platform. @@ -101,7 +99,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo) * It means no segment for the slot if size is zero */ if (mmodinfo[i].size == 0) { - memsegh[i] = NULL; + memsegh[i] = 0; continue; } @@ -165,7 +163,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo) * Add reference property to the memory module if memory * module node handle is not NULL. */ - if (mmodinfo[i].memmodh == NULL) + if (mmodinfo[i].memmodh == 0) continue; err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, @@ -185,7 +183,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo) * Undo in the logical memory tree */ for (i = 0; i < TOTAL_MEM_SLOTS; i++) { - if (memsegh[i] == NULL) + if (memsegh[i] == 0) continue; (void) ptree_delete_node(memsegh[i]); @@ -274,7 +272,7 @@ create_physical_tree(picl_nodehdl_t plfh, mmodinfo_t *mmodinfo) * logical memory tree won't link to memory module. */ for (i = 0; i < TOTAL_MEM_SLOTS; i++) - mmodinfo[i].memmodh = NULL; + mmodinfo[i].memmodh = 0; /* * Undo in the physical memory tree diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile index ab16c18b3f..046f2155ab 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile @@ -42,17 +42,14 @@ LIBS= $(DYNLIB) ROOTLIBDIR = $(ROOT_PLATFORM)/lib -CONF = fru_container.conf +CONF = fru_container.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) CSTYLE = cstyle -p -P HDRCHK = hdrchk - CPPFLAGS += -I$(SRC)/lib/libfru/include CPPFLAGS += -I$(SRC)/lib/libfruutils/ CFLAGS += $(CCVERBOSE) -DBIG_ENDIAN @@ -71,7 +68,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg LN = ln -s @@ -107,7 +103,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) -m $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c index aaa9e843f7..1bb24230cd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c +++ b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <limits.h> #include <alloca.h> #include "fru_access_impl.h" @@ -777,41 +775,41 @@ fru_open_container(picl_nodehdl_t fruhdl) retval = ptree_get_propval_by_name(fruhdl, PICL_REFPROP_SEEPROM_SRC, &tmphdl, sizeof (tmphdl)); if (retval != PICL_SUCCESS) { - return (NULL); + return (0); } /* Get the device path of the fru */ retval = ptree_get_propval_by_name(tmphdl, PICL_PROP_DEVICEPATH, devpath, PATH_MAX); if (retval != PICL_SUCCESS) { - return (NULL); + return (0); } retval = ptree_get_prop_by_name(tmphdl, PICL_PROP_BINDING_NAME, &prophdl); if (retval != PICL_SUCCESS) { - return (NULL); + return (0); } retval = ptree_get_propinfo(prophdl, &propinfo); if (retval != PICL_SUCCESS) { - return (NULL); + return (0); } bname = alloca(propinfo.piclinfo.size); if (bname == NULL) { - return (NULL); + return (0); } /* get the driver binding name */ retval = ptree_get_propval(prophdl, bname, propinfo.piclinfo.size); if (retval != PICL_SUCCESS) { - return (NULL); + return (0); } cont_hash_obj = create_container_hash_object(); if (cont_hash_obj == NULL) { - return (NULL); + return (0); } add_hashobject_to_hashtable(cont_hash_obj); @@ -823,7 +821,7 @@ fru_open_container(picl_nodehdl_t fruhdl) if (strcmp(bname, "i2c-at34c02") == 0) { device_fd = open(devpath, O_RDONLY); if (device_fd < 0) { - return (NULL); + return (0); } first_byte = 0x00; @@ -861,7 +859,7 @@ fru_open_container(picl_nodehdl_t fruhdl) retval = get_container_info(devpath, bname, &cont_info); } if (retval < 0) { - return (NULL); + return (0); } cont_hash_obj->u.cont_obj->num_of_section = cont_info.num_sections; @@ -870,7 +868,7 @@ fru_open_container(picl_nodehdl_t fruhdl) for (count = 0; count < cont_info.num_sections; count++) { sec_hash_obj = create_section_hash_object(); if (sec_hash_obj == NULL) { - return (NULL); + return (0); } add_hashobject_to_hashtable(sec_hash_obj); @@ -1101,7 +1099,7 @@ call_devfsadm(void) /* * Description : - * fru_get_sections() fills an array of section structures passed + * fru_get_sections() fills an array of section structures passed * as an argument. * * Arguments : @@ -1110,16 +1108,16 @@ call_devfsadm(void) * int : maximum number of section in a container. * * Returns : - * int - * On success,the number of section structures written is returned; - * on error, -1 is returned and "errno" is set appropriately. + * int + * On success,the number of section structures written is returned; + * on error, -1 is returned and "errno" is set appropriately. * */ /* ARGSUSED */ int fru_get_sections(container_hdl_t container, section_t *section, int maxsec, - door_cred_t *cred) + door_cred_t *cred) { int device_fd; int retrys = 1; @@ -1168,16 +1166,16 @@ fru_get_sections(container_hdl_t container, section_t *section, int maxsec, /* * Description : - * fru_get_num_segments() returns the current number of segments + * fru_get_num_segments() returns the current number of segments * in a section. * * Arguments : * section_hdl_t : section header holding section information. * * Return : - * int - * On success, the number of segments in the argument section is - * returned; on error -1 is returned. + * int + * On success, the number of segments in the argument section is + * returned; on error -1 is returned. */ /* ARGSUSED */ @@ -1284,7 +1282,7 @@ fru_get_segments(section_hdl_t section, segment_t *segment, int maxseg, int fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) + section_hdl_t *newsection, door_cred_t *cred) { int fd; int retval; @@ -1300,7 +1298,7 @@ fru_add_segment(section_hdl_t section, segment_t *segment, hash_obj_t *sec_hash; hash_obj_t *seg_hash; fru_segdesc_t *new_seg_desc; - unsigned char *crcbuf; + unsigned char *crcbuf; section_layout_t sec_layout; segment_layout_t *seg_layout; segment_layout_t *segment_buf; @@ -1560,7 +1558,7 @@ free_segment_hash(handle_t handle, hash_obj_t *sec_hash) int fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) + door_cred_t *cred) { int num_of_seg; int bufsize; @@ -1712,14 +1710,14 @@ fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, /* * Description : - * fru_read_segment() reads the raw contents of a segment. + * fru_read_segment() reads the raw contents of a segment. * * Arguments : segment_hdl_t : segment handle. * void * : buffer containing segment data when function returns. * size_t :number of bytes. * * Return : - * int + * int * On success, the number of bytes read is returned; * * Notes : @@ -2223,8 +2221,8 @@ fru_get_packets(segment_hdl_t segment, packet_t *packet, int maxpackets, * size_t : sizeof the buffer. * * Return : - * int - * On success, the number of bytes copied is returned; On error + * int + * On success, the number of bytes copied is returned; On error * -1 returned. */ @@ -2252,7 +2250,7 @@ fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, /* * Description : - * fru_update_payload() writes the contents of a packet's payload. + * fru_update_payload() writes the contents of a packet's payload. * * Arguments : packet_hdl_t : packet handle. * const void * : data buffer. @@ -2260,7 +2258,7 @@ fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, * packet_hdl_t : new packet handle. * * Return : - * int + * int * On success, 0 is returned; on failure * -1 is returned. */ @@ -2360,22 +2358,22 @@ fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, * segment_hdl_t segment * A handle for the segment to which the packet will be appended. * - * packet_t *packet - * On entry, the "tag" component of "packet" specifies the tag - * value for the added packet; the "handle" component is ignored. - * On return, the "handle" component is set to the handle of the - * appended packet. + * packet_t *packet + * On entry, the "tag" component of "packet" specifies the tag + * value for the added packet; the "handle" component is ignored. + * On return, the "handle" component is set to the handle of the + * appended packet. * - * const void *payload - * A pointer to the caller's buffer containing the payload data for - * the appended packet. + * const void *payload + * A pointer to the caller's buffer containing the payload data for + * the appended packet. * - * size_t nbytes - * The size of the caller buffer. + * size_t nbytes + * The size of the caller buffer. * * Return : - * int - * On success, 0 is returned; on error -1 is returned; + * int + * On success, 0 is returned; on error -1 is returned; */ int @@ -2522,7 +2520,7 @@ fru_append_packet(segment_hdl_t segment, packet_t *packet, const void *payload, seg_hash->u.seg_obj->trailer_offset = trailer_offset; seg_hash->u.seg_obj->num_of_packets += 1; - *newsegment = segment; /* return new segment handle */ + *newsegment = segment; /* return new segment handle */ return (0); } else { errno = EAGAIN; @@ -2601,18 +2599,18 @@ free_packet_object(handle_t handle, hash_obj_t *seg_hash) /* * Description : - * fru_delete_packet() deletes a packet from a segment. + * fru_delete_packet() deletes a packet from a segment. * * Arguments : packet_hdl_t : packet number to be deleted. * segment_hdl_t : new segment handler. * * Return : - * int - * On success, 0 is returned; on error, -1. + * int + * On success, 0 is returned; on error, -1. * * NOTES - * Packets are adjacent; thus, deleting a packet requires moving - * succeeding packets to compact the resulting hole. + * Packets are adjacent; thus, deleting a packet requires moving + * succeeding packets to compact the resulting hole. */ int @@ -2666,7 +2664,7 @@ fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { errno = EPERM; - return (-1); /* read-only section */ + return (-1); /* read-only section */ } prev_obj = seg_hash->u.seg_obj->pkt_obj_list; diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile index a2b3c705ad..b0a8e11fae 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile @@ -20,13 +20,9 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1999-2000 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/picl/plugins/sun4u/littleneck/conf/Makefile -# OBJECTS= @@ -44,16 +40,12 @@ install := FILEMODE = 0444 CONF= platsvcd.conf psvcobj.conf ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) -SRCS= +SRCS= LIBS = $(DYNLIB) -CLEANFILES= $(LINTOUT) $(LINTLIB) - ZDEFS = -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -62,7 +54,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile index 730e4518f3..dc83c086e4 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile @@ -39,8 +39,6 @@ install := FILEMODE = 0444 CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile index b740b5f92f..8e63545e8e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile @@ -38,9 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile index 5d672d87f4..5826a15c23 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libpiclfrutree.a VERS= .1 @@ -51,7 +49,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= $(CONF:%.conf=%.info) -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) CPPFLAGS += -I$(SRC)/lib/libdevfsevent -I$(SRC)/uts/common @@ -64,7 +61,6 @@ LDLIBS += -L$(ROOT)/usr/lib/picl/plugins LDLIBS += -L$(SRC)/lib/libptree/$(MACH) LDLIBS += -lc -lpicltree -lpicldevtree DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LINTFLAGS += -L$(SRC)/lib/libptree/$(MACH) -lpicltree .KEEP_STATE: @@ -77,7 +73,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONF) @@ -99,7 +94,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile index c1a0ec767c..e9589f5d17 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libpsvcplugin_psr.a VERS= .1 @@ -45,8 +43,6 @@ ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -59,8 +55,6 @@ DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -72,7 +66,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -94,7 +87,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile index e867640d53..57dbd4e21d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libpsvcpolicy_psr.a VERS= .1 @@ -43,8 +41,6 @@ LIBS = $(DYNLIB) PLATFORM=SUNW,Sun-Fire-280R -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj CPPFLAGS += -D_REENTRANT @@ -57,9 +53,7 @@ LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin -LDLIBS += -lc -ldevice - -LINTFLAGS += +LDLIBS += -lc -ldevice .KEEP_STATE: @@ -76,7 +70,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -107,7 +100,6 @@ $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile index b063122f37..eeff700683 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile @@ -38,8 +38,6 @@ CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,9 +46,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC 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 b133401eee..8f4b2cb9be 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile @@ -47,12 +47,6 @@ CONF= fcal_leds.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS CPPFLAGS += -D_REENTRANT @@ -82,7 +76,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE = piclfcal_leds_lw2plus.po @@ -110,11 +103,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile index fb21e574fc..dd60c4c1aa 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile index edc856be27..9eabe5f501 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile @@ -40,8 +40,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONF) +all: $(CONF) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -65,9 +62,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile index 29a68aec18..bd51e39ecf 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile @@ -47,12 +47,6 @@ LIBS = $(DYNLIB) ROOTLIBDIR = $(ROOT_PLAT_LIBDIR) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) - CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRC)/uts/sun4u/lw8 CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess @@ -69,7 +63,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg POFILE= libfruaccess.po @@ -92,11 +85,7 @@ $(LIBLINKS): FRC include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c index a4fea2bd61..0a2cf07c0c 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c +++ b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <errno.h> #include <fcntl.h> @@ -78,7 +76,7 @@ int fru_append_packet(segment_hdl_t segment, packet_t *packet, segment_hdl_t *newsegment, door_cred_t *cred); int fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, door_cred_t *cred); -int fru_is_data_available(picl_nodehdl_t fru); +int fru_is_data_available(picl_nodehdl_t fru); #define PICL_PROP_SC_HANDLE "SC_handle" #define PICL_PROP_DATA_AVAIL "FRUDataAvailable" @@ -114,19 +112,19 @@ fru_open_container(picl_nodehdl_t fruh) container_hdl_t container_hdl; if (fru_open_dev() == -1) { - return (NULL); + return (0); } - err = ptree_get_propval_by_name(fruh, PICL_PROP_DATA_AVAIL, NULL, NULL); + err = ptree_get_propval_by_name(fruh, PICL_PROP_DATA_AVAIL, NULL, 0); if (err != PICL_SUCCESS) { syslog(LOG_ERR, GETPV, PICL_PROP_DATA_AVAIL, err); - return (NULL); + return (0); } err = ptree_get_propval_by_name(fruh, PICL_PROP_SC_HANDLE, &container_hdl, sizeof (container_hdl_t)); if (err != PICL_SUCCESS) { syslog(LOG_ERR, GETPV, PICL_PROP_SC_HANDLE, err); - return (NULL); + return (0); } return (container_hdl); } diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile index 2819caf8bd..8c156163bd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile @@ -50,13 +50,6 @@ LIBS = $(DYNLIB) ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES = $(LINTOUT) $(LINTLIB) - - CPPFLAGS += -D_SGFRU CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins @@ -77,7 +70,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -98,11 +90,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c index f4e14aa564..bb0c4d5567 100644 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c +++ b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This plugin-in creates the FRU Hierarchy for the * SUNW,Netra-T12 platform and manages the environmental sensors @@ -126,7 +124,7 @@ static picld_plugin_reg_t my_reg_info = { #define PICL_PROPVAL_DISABLED "disabled" #define PICL_PROPVAL_UNKNOWN "unknown" #define PICL_PROPVAL_SELF_REGULATING "self-regulating" -#define PICL_PROPVAL_PER_CENT "%" +#define PICL_PROPVAL_PER_CENT "%" #define PICL_PROP_BANK_STATUS "bank-status" /* @@ -297,7 +295,7 @@ static char *hpu_condition_table[] = {"unknown", "okay", "failing", * variables set up in init */ static picl_nodehdl_t frutreeh; -static picl_nodehdl_t sch = NULL; +static picl_nodehdl_t sch = 0; static int init_complete; static int pcix_io = 0; @@ -746,7 +744,7 @@ add_fru_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, * if sgfrunode already there, then just carry on own the tree */ childh = find_child_by_name(parh, nodename); - if (childh != NULL) { + if (childh != 0) { /* * for frus other than dimms and ecaches, update environmental * sensors and board status if necessary @@ -807,7 +805,7 @@ add_fru_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, * a dr event - ie post-initialisation */ if (init_complete) - post_frudr_event(PICL_FRU_ADDED, parh, NULL); + post_frudr_event(PICL_FRU_ADDED, parh, 0); /* * Create empty Devices table - we'll add lines to it as we go along @@ -941,7 +939,7 @@ add_location_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, * if node already there, then just carry on down the tree */ childh = find_child_by_name(parh, labelp); - if (childh != NULL) { + if (childh != 0) { *childp = childh; return (PICL_SUCCESS); } @@ -1330,7 +1328,7 @@ add_intermediate_nodes(picl_nodehdl_t *nodep, char *labelp, * created) */ intermediate = find_child_by_name(*nodep, labelp); - if (intermediate == NULL) { + if (intermediate == 0) { intermediate = *nodep; err = add_intermediate_location(&intermediate, labelp, slot_name); @@ -1344,7 +1342,7 @@ add_intermediate_nodes(picl_nodehdl_t *nodep, char *labelp, * created) */ intermediate2 = find_child_by_name(intermediate, labelp); - if (intermediate2 == NULL) { + if (intermediate2 == 0) { /* * need to create intermediate fru node node */ @@ -1436,19 +1434,19 @@ find_child_by_name(picl_nodehdl_t parh, char *name) err = ptree_get_propval_by_name(parh, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); for (;;) { err = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, nodename, sizeof (nodename)); if (err != PICL_SUCCESS) - return (NULL); + return (0); if (strcmp(name, nodename) == 0) { return (nodeh); } err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); } } @@ -1457,7 +1455,7 @@ create_dimm_references(picl_nodehdl_t parh, int dimm_id, picl_nodehdl_t nodeh, picl_prophdl_t tblhdl) { int err; - picl_nodehdl_t memctlhdl = NULL; + picl_nodehdl_t memctlhdl = 0; picl_nodehdl_t memgrphdl; picl_nodehdl_t memhdl; char name[MAXPATHLEN]; @@ -1662,8 +1660,8 @@ create_cpu_references(char *pname, picl_nodehdl_t nodeh, picl_prophdl_t tblhdl) err = ptree_get_prop_by_name(cpuhdl1, PICL_REFPROP_FRU_PARENT, &prophdl); if (err != PICL_SUCCESS) { - err = add_prop_ref(cpuhdl1, nodeh, - PICL_REFPROP_FRU_PARENT); + err = add_prop_ref(cpuhdl1, nodeh, + PICL_REFPROP_FRU_PARENT); if (err != PICL_SUCCESS) return (err); err = create_table_entry(tblhdl, cpuhdl1, @@ -2024,19 +2022,19 @@ frudr_completion_handler(char *ename, void *earg, size_t size) * now frudata has been notified that the node is to be * removed, we can actually remove it */ - fruh = NULL; + fruh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { + if (fruh != 0) { (void) remove_subtree(fruh); /* * Now repopulate the frutree with current data. */ - parh = NULL; + parh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_PARENTHANDLE, &parh); - if (parh != NULL) { + if (parh != 0) { frudr_add_subtree(parh); } } @@ -2058,7 +2056,7 @@ post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) ev_name = strdup(ename); if (ev_name == NULL) return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) { free(ev_name); return; } @@ -2164,7 +2162,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) if (strcmp(ename, PICLEVENT_DR_AP_STATE_CHANGE) != 0) return; - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) return; if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { @@ -2366,7 +2364,7 @@ frumemcfg_evhandler(const char *ename, const void *earg, size_t size, /* * find corresponding frutree dimm nodes */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) return; if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, &nodeh)) { nvlist_free(nvlp); @@ -2574,8 +2572,8 @@ next_bank: */ static int add_sensor_node(picl_nodehdl_t fruhdl, picl_nodehdl_t lochdl, char *nodename, - char *class, char *prop_class, picl_prophdl_t tblhdl, - picl_nodehdl_t *sensorhdlp) + char *class, char *prop_class, picl_prophdl_t tblhdl, + picl_nodehdl_t *sensorhdlp) { int err; @@ -2597,7 +2595,7 @@ add_sensor_node(picl_nodehdl_t fruhdl, picl_nodehdl_t lochdl, char *nodename, if (err != PICL_SUCCESS) return (err); - if (fruhdl != NULL) { + if (fruhdl != 0) { err = add_prop_ref(*sensorhdlp, fruhdl, PICL_REFPROP_FRU_PARENT); } else { @@ -3226,7 +3224,7 @@ add_env_nodes(picl_nodehdl_t nodeh, char *nodename, picl_prophdl_t tblhdl) * check if sensor node has already been created */ sprintf_buf3(buf, "%s_%s", nodename, id); - if (find_child_by_name(sch, buf) != NULL) + if (find_child_by_name(sch, buf) != 0) continue; if (env->sd_id.id.sensor_type == SG_SENSOR_TYPE_COOLING) { @@ -3267,7 +3265,7 @@ add_env_nodes(picl_nodehdl_t nodeh, char *nodename, picl_prophdl_t tblhdl) childh = nodeh; tblhdl2 = tblhdl; } - err = add_sensor_node(childh, NULL, buf, + err = add_sensor_node(childh, 0, buf, hpu_sensor_class_table[env->sd_id.id.sensor_type], hpu_sensor_prop_table[env->sd_id.id.sensor_type], tblhdl2, &sensorhdl); @@ -3627,10 +3625,10 @@ add_led_nodes(picl_nodehdl_t nodeh, char *name, int position, if (position != lom_get_led.position) continue; if (position == LOM_LED_POSITION_LOCATION) { - err = add_sensor_node(NULL, nodeh, buf, PICL_CLASS_LED, + err = add_sensor_node(0, nodeh, buf, PICL_CLASS_LED, PICL_PROP_STATE, tblhdl, &sensorhdl); } else { - err = add_sensor_node(nodeh, NULL, buf, PICL_CLASS_LED, + err = add_sensor_node(nodeh, 0, buf, PICL_CLASS_LED, PICL_PROP_STATE, tblhdl, &sensorhdl); } if (err != PICL_SUCCESS) { @@ -3863,7 +3861,7 @@ update_disk_node(struct lw8_disk *diskp) diskndh = find_child_by_name(slotndh, fruname); err = ptree_get_node_by_path(diskp->d_plat_path, &devhdl); if (err == PICL_SUCCESS) { - if (diskndh != NULL) + if (diskndh != 0) return; err = ptree_create_and_add_node(slotndh, fruname, PICL_CLASS_FRU, &diskndh); @@ -3881,7 +3879,7 @@ update_disk_node(struct lw8_disk *diskp) if (err != PICL_SUCCESS) return; } else { - if (diskndh == NULL) + if (diskndh == 0) return; err = ptree_delete_node(diskndh); if (err != PICL_SUCCESS) diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile index 5353fc53e9..342f09cda5 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile @@ -38,8 +38,6 @@ CONF= picldevtree.conf picl_asr.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,9 +46,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile index 5f2229f5ff..ce2be3f2d8 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile @@ -40,8 +40,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -70,9 +67,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile index ff1bf2e376..48012c187e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile index 7624c2cf55..f5fcac6054 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile @@ -69,12 +69,6 @@ OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info OTHERINFOS += fru_SC_data.info SB-tables.info OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES = $(LINTOUT) $(LINTLIB) - CPPFLAGS += -D_REENTRANT CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil CPPFLAGS += -I$(SRC)/uts/sun4u/mpxu @@ -108,7 +102,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONFS) @@ -163,11 +156,7 @@ $(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) $(RM) -r $@ ;\ $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c index 28adb31207..513f3d4ad4 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c @@ -894,19 +894,19 @@ find_child_by_name(picl_nodehdl_t parh, char *name) err = ptree_get_propval_by_name(parh, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); for (;;) { err = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, nodename, sizeof (nodename)); if (err != PICL_SUCCESS) - return (NULL); + return (0); if (strcmp(name, nodename) == 0) { return (nodeh); } err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); } } @@ -1241,7 +1241,7 @@ frudr_completion_handler(char *ename, void *earg, size_t size) { picl_nodehdl_t fruh; picl_nodehdl_t parh; - picl_nodehdl_t peerh = NULL; + picl_nodehdl_t peerh = 0; char nodename[PICL_PROPNAMELEN_MAX] = { '\0' }; int err; @@ -1250,10 +1250,10 @@ frudr_completion_handler(char *ename, void *earg, size_t size) * now frudata has been notified that the node is to be * removed, we can actually remove it */ - fruh = NULL; + fruh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { + if (fruh != 0) { (void) ptree_get_propval_by_name(fruh, PICL_PROP_PEER, &peerh, sizeof (peerh)); @@ -1301,7 +1301,7 @@ frudr_completion_handler(char *ename, void *earg, size_t size) if ((sys_platform == PLAT_CHALUPA19) && (strncmp(nodename, FT_NAME, FT_NAME_LEN) == 0) && - (peerh != NULL)) { + (peerh != 0)) { /* * On Netra-440 platforms, a fan tray * may contain 2 fans (F0 and F1) but @@ -1337,7 +1337,7 @@ post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) ev_name = strdup(ename); if (ev_name == NULL) return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) { free(ev_name); return; } @@ -1488,7 +1488,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) return; } - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) { return; } @@ -1579,7 +1579,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) /* * fru was there - but has gone away */ - post_frudr_event(PICL_FRU_REMOVED, NULL, fruh); + post_frudr_event(PICL_FRU_REMOVED, 0, fruh); } } else if (rmc_flag) { /* @@ -1589,7 +1589,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) */ if (ptree_get_propval_by_name(locnodeh, PICL_PROP_CHILD, &fruh, sizeof (picl_nodehdl_t)) != PICL_SUCCESS) { - fruh = NULL; + fruh = 0; } post_frudr_event(PICL_FRU_ADDED, locnodeh, fruh); } else { @@ -1598,7 +1598,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) * if node already there, then just return */ childh = find_child_by_name(locnodeh, fru_name); - if (childh != NULL) { + if (childh != 0) { nvlist_free(nvlp); return; } @@ -1641,7 +1641,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) /* * now post event */ - post_frudr_event(PICL_FRU_ADDED, locnodeh, NULL); + post_frudr_event(PICL_FRU_ADDED, locnodeh, 0); } nvlist_free(nvlp); } @@ -1752,7 +1752,7 @@ frutree_evhandler(const char *ename, const void *earg, size_t size, if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) != 0) return; - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) return; if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { @@ -1894,7 +1894,7 @@ set_led(char *name, char *ptr, char *value) /* * if no fru node, then turn led off */ - if (find_child_by_name(locnodeh, DISK_FRU_NAME) != NULL) + if (find_child_by_name(locnodeh, DISK_FRU_NAME) != 0) value_ptr = value; else value_ptr = PICL_PROPVAL_OFF; @@ -2344,7 +2344,7 @@ update_disk_node(char *fruname, char *devpath) return; } diskndh = find_child_by_name(slotndh, DISK_FRU_NAME); - if (diskndh == NULL) { + if (diskndh == 0) { return; } err = ptree_get_node_by_path(devpath, &devhdl); @@ -2491,16 +2491,14 @@ check_raid(int target) static void * disk_leds_thread(void *args) { - int c; - int i; + int c; + int i; char **disk_dev; int fd; devctl_hdl_t dhdl; - int n_disks = 0, - do_raid = 0, - err = 0; + int n_disks = 0, do_raid = 0, err = 0; uint_t statep = 0; static char *mpxu_devs[] = { diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile index 1574d19255..5f705f0ddd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile @@ -53,8 +53,6 @@ OTHERINFOS += $(INCDIR2)/fru_SC_data.info OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -63,9 +61,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -83,9 +80,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile index 45048a9e68..c7e3de6004 100644 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libpsvcobj.a VERS= .1 @@ -45,15 +43,11 @@ PLATFORM = sun4u USR_PLAT_PSVCOBJ = $(LIBS:%=$(USR_PSM_LIB_DIR)/%) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u -I. CFLAGS += $(CCVERBOSE) LDLIBS += -L$(SRC)/lib/libdevfsevent -LDLIBS += -lc - -LINTFLAGS += +LDLIBS += -lc # definitions for install_h target HDRS= psvc_objects.h @@ -70,7 +64,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -90,7 +83,7 @@ include $(SRC)/lib/Makefile.targ $(USR_PSM_LIB_DIR): FRC $(INS.dir) - + $(USR_PSM_INCL_DIR)/%: % $(INS.file) @@ -100,7 +93,6 @@ $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) $(SYMLINK) ./libpsvcobj.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcobj.so lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile index 8beda734ab..0f2e5104ef 100644 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile @@ -58,8 +58,6 @@ USR_PLAT_PLUGINS_DYNLIBS = $(PLAT_PLUGINS_DIRS:%=%/$(DYNLIB)) USR_PLAT_PLUGINS_LIBLINKS = $(PLAT_PLUGINS_DIRS:%=%/$(LIBLINKS)) LNECK_DYNLIB_DIR = ../../../../SUNW,Sun-Fire-280R/lib/picl/plugins -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj @@ -71,7 +69,6 @@ LDLIBS += -R/usr/platform/sun4u/lib LDLIBS += -lc -lpicltree -lpicl -lpsvcobj DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) -LINTFLAGS += .KEEP_STATE: @@ -83,7 +80,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -131,7 +127,6 @@ $(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) $(SYMLINK) $(LNECK_DYNLIB_DIR)/$(DYNLIB) $@ lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile index c33ecf85d9..45537c0dc7 100644 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile @@ -23,10 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile -# + LIBRARY= libpsvcpolicy.a VERS= .1 @@ -46,12 +43,10 @@ PLATFORM = sun4u USR_PLAT_PSVCPOL = $(LIBS:%=$(USR_PSM_LIB_DIR)/%) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/uts/sun4u CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -ZDEFS = +ZDEFS = CFLAGS += $(CCVERBOSE) LDLIBS += $(ZNODEFS) LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) @@ -62,8 +57,6 @@ LDLIBS += -lc -lpsvcobj -lpsvcplugin -lpicltree DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib -LINTFLAGS += - .KEEP_STATE: SUBDIRS= @@ -74,7 +67,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) @@ -102,7 +94,6 @@ $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) $(SYMLINK) ./libpsvcpolicy.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy.so lint : - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile index ec90cb5ba8..7c2f6d37b5 100644 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile index 9e294214f3..eb1e8208d5 100644 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile @@ -43,8 +43,6 @@ CONF= picldevtree.conf picl_asr.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -53,9 +51,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -63,9 +60,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile index dc6765fb41..c0fedc0525 100644 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile @@ -43,8 +43,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -53,9 +51,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -73,9 +70,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile index b4fc38d7f9..d761eaa06d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile @@ -43,8 +43,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -53,7 +51,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -63,9 +60,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile index 85e2ca34bc..a47b93b2d3 100644 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile @@ -64,8 +64,6 @@ OTHERINFOS += fru_FT0_data.info fru_FT1_data.info fru_FT2_data.info OTHERINFOS += fru_FT3_data.info fru_FT4_data.info fru_FT5_data.info OTHERINFOS += fru_FT6_data.info -CLEANFILES = $(LINTOUT) $(LINTLIB) - .KEEP_STATE: all: $(CONFS) @@ -89,11 +87,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - @echo "nothing to lint" FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile index 0f5ebf300d..efb9375959 100644 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile @@ -64,8 +64,6 @@ OTHERINFOS += $(INCDIR2)/fru_FT4_data.info OTHERINFOS += $(INCDIR2)/fru_FT5_data.info OTHERINFOS += $(INCDIR2)/fru_FT6_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -74,9 +72,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -94,9 +91,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile index ae962edb0f..8c985f06b8 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile @@ -38,8 +38,6 @@ CONF= platsvcd.conf psvcobj.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0444 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile index 2e010a0c3f..bdd1beaf57 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile @@ -39,8 +39,6 @@ install := FILEMODE = 0444 CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile index 048cdf3ad0..b4892da578 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile @@ -38,9 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile index abc38b7b30..1d1a624043 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile @@ -43,7 +43,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: @@ -62,9 +61,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile index 2a2326f7af..d198d8608f 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile @@ -62,9 +62,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile index a06b320262..22bc75546c 100644 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile @@ -43,7 +43,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: @@ -62,9 +61,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile index 44416ec824..f7907e24ab 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile @@ -38,8 +38,6 @@ CONF= platsvcd.conf psvcobj.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0444 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile index 6698e9cf65..addc33aa58 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile @@ -39,8 +39,6 @@ install := FILEMODE = 0444 CONF= picldevtree.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile index d2d6771e79..2f508667c3 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile @@ -38,9 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 - -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile index 68e6811ce5..c1a262563d 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile @@ -43,7 +43,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: @@ -62,9 +61,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile index 51d467dff5..47bff2fdfe 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile @@ -43,7 +43,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: @@ -62,9 +61,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile index c33d9c3490..224ad751e4 100644 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile @@ -43,7 +43,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: @@ -62,9 +61,6 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile index 1918094ff2..ce349939a9 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile @@ -29,7 +29,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -54,11 +54,7 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) +CLEANFILES= $(LINTOUT) CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins @@ -80,7 +76,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONF) @@ -110,11 +105,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c index 538e156510..8ca5de7a7e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains the environmental PICL plug-in module. */ @@ -233,15 +231,15 @@ static int get_tach(ptree_rarg_t *parg, void *buf); static int set_tach(ptree_warg_t *parg, const void *buf); static int shutdown_override = 0; -static int sensor_poll_interval = SENSORPOLL_INTERVAL; +static int sensor_poll_interval = SENSORPOLL_INTERVAL; static int warning_interval = WARNING_INTERVAL; -static int shutdown_interval = SHUTDOWN_INTERVAL; +static int shutdown_interval = SHUTDOWN_INTERVAL; static int ovtemp_monitor = 1; /* enabled */ static int pm_monitor = 1; /* enabled */ static int mon_fanstat = 1; /* enabled */ -static int hwm_mode; -static int hwm_tach_enable; +static int hwm_mode; +static int hwm_tach_enable; static char shutdown_cmd[] = SHUTDOWN_CMD; env_tuneable_t tuneables[] = { @@ -901,7 +899,7 @@ envd_setup_sensors(void) */ if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tmin) != -1) { + &tmin) != -1) { sensorp->tmin = TMIN(tmin); } else { sensorp->tmin = -1; @@ -1006,13 +1004,13 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) if (sysfd == -1) { if (env_debug) envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[sys_id], - errno, strerror(errno)); + errno, strerror(errno)); return; } /* Read ADM default value only for the first time */ if (tsave == 0) { if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tsave) == -1) { + &tsave) == -1) { if (env_debug) envd_log(LOG_ERR, "read tminrange ioctl failed"); @@ -1038,7 +1036,7 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) * ADM 1031 Tmin/Trange register need to be reprogrammed. */ tdata = ((fanctl->fan_ctl_pairs[cur_lpstate].tMin / TMIN_UNITS) - << TMIN_SHIFT); + << TMIN_SHIFT); /* Need to pack tRange in ADM bits 2:0 */ switch (fanctl->fan_ctl_pairs[cur_lpstate].tRange) { case 5: @@ -1112,13 +1110,13 @@ pmthr(void *args) do { if (env_debug) { envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x comp:%d " - "oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); + "pmstate event:0x%x flags:%x comp:%d " + "oldval:%d newval:%d path:%s\n", + pmstate.event, pmstate.flags, + pmstate.component, + pmstate.old_level, + pmstate.new_level, + pmstate.physpath); } cur_lpstate = (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; @@ -1149,11 +1147,11 @@ pmthr(void *args) * * FAN ON * Tmin - * ------------------------------------------- + * ------------------------------------------- * - * FAN ON/OFF + * FAN ON/OFF * - * -------------------------------------------- + * -------------------------------------------- * Tmin - Hysterisis * FAN OFF * @@ -1303,13 +1301,13 @@ handle_overtemp_interrupt(int hwm_id) if (env_debug) envd_log(LOG_ERR, - "sensor name %s, cur temp %d, " - "HW %d LW %d SD %d LS %d\n", - sensorp->name, temp, - sensorp->es_ptr->high_warning, - (int)sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_shutdown, - (int)sensorp->es_ptr->low_shutdown); + "sensor name %s, cur temp %d, " + "HW %d LW %d SD %d LS %d\n", + sensorp->name, temp, + sensorp->es_ptr->high_warning, + (int)sensorp->es_ptr->low_warning, + sensorp->es_ptr->high_shutdown, + (int)sensorp->es_ptr->low_shutdown); if (TEMP_IN_WARNING_RANGE(sensorp->cur_temp, sensorp)) { /* @@ -1484,7 +1482,7 @@ envd_setup(void) * at least one sensor. */ if (envd_setup_sensors() <= 0) { - return (NULL); + return (0); } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c index 5310b2440b..df9bf69684 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -87,15 +85,15 @@ typedef struct { static sensor_node_t sensor_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_CPU_DIE, NULL, - NULL, NULL, NULL}, + 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_INT_AMB, NULL, - NULL, NULL, NULL}, + 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_SYS_IN, NULL, - NULL, NULL, NULL} + 0, 0, 0} }; #define NSENSORS (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) @@ -106,7 +104,7 @@ static sensor_node_t sensor_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -118,13 +116,13 @@ typedef struct { */ static fan_node_t fan_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL} + ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0} }; #define NFANS (sizeof (fan_nodes)/sizeof (fan_nodes[0])) @@ -141,7 +139,7 @@ static void delete_fan_nodes_and_props(void); static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; int i; @@ -427,12 +425,12 @@ delete_sensor_nodes_and_props(void) for (i = 0; i < NSENSORS; ++i) { snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -553,10 +551,10 @@ delete_fan_nodes_and_props(void) for (i = 0; i < NFANS; ++i) { fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -723,9 +721,9 @@ env_picl_setup(void) for (i = 0; i < NSENSORS; ++i) { snodep = &sensor_nodes[i]; snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->target_proph = 0; } /* @@ -734,8 +732,8 @@ env_picl_setup(void) for (i = 0; i < NFANS; ++i) { fnodep = &fan_nodes[i]; fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile index f4c3b3b419..ffa5de9635 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile @@ -38,8 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile index e011f2af22..ddb83336e2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile @@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONF) +all: $(CONF) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -63,9 +60,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile index 8b8703a66a..8c180b0473 100644 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile +++ b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile @@ -26,10 +26,6 @@ # Copyright 2019 Peter Tribble. # -# -# cmd/picl/plugins/sun4v/lib/snmp/Makefile -# - LIBRARY= libpiclsnmp.a VERS= .1 OBJECTS= snmplib.o pdu.o asn1.o @@ -48,7 +44,6 @@ LIBS= $(DYNLIB) ROOTLIBDIR = $(ROOT_PLATFORM)/lib -CLEANFILES= $(LINTOUT) $(LINTLIB) CLOBBERFILES += $(LIBLINKS) CPPFLAGS += -I. -I../../include -I$(SRC)/uts/sun4v @@ -73,7 +68,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(DYNLIB) $(LIBLINKS) @@ -87,7 +81,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) -m $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile b/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile index e2adc58af5..fd05cab88f 100644 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile +++ b/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile @@ -23,10 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/mdesc/Makefile -# + LIBRARY= libmdescplugin.a VERS= .1 @@ -48,19 +45,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.com SRCS= $(OBJECTS:%.o=%.c) -LINT_SRC= ./mdescplugin.c ./init.c ./dr.c \ - ./cpu_prop_update.c ./disk_discovery.c \ - $(SRC)/common/mdesc/mdesc_findname.c \ - $(SRC)/common/mdesc/mdesc_findnodeprop.c \ - $(SRC)/common/mdesc/mdesc_fini.c \ - $(SRC)/common/mdesc/mdesc_getpropdata.c \ - $(SRC)/common/mdesc/mdesc_getpropstr.c \ - $(SRC)/common/mdesc/mdesc_getpropval.c \ - $(SRC)/common/mdesc/mdesc_init_intern.c \ - $(SRC)/common/mdesc/mdesc_nodecount.c \ - $(SRC)/common/mdesc/mdesc_rootnode.c \ - $(SRC)/common/mdesc/mdesc_scandag.c - $(OBJS_DIR)/%.o: $(SRC)/common/mdesc/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) @@ -74,8 +58,6 @@ DYNFLAGS_COM = /usr/lib/picl/plugins ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/common/mdesc CPPFLAGS += -I$(SRC)/uts/common/sys CPPFLAGS += -D_REENTRANT @@ -87,8 +69,6 @@ DYNFLAGS += -R$(DYNFLAGS_COM) LDLIBS += -lc -lpicltree -ldevinfo -lpicldevtree -lcfgadm -lnvpair -LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN -v - .KEEP_STATE: all: $(LIBS) $(LIBLINKS) @@ -103,6 +83,5 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(LINT_SRC) FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c index f02c7af356..08c203a7f7 100644 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c +++ b/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c @@ -112,7 +112,7 @@ dr_handler(const char *ename, const void *earg, size_t size, void *cookie) return; } - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) { return; } @@ -176,13 +176,13 @@ dsc_handler(const char *ename, const void *earg, size_t size, void *cookie) * retrieve the device's physical path from the event arg * and determine which disk (if any) we are working with */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) return; if (nvlist_lookup_string(nvlp, "devfs-path", &path)) return; lookup.path = strdup(path); - lookup.disk = NULL; + lookup.disk = 0; lookup.result = DISK_NOT_FOUND; status = ptree_walk_tree_by_class(root_node, "disk", (void *)&lookup, @@ -218,7 +218,7 @@ signal_devtree(void) size_t nvl_size; int status; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL) != 0) + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0) != 0) return; /* diff --git a/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile b/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile index 92077496f7..e6b0cf842f 100644 --- a/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile +++ b/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile @@ -22,9 +22,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/piclsbl/Makefile LIBRARY= libpiclsbl.a VERS= .1 @@ -39,16 +36,10 @@ include $(SRC)/cmd/picl/plugins/Makefile.com SRCS= $(OBJECTS:%.o=%.c) -LINT_SRC= $(LINTLIB:%.ln=%) - $(OBJS_DIR)/%.o: $(SRC)/sun4v/piclsbl/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) -$(LINTS_DIR)/%.ln: $(SRC)/sun4v/piclsbl/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - - LIBS = $(DYNLIB) ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v @@ -57,8 +48,6 @@ DYNFLAGS_SUN4V = /usr/platform/sun4v/lib/picl/plugins DYNFLAGS_COM = /usr/lib/picl/plugins ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/sun4v/piclsbl CPPFLAGS += -I$(SRC)/uts/common/sys CPPFLAGS += -I$(SRC)/lib/libpcp/common @@ -71,8 +60,6 @@ DYNFLAGS += -R$(DYNFLAGS_COM) LDLIBS += -lc -lpicltree -lumem -lnvpair -LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN -v - .KEEP_STATE: all: $(LIBS) $(LIBLINKS) @@ -90,6 +77,5 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c b/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c index e70ea55d54..4d4e3233f4 100644 --- a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c +++ b/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c @@ -192,12 +192,12 @@ check_raid(int target) /* * Ontario SBL event handler, subscribed to: - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED + * PICLEVENT_SYSEVENT_DEVICE_ADDED + * PICLEVENT_SYSEVENT_DEVICE_REMOVED */ static void piclsbl_handler(const char *ename, const void *earg, size_t size, - void *cookie) + void *cookie) { char *devfs_path; char hdd_location[PICL_PROPNAMELEN_MAX]; @@ -236,7 +236,7 @@ piclsbl_handler(const char *ename, const void *earg, size_t size, /* * retrieve the device's physical path from the event payload */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) goto sbl_return; if (nvlist_lookup_string(nvlp, "devfs-path", &devfs_path)) goto sbl_return; @@ -248,7 +248,7 @@ piclsbl_handler(const char *ename, const void *earg, size_t size, * otherwise, return as it is not one of our disks. */ lookup.path = strdup(devfs_path); - lookup.disk = NULL; + lookup.disk = 0; lookup.result = DISK_NOT_FOUND; /* first, find the disk */ @@ -315,7 +315,7 @@ piclsbl_handler(const char *ename, const void *earg, size_t size, * populate the message for libpcp */ send_msg.msg_type = PCP_SBL_CONTROL; - send_msg.sub_type = NULL; + send_msg.sub_type = 0; send_msg.msg_len = sizeof (pcp_sbl_req_t); send_msg.msg_data = (uint8_t *)req_ptr; @@ -387,7 +387,7 @@ piclsbl_init(void) return; /* retrieve the root node for lookups in the event handler */ - if ((ptree_get_root(&root_node)) != NULL) + if ((ptree_get_root(&root_node)) != 0) return; /* load libpcp */ diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile b/usr/src/cmd/picl/plugins/sun4v/pri/Makefile index afec140c72..6b67dec843 100644 --- a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile +++ b/usr/src/cmd/picl/plugins/sun4v/pri/Makefile @@ -23,10 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/pri/Makefile -# + LIBRARY= libpriplugin.a VERS= .1 @@ -48,19 +45,6 @@ include $(SRC)/cmd/picl/plugins/Makefile.com SRCS= $(OBJECTS:%.o=%.c) -LINT_SRC= ./priplugin.c ./init.c \ - ./mem_prop_update.c io_dev_label.c \ - $(SRC)/common/mdesc/mdesc_findname.c \ - $(SRC)/common/mdesc/mdesc_findnodeprop.c \ - $(SRC)/common/mdesc/mdesc_fini.c \ - $(SRC)/common/mdesc/mdesc_getpropdata.c \ - $(SRC)/common/mdesc/mdesc_getpropstr.c \ - $(SRC)/common/mdesc/mdesc_getpropval.c \ - $(SRC)/common/mdesc/mdesc_init_intern.c \ - $(SRC)/common/mdesc/mdesc_nodecount.c \ - $(SRC)/common/mdesc/mdesc_rootnode.c \ - $(SRC)/common/mdesc/mdesc_scandag.c - $(OBJS_DIR)/%.o: $(SRC)/common/mdesc/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) @@ -74,8 +58,6 @@ DYNFLAGS_COM = /usr/lib/picl/plugins ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES = $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I$(SRC)/common/mdesc CPPFLAGS += -I$(SRC)/uts/common/sys CPPFLAGS += -I$(SRC)/lib/libpri/common @@ -99,8 +81,6 @@ $(SPARC_BLD)LDLIBS += -R$(DYNFLAGS_PLAT) \ -R$(DYNFLAGS_SUN4V) LDLIBS += -R$(DYNFLAGS_COM) -LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN -v - .KEEP_STATE: all: $(LIBS) $(LIBLINKS) @@ -115,6 +95,5 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(LINT_SRC) FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c b/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c index 7ef1bad438..13bf878af8 100644 --- a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c +++ b/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <pri.h> #include "priplugin.h" @@ -126,14 +124,14 @@ priplugin_init(void) (void) mutex_init(&rebuild_lock, USYNC_THREAD, NULL); (void) cond_init(&rebuild_cv, USYNC_THREAD, NULL); - if ((status = thr_create(NULL, NULL, pri_worker_thread, NULL, THR_BOUND, + if ((status = thr_create(NULL, 0, pri_worker_thread, NULL, THR_BOUND, &pri_worker_thread_id)) < 0) { pri_debug(LOG_NOTICE, "priplugin: can't create worker thread: " "%d\n", status); all_thr_exit = B_TRUE; (void) mutex_destroy(&rebuild_lock); (void) cond_destroy(&rebuild_cv); - } else if ((status = thr_create(NULL, NULL, pri_reader_thread, NULL, + } else if ((status = thr_create(NULL, 0, pri_reader_thread, NULL, THR_BOUND, &pri_reader_thread_id)) < 0) { pri_debug(LOG_NOTICE, "priplugin: can't create reader thread: " "%d\n", status); diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile b/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile index 66f24fd4a8..83a0c8728e 100644 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile +++ b/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile @@ -23,10 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/snmp/Makefile -# LIBRARY= libsnmpplugin.a VERS= .1 @@ -45,8 +41,6 @@ LIBS = $(DYNLIB) ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) -CLEANFILES= $(LINTOUT) $(LINTLIB) - CPPFLAGS += -I. -I../include -I$(SRC)/uts/common/sys CPPFLAGS += -D_REENTRANT @@ -92,6 +86,5 @@ include $(SRC)/cmd/picl/plugins/Makefile.targ include $(SRC)/lib/Makefile.targ lint : - $(LINT.c) $(SRCS) FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c index 62e97e1a00..767c7f7514 100644 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c +++ b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c @@ -332,7 +332,7 @@ snmpplugin_init(void) * Create the tree-builder thread and let it take over */ LOGPRINTF("Tree-builder thread being created.\n"); - if ((ret = thr_create(NULL, NULL, tree_builder, NULL, + if ((ret = thr_create(NULL, 0, tree_builder, NULL, THR_BOUND, &tree_builder_thr_id)) < 0) { log_msg(LOG_ERR, SNMPP_CANT_CREATE_TREE_BUILDER, ret); snmp_fini(hdl); @@ -356,7 +356,7 @@ snmpplugin_init(void) cache_refresh_thr_exit = B_FALSE; LOGPRINTF("Cache refresher thread being created.\n"); - if (thr_create(NULL, NULL, cache_refresher, NULL, THR_BOUND, + if (thr_create(NULL, 0, cache_refresher, NULL, THR_BOUND, &cache_refresh_thr_id) < 0) { (void) cond_destroy(&cache_refresh_cv); (void) mutex_destroy(&cache_refresh_lock); @@ -489,8 +489,8 @@ tree_builder(void *arg) return (NULL); } - old_physplat_root = NULL; - physplat_root = NULL; + old_physplat_root = 0; + physplat_root = 0; LOGPRINTF("tree_builder: getting root node\n"); if ((ret = ptree_get_root(&root_node)) != PICL_SUCCESS) { @@ -514,7 +514,7 @@ tree_builder(void *arg) return ((void *)-3); } - if (rv == PICL_SUCCESS && old_physplat_root != NULL) { + if (rv == PICL_SUCCESS && old_physplat_root != 0) { LOGPRINTF("tree_builder: destroying existing nodes\n"); ptree_delete_node(old_physplat_root); ptree_destroy_node(old_physplat_root); @@ -705,7 +705,7 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) /* * If we've already created this picl node, just return it */ - if ((nodeh = lookup_nodeh(row)) != NULL) + if ((nodeh = lookup_nodeh(row)) != 0) return (nodeh); /* @@ -715,13 +715,13 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) */ ret = snmp_get_int(hdl, OID_entPhysicalContainedIn, row, &parent_row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0 || parent_row <= 0) parenth = subtree_root; else { parenth = make_node(subtree_root, parent_row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (parenth == NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) + if (parenth == 0) parenth = subtree_root; } @@ -732,49 +732,49 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) */ ret = snmp_get_str(hdl, OID_entPhysicalName, row, &phys_name, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0 || phys_name == NULL) { log_msg(LOG_WARNING, SNMPP_NO_ENTPHYSNAME, row); - return (NULL); + return (0); } node_name = basename(phys_name); ret = snmp_get_int(hdl, OID_entPhysicalClass, row, &ent_physclass, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_entPhysicalClass, row); free(phys_name); - return (NULL); + return (0); } switch (ent_physclass) { case SPC_OTHER: ret = snmp_get_int(hdl, OID_sunPlatPhysicalClass, row, &sunplat_physclass, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_sunPlatPhysicalClass, row); free(phys_name); - return (NULL); + return (0); } if (sunplat_physclass == SSPC_ALARM) { ret = snmp_get_int(hdl, OID_sunPlatAlarmType, row, &alarm_type, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_sunPlatAlarmType, row); free(phys_name); - return (NULL); + return (0); } if (alarm_type == SSAT_VISIBLE) { @@ -785,14 +785,14 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) add_prop(nodeh, &proph, node_name, row, PP_STATE, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) } else { ADD_NODE(PICL_CLASS_OTHER) } add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_UNKNOWN: @@ -803,14 +803,14 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) ADD_NODE(PICL_CLASS_CHASSIS) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_BACKPLANE: ADD_NODE(PICL_CLASS_BACKPLANE) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_CONTAINER: @@ -818,66 +818,66 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_SLOT_TYPE, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_POWERSUPPLY: ret = snmp_get_int(hdl, OID_sunPlatPowerSupplyClass, row, &ps_class, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_sunPlatPowerSupplyClass, row); free(phys_name); - return (NULL); + return (0); } if (ps_class == SSPSC_BATTERY) { ADD_NODE(PICL_CLASS_BATTERY) add_prop(nodeh, &proph, node_name, row, PP_BATT_STATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) } else { ADD_NODE(PICL_CLASS_POWERSUPPLY) } add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_FAN: ADD_NODE(PICL_CLASS_FAN) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_SENSOR: ret = snmp_get_int(hdl, OID_sunPlatSensorClass, row, &sensor_class, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_sunPlatSensorClass, row); free(phys_name); - return (NULL); + return (0); } ret = snmp_get_int(hdl, OID_sunPlatSensorType, row, &sensor_type, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) if (ret < 0) { log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, *snmp_syserr_p ? *snmp_syserr_p : ret, OID_sunPlatSensorType, row); free(phys_name); - return (NULL); + return (0); } if (sensor_class == SSSC_NUMERIC) { @@ -902,26 +902,26 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) add_prop(nodeh, &proph, node_name, row, PP_SENSOR_VALUE, snmp_syserr_p); } - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_BASE_UNITS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_EXPONENT, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_RATE_UNITS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_thresholds(nodeh, row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) } else if (sensor_class == SSSC_BINARY) { if (sensor_type == SSST_TEMPERATURE) { @@ -940,19 +940,19 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_CONDITION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_EXPECTED, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) } else { log_msg(LOG_ERR, SNMPP_UNSUPP_SENSOR_CLASS, sensor_class, row); - return (NULL); + return (0); } break; @@ -961,15 +961,15 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_REPLACEABLE, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_HOTSWAPPABLE, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) break; case SPC_PORT: @@ -984,32 +984,32 @@ make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) log_msg(LOG_WARNING, SNMPP_UNKNOWN_ENTPHYSCLASS, ent_physclass, row); free(phys_name); - return (NULL); + return (0); } add_prop(nodeh, &proph, node_name, row, PP_DESCRIPTION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_LABEL, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_HW_REVISION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_FW_REVISION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_SERIAL_NUM, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_MFG_NAME, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_MODEL_NAME, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) add_prop(nodeh, &proph, node_name, row, PP_IS_FRU, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) + CHECK_LINKRESET(snmp_syserr_p, 0) free(phys_name); save_nodeh(nodeh, row); @@ -1057,7 +1057,7 @@ static picl_nodehdl_t lookup_nodeh(int row) { if (row >= n_physplat_nodes) - return (NULL); + return (0); return (physplat_nodes[row]); } diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h index 8bd7d87db1..6454552b7a 100644 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h +++ b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h @@ -71,7 +71,7 @@ typedef struct { if (ptree_create_and_add_node(parenth, node_name, cl, \ &nodeh) != PICL_SUCCESS) { \ log_msg(LOG_ERR, SNMPP_ADD_NODE_FAIL, node_name, cl); \ - return (NULL); \ + return (0); \ } \ } diff --git a/usr/src/cmd/pptadm/Makefile b/usr/src/cmd/pptadm/Makefile index 3be558a7a0..7094f8563c 100644 --- a/usr/src/cmd/pptadm/Makefile +++ b/usr/src/cmd/pptadm/Makefile @@ -21,7 +21,6 @@ include ../Makefile.ctf LDLIBS += -lofmt -lppt -lnvpair CSTD = $(CSTD_GNU99) -C99LMODE = -Xc99=%all CLEANFILES += $(OBJS) @@ -34,8 +33,6 @@ install: all $(ROOTUSRSBINPROG) clean: -$(RM) $(CLEANFILES) -lint: lint_SRCS - %.o: ../%.c $(COMPILE.c) $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile index 6fb2c832a5..67be7d0b27 100644 --- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile +++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile @@ -92,7 +92,7 @@ SMATCH=off LDLIBS += -lprint -lnsl -lsocket -lc -CLEANFILES= *.class $(LINTLIB) $(LINTOUT) +CLEANFILES= *.class CLOBBERFILES= $(JNIHDR_FILES) $(LIBLINKS) all: $(CLASSFILES) $(JNIHDR_FILES) $(DYNLIB) @@ -114,7 +114,7 @@ NS: NS.c $(CC) NS.c $(CCGDEBUG) $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \ -lprint -lnsl -lsocket -lint: $(JNIHDR_FILES) lintcheck +lint: $(JNIHDR_FILES) cstyle: cstyle $(SRCS) diff --git a/usr/src/cmd/sendmail/libmilter/Makefile.com b/usr/src/cmd/sendmail/libmilter/Makefile.com index d59a896251..8cb4bc2a62 100644 --- a/usr/src/cmd/sendmail/libmilter/Makefile.com +++ b/usr/src/cmd/sendmail/libmilter/Makefile.com @@ -50,17 +50,16 @@ CPPFLAGS= $(INCPATH) $(ENVDEF) $(CPPFLAGS.sm) CERRWARN += -_gcc=-Wno-type-limits -LIBS= $(DYNLIB) $(LINTLIB) +LIBS= $(DYNLIB) LDLIBS += -lc -lsocket -lnsl -$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC) .KEEP_STATE: all: $(LIBS) -install: all .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all .WAIT $(ROOTLIBS) $(ROOTLINKS) -lint: lintcheck +lint: include $(SRC)/lib/Makefile.targ diff --git a/usr/src/cmd/sendmail/libmilter/i386/Makefile b/usr/src/cmd/sendmail/libmilter/i386/Makefile index e86ae6a9f7..7144fbdd64 100644 --- a/usr/src/cmd/sendmail/libmilter/i386/Makefile +++ b/usr/src/cmd/sendmail/libmilter/i386/Makefile @@ -22,8 +22,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" include ../Makefile.com -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/sendmail/libmilter/sparc/Makefile b/usr/src/cmd/sendmail/libmilter/sparc/Makefile index e86ae6a9f7..7144fbdd64 100644 --- a/usr/src/cmd/sendmail/libmilter/sparc/Makefile +++ b/usr/src/cmd/sendmail/libmilter/sparc/Makefile @@ -22,8 +22,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" include ../Makefile.com -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/sgs/Makefile.targ b/usr/src/cmd/sgs/Makefile.targ index b8d85bef18..37064baa75 100644 --- a/usr/src/cmd/sgs/Makefile.targ +++ b/usr/src/cmd/sgs/Makefile.targ @@ -39,16 +39,4 @@ $(VAR_SGSBIN)/%: % $(VAR_SGSBIN64)/%: % $(INS.file) -$(ROOTFS_LIBDIR)/$(LIBLINKS): $(ROOTFS_LIBDIR)/$(LIBLINKS)$(VERS) - $(INS.liblink) - -$(ROOTFS_LIBDIR64)/$(LIBLINKS): $(ROOTFS_LIBDIR64)/$(LIBLINKS)$(VERS) - $(INS.liblink64) - -$(ROOTFS_LIBDIR)/$(LIBLINKSCCC): $(ROOTFS_LIBDIR)/$(LIBLINKSCCC)$(VERS) - $(INS.liblinkccc) - -$(ROOTFS_LIBDIR64)/$(LIBLINKSCCC): $(ROOTFS_LIBDIR64)/$(LIBLINKSCCC)$(VERS) - $(INS.liblinkccc64) - FRC: diff --git a/usr/src/cmd/sgs/Makefile.var b/usr/src/cmd/sgs/Makefile.var index c2984dc553..fa8f897c10 100644 --- a/usr/src/cmd/sgs/Makefile.var +++ b/usr/src/cmd/sgs/Makefile.var @@ -132,11 +132,6 @@ VAR_LIBLD_64_ROOTFS_LIBDIR= $(ROOT)/lib/$(MACH64) VAR_TOOLS_CPPFLAGS= $(VAR_AVLINCDIR) # -# liblddbg -# -VAR_LIBLDDBG_64_ROOTFS_LIBDIR= $(ROOT)/lib/$(MACH64) - -# # rtld # VAR_RTLD_CPICLIB= -L ../../../../lib/libc/$(MACH) diff --git a/usr/src/cmd/sgs/crle/common/crle.msg b/usr/src/cmd/sgs/crle/common/crle.msg index 12eb812309..6c9c0e999a 100644 --- a/usr/src/cmd/sgs/crle/common/crle.msg +++ b/usr/src/cmd/sgs/crle/common/crle.msg @@ -159,7 +159,7 @@ /usr/lib/secure/64 (system default)\n" @ MSG_DEF_AOUTDLP " Default Library Path (AOUT):\t\ - /usr/4lib:/usr/lib:/usr/local/lib \ + /usr/lib:/usr/local/lib \ (system default)\n" @ MSG_DEF_AOUTNEWTD " Trusted Directories (AOUT):\t\ /lib/secure:/usr/lib/secure (system default)\n" @@ -193,7 +193,7 @@ @ MSG_DMP_HEAD "\nConfiguration file [version %d]: %s %s\n" @ MSG_DMP_PLATFORM " Platform:\t%s %s %s\n" -@ MSG_DMP_APP " Specific application: %s (original: %s)\n" +@ MSG_DMP_APP " Specific application: %s (original: %s)\n" @ MSG_DMP_DLIBPTH " Default Library Path (%s):\t%s\n" @ MSG_DMP_TLIBPTH " Trusted Directories (%s):\t%s\n" @ MSG_DMP_RESV "\nMemory Reservation:\t%llx - %llx (%llx bytes)\n" @@ -291,7 +291,7 @@ @ MSG_PTH_OLDTD_64 "/usr/lib/secure/64" @ MSG_PTH_UPTD_64 "/lib/secure/64" -@ MSG_PTH_AOUTDLP "/usr/4lib:/usr/lib:/usr/local/lib" +@ MSG_PTH_AOUTDLP "/usr/lib:/usr/local/lib" @ MSG_DIR_ROOT "/" @ MSG_DIR_DOT "." diff --git a/usr/src/cmd/sgs/lex/Makefile.com b/usr/src/cmd/sgs/lex/Makefile.com index 9a24765ceb..c8100b1e3f 100644 --- a/usr/src/cmd/sgs/lex/Makefile.com +++ b/usr/src/cmd/sgs/lex/Makefile.com @@ -44,6 +44,13 @@ FORMS= nceucform ncform nrform include ../../../../lib/Makefile.lib +COMPATLINKS= usr/ccs/lib/libl.so +COMPATLINKS64= usr/ccs/lib/$(MACH64)/libl.so + +$(ROOT)/usr/ccs/lib/libl.so := COMPATLINKTARGET=../../lib/libl.so.1 +$(ROOT)/usr/ccs/lib/$(MACH64)/libl.so:= \ + COMPATLINKTARGET=../../../lib/$(MACH64)/libl.so.1 + SRCDIR = ../common CSTD= $(CSTD_GNU99) diff --git a/usr/src/cmd/sgs/lex/Makefile.targ b/usr/src/cmd/sgs/lex/Makefile.targ index 7755dd804b..de50a8ae21 100644 --- a/usr/src/cmd/sgs/lex/Makefile.targ +++ b/usr/src/cmd/sgs/lex/Makefile.targ @@ -79,5 +79,8 @@ objs/%.o pics/%.o: ../common/%.c $(DYNLINKLIBDIR)/%: %$(VERS) $(INS.liblink) +$(ROOTCOMPATLINKS) $(ROOTCOMPATLINKS64): + $(RM) $@; $(SYMLINK) $(COMPATLINKTARGET) $@ + clean: $(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/lex/amd64/Makefile b/usr/src/cmd/sgs/lex/amd64/Makefile index 88c06842ea..a70552a0ba 100644 --- a/usr/src/cmd/sgs/lex/amd64/Makefile +++ b/usr/src/cmd/sgs/lex/amd64/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # This Makefile is only to produce 64-bit lex shared library libl.so.1 # and not for building 64-bit lex itself. @@ -36,7 +34,7 @@ include ../../../../lib/Makefile.lib.64 all_lib: $(LIBS) -install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) +install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/lex/i386/Makefile b/usr/src/cmd/sgs/lex/i386/Makefile index 7c4ed059ec..a4627ee882 100644 --- a/usr/src/cmd/sgs/lex/i386/Makefile +++ b/usr/src/cmd/sgs/lex/i386/Makefile @@ -38,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTCOMPATLINKS) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/lex/sparc/Makefile b/usr/src/cmd/sgs/lex/sparc/Makefile index ca3f074cc4..e5a9194df2 100644 --- a/usr/src/cmd/sgs/lex/sparc/Makefile +++ b/usr/src/cmd/sgs/lex/sparc/Makefile @@ -38,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTCOMPATLINKS) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/lex/sparcv9/Makefile b/usr/src/cmd/sgs/lex/sparcv9/Makefile index 5edc1ac22b..c6279e175c 100644 --- a/usr/src/cmd/sgs/lex/sparcv9/Makefile +++ b/usr/src/cmd/sgs/lex/sparcv9/Makefile @@ -20,13 +20,9 @@ # CDDL HEADER END # # -# ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1997 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/lex/sparcv9/Makefile -# # This Makefile is only to produce 64-bit lex shared library libl.so.1 # and not for building 64-bit lex itself. @@ -38,7 +34,7 @@ include ../../../../lib/Makefile.lib.64 all_lib: $(LIBS) -install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) +install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/libdl/Makefile.com b/usr/src/cmd/sgs/libdl/Makefile.com index edc149f8ec..507cb277c0 100644 --- a/usr/src/cmd/sgs/libdl/Makefile.com +++ b/usr/src/cmd/sgs/libdl/Makefile.com @@ -27,3 +27,6 @@ LIBRARY = libdl.a VERS = .1 include $(SRC)/lib/Makefile.rootfs + +COMPATLINKS += etc/lib/libdl.so.1 +$(ROOT)/etc/lib/libdl.so.1 := COMPATLINKTARGET=../../lib/libdl.so.1 diff --git a/usr/src/cmd/sgs/libdl/amd64/Makefile b/usr/src/cmd/sgs/libdl/amd64/Makefile index 90e6d5bf3a..7aa63ffa3c 100644 --- a/usr/src/cmd/sgs/libdl/amd64/Makefile +++ b/usr/src/cmd/sgs/libdl/amd64/Makefile @@ -29,6 +29,7 @@ include $(SRC)/lib/Makefile.lib.64 DYNFLAGS += -F /usr/lib/$(MACH64)/ld.so.1 -install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) +install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) \ + $(ROOTCOMPATLINKS64) include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/cmd/sgs/libdl/i386/Makefile b/usr/src/cmd/sgs/libdl/i386/Makefile index ea152db4b2..3ca48e64ff 100644 --- a/usr/src/cmd/sgs/libdl/i386/Makefile +++ b/usr/src/cmd/sgs/libdl/i386/Makefile @@ -30,6 +30,6 @@ include ../Makefile.com DYNFLAGS += -F /usr/lib/ld.so.1 -install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) +install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOTCOMPATLINKS) include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/cmd/sgs/libdl/sparc/Makefile b/usr/src/cmd/sgs/libdl/sparc/Makefile index ea152db4b2..3ca48e64ff 100644 --- a/usr/src/cmd/sgs/libdl/sparc/Makefile +++ b/usr/src/cmd/sgs/libdl/sparc/Makefile @@ -30,6 +30,6 @@ include ../Makefile.com DYNFLAGS += -F /usr/lib/ld.so.1 -install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) +install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOTCOMPATLINKS) include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/cmd/sgs/libdl/sparcv9/Makefile b/usr/src/cmd/sgs/libdl/sparcv9/Makefile index 90e6d5bf3a..7aa63ffa3c 100644 --- a/usr/src/cmd/sgs/libdl/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libdl/sparcv9/Makefile @@ -29,6 +29,7 @@ include $(SRC)/lib/Makefile.lib.64 DYNFLAGS += -F /usr/lib/$(MACH64)/ld.so.1 -install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) +install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) \ + $(ROOTCOMPATLINKS64) include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/cmd/sgs/libelf/Makefile.com b/usr/src/cmd/sgs/libelf/Makefile.com index 7791333dc6..2ff06a2508 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.com +++ b/usr/src/cmd/sgs/libelf/Makefile.com @@ -51,6 +51,7 @@ MISCOBJS64= nlist.o OBJECTS= $(BLTOBJS) $(MACHOBJS) $(COMOBJS) $(CLASSOBJS) $(MISCOBJS) include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.rootfs SRCDIR= $(SRC)/cmd/sgs/libelf @@ -92,13 +93,6 @@ BLTSRCS= $(BLTOBJS:%.o=%.c) LIBSRCS= $(COMOBJS:%.o=$(SRCDIR)/common/%.c) $(MISCOBJS:%.o=$(SRCDIR)/misc/%.c) \ $(MACHOBJS:%.o=%.c) $(BLTSRCS) -ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) - -ROOTFS_DYNLIB64= $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) - -$(ROOTFS_DYNLIB) := FILEMODE= 755 -$(ROOTFS_DYNLIB64) := FILEMODE= 755 - LIBS = $(DYNLIB) CLEANFILES += $(BLTSRCS) $(BLTFILES) diff --git a/usr/src/cmd/sgs/libelf/amd64/Makefile b/usr/src/cmd/sgs/libelf/amd64/Makefile index 94251398d8..c27090b00c 100644 --- a/usr/src/cmd/sgs/libelf/amd64/Makefile +++ b/usr/src/cmd/sgs/libelf/amd64/Makefile @@ -34,6 +34,6 @@ MISCOBJS= $(MISCOBJS64) .KEEP_STATE: -install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) +install: all .WAIT $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ.64 diff --git a/usr/src/cmd/sgs/libelf/i386/Makefile b/usr/src/cmd/sgs/libelf/i386/Makefile index a14fcadcdb..53cb83ad4d 100644 --- a/usr/src/cmd/sgs/libelf/i386/Makefile +++ b/usr/src/cmd/sgs/libelf/i386/Makefile @@ -29,7 +29,7 @@ SGSMSGTARG += $(SGSMSG32) .KEEP_STATE: -install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ - .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) +install: all .WAIT $(ROOTLIBS) $(ROOTLINKS) \ + .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libelf/sparc/Makefile b/usr/src/cmd/sgs/libelf/sparc/Makefile index f5e39a6940..9779e5fb83 100644 --- a/usr/src/cmd/sgs/libelf/sparc/Makefile +++ b/usr/src/cmd/sgs/libelf/sparc/Makefile @@ -29,7 +29,7 @@ SGSMSGTARG += $(SGSMSG32) .KEEP_STATE: -install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ - .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) +install: all .WAIT $(ROOTLIBS) $(ROOTLINKS) \ + .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libelf/sparcv9/Makefile b/usr/src/cmd/sgs/libelf/sparcv9/Makefile index 94251398d8..c27090b00c 100644 --- a/usr/src/cmd/sgs/libelf/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libelf/sparcv9/Makefile @@ -34,6 +34,6 @@ MISCOBJS= $(MISCOBJS64) .KEEP_STATE: -install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) +install: all .WAIT $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ.64 diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.com b/usr/src/cmd/sgs/liblddbg/Makefile.com index c4b9f9d6db..16e864f0ec 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.com +++ b/usr/src/cmd/sgs/liblddbg/Makefile.com @@ -53,8 +53,14 @@ OBJECTS = $(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(SGSCOMMONOBJ) include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.rootfs include $(SRC)/cmd/sgs/Makefile.com +LIBS = $(DYNLIB) + +COMPATLINKS = usr/lib/$(DYNLIB) +COMPATLINKS64 = usr/lib/$(MACH64)/$(DYNLIB) + SRCDIR = $(SGSHOME)/liblddbg MAPFILEDIR = $(SRCDIR)/common @@ -85,4 +91,3 @@ LIBSRCS = $(COMOBJS:%.o=$(SRCDIR)/common/%.c) \ CLEANFILES += $(BLTFILES) CLOBBERFILES += $(DYNLIB) $(LIBLINKS) -ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/liblddbg/amd64/Makefile b/usr/src/cmd/sgs/liblddbg/amd64/Makefile index 1d0ab295e0..9783a0d400 100644 --- a/usr/src/cmd/sgs/liblddbg/amd64/Makefile +++ b/usr/src/cmd/sgs/liblddbg/amd64/Makefile @@ -26,11 +26,6 @@ include ../Makefile.com -ROOTFS_LIBDIR64 = \ - $(VAR_LIBLDDBG_64_ROOTFS_LIBDIR) -ROOTFS_DYNLIB64 = \ - $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) - CONVLIBDIR = $(CONVLIBDIR64) .KEEP_STATE: @@ -40,7 +35,7 @@ $(ROOTFS_DYNLIB64) := FILEMODE= 755 all: $(DYNLIB) $(LIBLINKS) install \ -package: all $(ROOTFS_DYNLIB64) +package: all $(ROOTLIBS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/liblddbg/i386/Makefile b/usr/src/cmd/sgs/liblddbg/i386/Makefile index d27ae308e3..4345c2ca64 100644 --- a/usr/src/cmd/sgs/liblddbg/i386/Makefile +++ b/usr/src/cmd/sgs/liblddbg/i386/Makefile @@ -23,8 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com @@ -33,6 +31,6 @@ include ../Makefile.com all: $(DYNLIB) $(LIBLINKS) install \ -package: all $(ROOTFS_DYNLIB) +package: all $(ROOTLIBS) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/liblddbg/sparc/Makefile b/usr/src/cmd/sgs/liblddbg/sparc/Makefile index d27ae308e3..4345c2ca64 100644 --- a/usr/src/cmd/sgs/liblddbg/sparc/Makefile +++ b/usr/src/cmd/sgs/liblddbg/sparc/Makefile @@ -23,8 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com @@ -33,6 +31,6 @@ include ../Makefile.com all: $(DYNLIB) $(LIBLINKS) install \ -package: all $(ROOTFS_DYNLIB) +package: all $(ROOTLIBS) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile b/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile index b57167b378..8bc19f5ce4 100644 --- a/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile +++ b/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile @@ -26,21 +26,14 @@ include ../Makefile.com -ROOTFS_LIBDIR64 = \ - $(VAR_LIBLDDBG_64_ROOTFS_LIBDIR) -ROOTFS_DYNLIB64 = \ - $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) - CONVLIBDIR = $(CONVLIBDIR64) .KEEP_STATE: -$(ROOTFS_DYNLIB64) := FILEMODE= 755 - all: $(DYNLIB) $(LIBLINKS) install \ -package: all $(ROOTFS_DYNLIB64) +package: all $(ROOTLIBS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/librtld/Makefile.com b/usr/src/cmd/sgs/librtld/Makefile.com index e15980f956..54ed7d31c3 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.com +++ b/usr/src/cmd/sgs/librtld/Makefile.com @@ -38,8 +38,14 @@ OBJECTS= $(BLTOBJ) $(MACHOBJS) $(COMOBJS) include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.rootfs include $(SRC)/cmd/sgs/Makefile.com +LIBS = $(DYNLIB) + +COMPATLINKS = usr/lib/$(DYNLIB) +COMPATLINKS64 = usr/lib/$(MACH64)/$(DYNLIB) + SRCDIR = ../common CPPFLAGS += -I../../rtld/common -I$(SRC)/lib/libc/inc \ -I$(SRC)/uts/common/krtld -I$(SRC)/common/sgsrtcid \ @@ -68,5 +74,3 @@ MSGSRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) \ CLEANFILES += $(BLTFILES) CLOBBERFILES += $(DYNLIB) $(LIBLINKS) - -ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/librtld/amd64/Makefile b/usr/src/cmd/sgs/librtld/amd64/Makefile index ad8c67f0db..481b1c0a22 100644 --- a/usr/src/cmd/sgs/librtld/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld/amd64/Makefile @@ -30,12 +30,9 @@ CPPFLAGS += -I../../../../uts/intel/amd64/krtld .KEEP_STATE: -ROOTFS_DYNLIB64 = $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) -$(ROOTFS_DYNLIB64) := FILEMODE=755 - all: $(DYNLIB) $(LIBLINKS) -install: all $(ROOTFS_DYNLIB64) +install: all $(ROOTLIBS64) $(ROOTCOMPATLINKS64) CPPFLAGS += -D_ELF64 diff --git a/usr/src/cmd/sgs/librtld/i386/Makefile b/usr/src/cmd/sgs/librtld/i386/Makefile index 54e5e30586..5d9e11a226 100644 --- a/usr/src/cmd/sgs/librtld/i386/Makefile +++ b/usr/src/cmd/sgs/librtld/i386/Makefile @@ -32,6 +32,6 @@ CPPFLAGS += -I../../../../uts/intel/ia32/krtld all: $(DYNLIB) $(LIBLINKS) -install: all $(ROOTFS_DYNLIB) +install: all $(ROOTLIBS) $(ROOTCOMPATLINKS) include $(SRC)/cmd/sgs/librtld/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld/sparc/Makefile b/usr/src/cmd/sgs/librtld/sparc/Makefile index ac07f8b8c0..eb5a2547e4 100644 --- a/usr/src/cmd/sgs/librtld/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld/sparc/Makefile @@ -32,6 +32,6 @@ CPPFLAGS += -I../../../../uts/sparc/krtld all: $(DYNLIB) $(LIBLINKS) -install: all $(ROOTFS_DYNLIB) +install: all $(ROOTLIBS) $(ROOTCOMPATLINKS) include $(SRC)/cmd/sgs/librtld/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld/sparcv9/Makefile b/usr/src/cmd/sgs/librtld/sparcv9/Makefile index 00a9c3ca48..fd02c33926 100644 --- a/usr/src/cmd/sgs/librtld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld/sparcv9/Makefile @@ -30,12 +30,9 @@ CPPFLAGS += -I../../../../uts/sparc/krtld .KEEP_STATE: -ROOTFS_DYNLIB64 = $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) -$(ROOTFS_DYNLIB64) := FILEMODE=755 - all: $(DYNLIB) $(LIBLINKS) -install: all $(ROOTFS_DYNLIB64) +install: all $(ROOTLIBS64) $(ROOTCOMPATLINKS64) CPPFLAGS += -D_ELF64 diff --git a/usr/src/cmd/sgs/librtld_db/Makefile.com b/usr/src/cmd/sgs/librtld_db/Makefile.com index 2d7b9093c3..ad00e866a3 100644 --- a/usr/src/cmd/sgs/librtld_db/Makefile.com +++ b/usr/src/cmd/sgs/librtld_db/Makefile.com @@ -32,6 +32,7 @@ BLTOBJ= msg.o OBJECTS = $(BLTOBJ) $(COMOBJS) $(COMOBJS64) $(PLTOBJS) include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.rootfs include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common diff --git a/usr/src/cmd/sgs/librtld_db/amd64/Makefile b/usr/src/cmd/sgs/librtld_db/amd64/Makefile index 705c6ef07a..e4454c5ef2 100644 --- a/usr/src/cmd/sgs/librtld_db/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld_db/amd64/Makefile @@ -39,7 +39,7 @@ CONVLIBDIR = $(CONVLIBDIR64) all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) pics/plt32_resolution.o: ../i386/plt32_resolution.c $(COMPILE.c) -D_ELF32 $(PICFLAGS) -o $@ \ diff --git a/usr/src/cmd/sgs/librtld_db/i386/Makefile b/usr/src/cmd/sgs/librtld_db/i386/Makefile index ff610a1129..331d8aa3bb 100644 --- a/usr/src/cmd/sgs/librtld_db/i386/Makefile +++ b/usr/src/cmd/sgs/librtld_db/i386/Makefile @@ -37,6 +37,6 @@ SGSMSGTARG += $(SGSMSGINTEL) all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/sparc/Makefile b/usr/src/cmd/sgs/librtld_db/sparc/Makefile index 36c1b54df5..8a82b99e92 100644 --- a/usr/src/cmd/sgs/librtld_db/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld_db/sparc/Makefile @@ -35,6 +35,6 @@ include ../Makefile.com all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCOMPATLINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile b/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile index 29be0d82b3..c150914bc7 100644 --- a/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile @@ -39,7 +39,7 @@ CONVLIBDIR = $(CONVLIBDIR64) all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) pics/plt32_resolution.o: ../sparc/plt32_resolution.c $(COMPILE.c) -D_ELF32 $(PICFLAGS) -o $@ \ diff --git a/usr/src/cmd/sgs/rtld/Makefile.com b/usr/src/cmd/sgs/rtld/Makefile.com index 6a767de04b..853fd5066b 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.com +++ b/usr/src/cmd/sgs/rtld/Makefile.com @@ -72,6 +72,14 @@ ETCDYNLIB= $(RTLD:%=$(ETCLIBDIR)/%) ROOTDYNLIB= $(RTLD:%=$(ROOTFS_LIBDIR)/%) ROOTDYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%) +COMPATLINKS= etc/lib/ld.so.1 \ + usr/lib/ld.so.1 +COMPATLINKS64= usr/lib/$(MACH64)/ld.so.1 + +$(ROOT)/etc/lib/ld.so.1 := COMPATLINKTARGET= ../../lib/ld.so.1 +$(ROOT)/usr/lib/ld.so.1 := COMPATLINKTARGET= ../../lib/ld.so.1 +$(ROOT)/usr/lib/$(MACH64)/ld.so.1 := \ + COMPATLINKTARGET= ../../../lib/$(MACH64)/ld.so.1 FILEMODE = 755 diff --git a/usr/src/cmd/sgs/rtld/amd64/Makefile b/usr/src/cmd/sgs/rtld/amd64/Makefile index f01898ec08..d73dbaaa6b 100644 --- a/usr/src/cmd/sgs/rtld/amd64/Makefile +++ b/usr/src/cmd/sgs/rtld/amd64/Makefile @@ -84,7 +84,7 @@ CONVLIBDIR = $(CONVLIBDIR64) all: $(RTLD) -install: all $(ROOTDYNLIB64) +install: all $(ROOTDYNLIB64) $(ROOTCOMPATLINKS64) adbmacros: adb .WAIT $(ADBSCRIPTS) diff --git a/usr/src/cmd/sgs/rtld/common/a.out.c b/usr/src/cmd/sgs/rtld/common/a.out.c index c7abfcab12..6ea37918ad 100644 --- a/usr/src/cmd/sgs/rtld/common/a.out.c +++ b/usr/src/cmd/sgs/rtld/common/a.out.c @@ -50,7 +50,6 @@ * Default and secure dependency search paths. */ static Spath_defn _aout_def_dirs[] = { - { MSG_ORIG(MSG_PTH_USR4LIB), MSG_PTH_USR4LIB_SIZE }, { MSG_ORIG(MSG_PTH_USRLIB), MSG_PTH_USRLIB_SIZE }, { MSG_ORIG(MSG_PTH_USRLCLIB), MSG_PTH_USRLCLIB_SIZE }, { 0, 0 } diff --git a/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg b/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg index 8f19af9390..99b623803d 100644 --- a/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg +++ b/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg @@ -48,7 +48,6 @@ @ MSG_FIL_LIB "lib" @ MSG_PTH_USRLCLIB "/usr/local/lib" -@ MSG_PTH_USR4LIB "/usr/4lib" @ MSG_SYM_LAV8PLTENTER "la_sparcv8_pltenter" diff --git a/usr/src/cmd/sgs/rtld/i386/Makefile b/usr/src/cmd/sgs/rtld/i386/Makefile index 224faac481..0d7ff2cc8e 100644 --- a/usr/src/cmd/sgs/rtld/i386/Makefile +++ b/usr/src/cmd/sgs/rtld/i386/Makefile @@ -75,7 +75,7 @@ SGSMSGTARG += $(SGSMSGINTEL) $(SGSMSGINTEL32) $(SGSMSG32) all: $(RTLD) -install: all $(ROOTDYNLIB) +install: all $(ROOTDYNLIB) $(ROOTCOMPATLINKS) adbmacros: adb .WAIT $(ADBSCRIPTS) diff --git a/usr/src/cmd/sgs/rtld/sparc/Makefile b/usr/src/cmd/sgs/rtld/sparc/Makefile index d63f57b13a..2785c30fcf 100644 --- a/usr/src/cmd/sgs/rtld/sparc/Makefile +++ b/usr/src/cmd/sgs/rtld/sparc/Makefile @@ -81,7 +81,7 @@ SGSMSGTARG += $(SGSMSGSPARC) $(SGSMSGSPARC32) $(SGSMSG32) all: $(RTLD) -install: all $(ROOTDYNLIB) +install: all $(ROOTDYNLIB) $(ROOTCOMPATLINKS) adbmacros: adb .WAIT $(ADBSCRIPTS) diff --git a/usr/src/cmd/sgs/rtld/sparcv9/Makefile b/usr/src/cmd/sgs/rtld/sparcv9/Makefile index 87593bc6d2..fb1c3da820 100644 --- a/usr/src/cmd/sgs/rtld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/rtld/sparcv9/Makefile @@ -90,7 +90,7 @@ CONVLIBDIR = $(CONVLIBDIR64) all: $(RTLD) -install: all $(ROOTDYNLIB64) +install: all $(ROOTDYNLIB64) $(ROOTCOMPATLINKS64) adbmacros: adb .WAIT $(ADBSCRIPTS) diff --git a/usr/src/cmd/sgs/yacc/Makefile.com b/usr/src/cmd/sgs/yacc/Makefile.com index 2172234f49..9f9b3dc0e8 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.com +++ b/usr/src/cmd/sgs/yacc/Makefile.com @@ -41,6 +41,13 @@ YACCPAR= yaccpar include ../../../../lib/Makefile.lib +COMPATLINKS= usr/ccs/lib/liby.so +COMPATLINKS64= usr/ccs/lib/$(MACH64)/liby.so + +$(ROOT)/usr/ccs/lib/liby.so := COMPATLINKTARGET=../../lib/liby.so.1 +$(ROOT)/usr/ccs/lib/$(MACH64)/liby.so:= \ + COMPATLINKTARGET=../../../lib/$(MACH64)/liby.so.1 + SRCDIR = ../common # Override default source file derivation rule (in Makefile.lib) diff --git a/usr/src/cmd/sgs/yacc/Makefile.targ b/usr/src/cmd/sgs/yacc/Makefile.targ index a7932225e0..1ff1f4e804 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.targ +++ b/usr/src/cmd/sgs/yacc/Makefile.targ @@ -75,5 +75,8 @@ objs/%.o pics/%.o: ../common/%.c $(DYNLINKLIBDIR)/%: %$(VERS) $(INS.liblink) +$(ROOTCOMPATLINKS) $(ROOTCOMPATLINKS64): + $(RM) $@; $(SYMLINK) $(COMPATLINKTARGET) $@ + clean: $(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/yacc/amd64/Makefile b/usr/src/cmd/sgs/yacc/amd64/Makefile index 3b987420ec..46c508df3d 100644 --- a/usr/src/cmd/sgs/yacc/amd64/Makefile +++ b/usr/src/cmd/sgs/yacc/amd64/Makefile @@ -23,8 +23,6 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # This Makefile is only to produce 64-bit yacc shared library liby.so.1 # and not for building 64-bit yacc itself. @@ -39,7 +37,7 @@ POFILE= all_lib: $(LIBS) -install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) +install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/yacc/i386/Makefile b/usr/src/cmd/sgs/yacc/i386/Makefile index 5ca3d8bd7d..20885a7713 100644 --- a/usr/src/cmd/sgs/yacc/i386/Makefile +++ b/usr/src/cmd/sgs/yacc/i386/Makefile @@ -40,7 +40,7 @@ install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) $(RM) $(ROOTCCSBIN)/yaccpar $(SYMLINK) ../../share/lib/ccs/yaccpar $(ROOTCCSBIN)/yaccpar -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTCOMPATLINKS) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/yacc/sparc/Makefile b/usr/src/cmd/sgs/yacc/sparc/Makefile index 65d76b6f21..909fb6e7e2 100644 --- a/usr/src/cmd/sgs/yacc/sparc/Makefile +++ b/usr/src/cmd/sgs/yacc/sparc/Makefile @@ -38,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTCOMPATLINKS) $(RM) $(ROOTCCSBIN)/yaccpar $(SYMLINK) ../../share/lib/ccs/yaccpar $(ROOTCCSBIN)/yaccpar diff --git a/usr/src/cmd/sgs/yacc/sparcv9/Makefile b/usr/src/cmd/sgs/yacc/sparcv9/Makefile index 1c65ac76b5..f94db938f3 100644 --- a/usr/src/cmd/sgs/yacc/sparcv9/Makefile +++ b/usr/src/cmd/sgs/yacc/sparcv9/Makefile @@ -20,13 +20,9 @@ # CDDL HEADER END # # -# ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1997 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/yacc/sparcv9/Makefile -# # This Makefile is only to produce 64-bit yacc shared library liby.so.1 # and not for building 64-bit yacc itself. @@ -41,7 +37,7 @@ POFILE= all_lib: $(LIBS) -install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) +install_lib: all_lib $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/smbios/smbios.c b/usr/src/cmd/smbios/smbios.c index 1d3e14e372..9c6d058182 100644 --- a/usr/src/cmd/smbios/smbios.c +++ b/usr/src/cmd/smbios/smbios.c @@ -177,13 +177,23 @@ jedec_print(FILE *fp, const char *desc, uint_t id) const char *name; uint_t cont, vendor; - vendor = id & 0xff; - cont = (id >> 8) & 0xff; + /* + * SMBIOS encodes data in the way that the underlying memory standard + * does. In this case, the upper byte indicates the vendor that we care + * about while the lower byte indicates the number of continuations that + * are needed. libjedec indexes this based on zero (e.g. table 1 is zero + * continuations), which is how the spec encodes it. We add one so that + * we can match how the spec describes it. + */ + vendor = id >> 8; + cont = id & 0x7f; name = libjedec_vendor_string(cont, vendor); if (name == NULL) { - oprintf(fp, " %s: 0x%x\n", desc, id); + oprintf(fp, " %s: Bank: 0x%x Vendor: 0x%x\n", desc, cont + 1, + vendor); } else { - oprintf(fp, " %s: 0x%x (%s)\n", desc, id, name); + oprintf(fp, " %s: Bank: 0x%x Vendor: 0x%x (%s)\n", desc, + cont + 1, vendor, name); } } @@ -1014,7 +1024,7 @@ print_memdevice(smbios_hdl_t *shp, id_t id, FILE *fp) } if (md.smbmd_opcap_flags != 0) { - flag_printf(fp, " Operating Mode Capabilities", + flag_printf(fp, "Operating Mode Capabilities", md.smbmd_opcap_flags, sizeof (md.smbmd_opcap_flags) * NBBY, smbios_memdevice_op_capab_name, smbios_memdevice_op_capab_desc); diff --git a/usr/src/cmd/svc/svccfg/svccfg_xml.c b/usr/src/cmd/svc/svccfg/svccfg_xml.c index 13c7a90d12..c0810de2ab 100644 --- a/usr/src/cmd/svc/svccfg/svccfg_xml.c +++ b/usr/src/cmd/svc/svccfg/svccfg_xml.c @@ -23,7 +23,7 @@ */ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright 2019 Joyent, Inc. + * Copyright 2020 Joyent, Inc. */ @@ -3404,6 +3404,28 @@ out: } /* + * Validate the svc:/-prefixed FMRI generated from the service name. + */ +static void +validate_service_name(const entity_t *s) +{ + char *fmri; + int ftype; + const char *finst; + + if ((fmri = uu_strdup(s->sc_fmri)) == NULL) + uu_die(gettext("couldn't allocate memory")); + + if (scf_parse_fmri(fmri, &ftype, NULL, NULL, &finst, NULL, NULL) != 0 || + finst != NULL || ftype != SCF_FMRI_TYPE_SVC) { + uu_die(gettext("invalid value \"%s\": should be a bare " + "service name\n"), s->sc_name); + } + + uu_free(fmri); +} + +/* * Translate a service element into an internal instance/property tree, added * to bundle. * @@ -3427,6 +3449,8 @@ lxml_get_service(bundle_t *bundle, xmlNodePtr svc, svccfg_op_t op) s = internal_service_new((char *)xmlGetProp(svc, (xmlChar *)name_attr)); + validate_service_name(s); + version = xmlGetProp(svc, (xmlChar *)version_attr); s->sc_u.sc_service.sc_service_version = atol((const char *)version); xmlFree(version); diff --git a/usr/src/cmd/w/w.c b/usr/src/cmd/w/w.c index f945415688..85b5726631 100644 --- a/usr/src/cmd/w/w.c +++ b/usr/src/cmd/w/w.c @@ -392,12 +392,8 @@ main(int argc, char *argv[]) dirfd = priv_proc_open(pname, O_RDONLY | O_DIRECTORY); - if (dirfd < 0) { - if (errno == ENOENT) - continue; - warn(gettext("failed to open %s"), pname); + if (dirfd < 0) continue; - } procfd = priv_proc_openat(dirfd, "psinfo", O_RDONLY); if (procfd < 0) { diff --git a/usr/src/cmd/whodo/whodo.c b/usr/src/cmd/whodo/whodo.c index 98abc0792d..6527aaf7c3 100644 --- a/usr/src/cmd/whodo/whodo.c +++ b/usr/src/cmd/whodo/whodo.c @@ -371,13 +371,8 @@ main(int argc, char *argv[]) dirfd = priv_proc_open(pname, O_RDONLY | O_DIRECTORY); - if (dirfd < 0) { - if (errno == ENOENT) - continue; - warn(gettext("failed to open %s"), pname); + if (dirfd < 0) continue; - } - procfd = priv_proc_openat(dirfd, "psinfo", O_RDONLY); if (procfd < 0) { diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c index ecc049c1fc..6c53682364 100644 --- a/usr/src/cmd/zfs/zfs_main.c +++ b/usr/src/cmd/zfs/zfs_main.c @@ -4247,7 +4247,7 @@ zfs_do_send(int argc, char **argv) * Incremental source name begins with # or @. * Default to same fs as target. */ - (void) strncpy(frombuf, argv[0], sizeof (frombuf)); + (void) strlcpy(frombuf, argv[0], sizeof (frombuf)); cp = strchr(frombuf, '@'); if (cp != NULL) *cp = '\0'; @@ -7480,7 +7480,7 @@ zfs_do_bookmark(int argc, char **argv) *strchr(snapname, '#') = '\0'; (void) strlcat(snapname, argv[0], sizeof (snapname)); } else { - (void) strncpy(snapname, argv[0], sizeof (snapname)); + (void) strlcpy(snapname, argv[0], sizeof (snapname)); } zhp = zfs_open(g_zfs, snapname, ZFS_TYPE_SNAPSHOT); if (zhp == NULL) diff --git a/usr/src/cmd/zinject/zinject.c b/usr/src/cmd/zinject/zinject.c index 16e659ca6f..3ba2976df1 100644 --- a/usr/src/cmd/zinject/zinject.c +++ b/usr/src/cmd/zinject/zinject.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2017, Intel Corporation. */ /* @@ -124,7 +125,7 @@ * cache. * * The '-f' flag controls the frequency of errors injected, expressed as a - * integer percentage between 1 and 100. The default is 100. + * real number percentage between 0.0001 and 100. The default is 100. * * The this form is responsible for actually injecting the handler into the * framework. It takes the arguments described above, translates them to the @@ -231,12 +232,14 @@ usage(void) "\t\tspa_vdev_exit() will trigger a panic.\n" "\n" "\tzinject -d device [-e errno] [-L <nvlist|uber|pad1|pad2>] [-F]\n" - "\t [-T <read|write|free|claim|all> pool\n" + "\t [-T <read|write|free|claim|all>] [-f frequency] pool\n" "\n" "\t\tInject a fault into a particular device or the device's\n" "\t\tlabel. Label injection can either be 'nvlist', 'uber',\n " "\t\t'pad1', or 'pad2'.\n" "\t\t'errno' can be 'nxio' (the default), 'io', or 'dtl'.\n" + "\t\t'frequency' is a value between 0.0001 and 100.0 that limits\n" + "\t\tdevice error injection to a percentage of the IOs.\n" "\n" "\tzinject -d device -A <degrade|fault> pool\n" "\n" @@ -313,7 +316,7 @@ usage(void) "\t\t-u\tUnload the associated pool. Can be specified with only\n" "\t\t\ta pool object.\n" "\t\t-f\tOnly inject errors a fraction of the time. Expressed as\n" - "\t\t\ta percentage between 1 and 100.\n" + "\t\t\ta percentage between 0.0001 and 100.\n" "\n" "\t-t data\t\tInject an error into the plain file contents of a\n" "\t\t\tfile. The object must be specified as a complete path\n" @@ -657,6 +660,27 @@ parse_delay(char *str, uint64_t *delay, uint64_t *nlanes) return (0); } +static int +parse_frequency(const char *str, uint32_t *percent) +{ + double val; + char *post; + + val = strtod(str, &post); + if (post == NULL || *post != '\0') + return (EINVAL); + + /* valid range is [0.0001, 100.0] */ + val /= 100.0f; + if (val < 0.000001f || val > 1.0f) + return (ERANGE); + + /* convert to an integer for use by kernel */ + *percent = ((uint32_t)(val * ZI_PERCENTAGE_MAX)); + + return (0); +} + /* * This function converts a string specifier for DVAs into a bit mask. * The dva's provided by the user should be 0 indexed and separated by @@ -748,6 +772,7 @@ main(int argc, char **argv) if ((zfs_fd = open(ZFS_DEV, O_RDWR)) < 0) { (void) fprintf(stderr, "failed to open ZFS device\n"); + libzfs_fini(g_zfs); return (1); } @@ -763,6 +788,7 @@ main(int argc, char **argv) "information.\n"); } + libzfs_fini(g_zfs); return (0); } @@ -781,6 +807,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid action '%s': " "must be 'degrade' or 'fault'\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -811,6 +838,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid i/o delay " "value: '%s'\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -834,10 +862,13 @@ main(int argc, char **argv) } break; case 'f': - record.zi_freq = atoi(optarg); - if (record.zi_freq < 1 || record.zi_freq > 100) { - (void) fprintf(stderr, "frequency range must " - "be in the range (0, 100]\n"); + ret = parse_frequency(optarg, &record.zi_freq); + if (ret != 0) { + (void) fprintf(stderr, "%sfrequency value must " + "be in the range [0.0001, 100.0]\n", + ret == EINVAL ? "invalid value: " : + ret == ERANGE ? "out of range: " : ""); + libzfs_fini(g_zfs); return (1); } break; @@ -851,6 +882,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid duration '%s': " "must be a positive integer\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } /* store duration of txgs as its negative */ @@ -858,6 +890,7 @@ main(int argc, char **argv) break; case 'h': usage(); + libzfs_fini(g_zfs); return (0); case 'I': /* default duration, if one hasn't yet been defined */ @@ -871,6 +904,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid level '%s': " "must be an integer\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -896,6 +930,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid duration '%s': " "must be a positive integer\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -915,6 +950,7 @@ main(int argc, char **argv) "'%s': must be 'read', 'write', 'free', " "'claim' or 'all'\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -924,6 +960,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid type '%s'\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -936,6 +973,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid label type " "'%s'\n", optarg); usage(); + libzfs_fini(g_zfs); return (1); } break; @@ -943,11 +981,13 @@ main(int argc, char **argv) (void) fprintf(stderr, "option -%c requires an " "operand\n", optopt); usage(); + libzfs_fini(g_zfs); return (1); case '?': (void) fprintf(stderr, "invalid option '%c'\n", optopt); usage(); + libzfs_fini(g_zfs); return (2); } } @@ -968,11 +1008,13 @@ main(int argc, char **argv) (void) fprintf(stderr, "cancel (-c) incompatible with " "any other options\n"); usage(); + libzfs_fini(g_zfs); return (2); } if (argc != 0) { (void) fprintf(stderr, "extraneous argument to '-c'\n"); usage(); + libzfs_fini(g_zfs); return (2); } @@ -984,6 +1026,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "invalid handle id '%s':" " must be an integer or 'all'\n", cancel); usage(); + libzfs_fini(g_zfs); return (1); } return (cancel_handler(id)); @@ -1001,6 +1044,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "device (-d) incompatible with " "data error injection\n"); usage(); + libzfs_fini(g_zfs); return (2); } @@ -1008,21 +1052,25 @@ main(int argc, char **argv) (void) fprintf(stderr, "device (-d) injection requires " "a single pool name\n"); usage(); + libzfs_fini(g_zfs); return (2); } - (void) strcpy(pool, argv[0]); + (void) strlcpy(pool, argv[0], sizeof (pool)); dataset[0] = '\0'; if (error == ECKSUM) { (void) fprintf(stderr, "device error type must be " "'io' or 'nxio'\n"); + libzfs_fini(g_zfs); return (1); } record.zi_iotype = io_type; - if (translate_device(pool, device, label, &record) != 0) + if (translate_device(pool, device, label, &record) != 0) { + libzfs_fini(g_zfs); return (1); + } if (!error) error = ENXIO; @@ -1036,6 +1084,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "raw (-b) format with " "any other options\n"); usage(); + libzfs_fini(g_zfs); return (2); } @@ -1043,21 +1092,25 @@ main(int argc, char **argv) (void) fprintf(stderr, "raw (-b) format expects a " "single pool name\n"); usage(); + libzfs_fini(g_zfs); return (2); } - (void) strcpy(pool, argv[0]); + (void) strlcpy(pool, argv[0], sizeof (pool)); dataset[0] = '\0'; if (error == ENXIO) { (void) fprintf(stderr, "data error type must be " "'checksum' or 'io'\n"); + libzfs_fini(g_zfs); return (1); } record.zi_cmd = ZINJECT_DATA_FAULT; - if (translate_raw(raw, &record) != 0) + if (translate_raw(raw, &record) != 0) { + libzfs_fini(g_zfs); return (1); + } if (!error) error = EIO; } else if (record.zi_cmd == ZINJECT_PANIC) { @@ -1067,6 +1120,7 @@ main(int argc, char **argv) (void) fprintf(stderr, "panic (-p) incompatible with " "other options\n"); usage(); + libzfs_fini(g_zfs); return (2); } @@ -1074,10 +1128,11 @@ main(int argc, char **argv) (void) fprintf(stderr, "panic (-p) injection requires " "a single pool name and an optional id\n"); usage(); + libzfs_fini(g_zfs); return (2); } - (void) strcpy(pool, argv[0]); + (void) strlcpy(pool, argv[0], sizeof (pool)); if (argv[1] != NULL) record.zi_type = atoi(argv[1]); dataset[0] = '\0'; @@ -1095,21 +1150,24 @@ main(int argc, char **argv) (void) fprintf(stderr, "-s or -g meaningless " "without -I (ignore writes)\n"); usage(); + libzfs_fini(g_zfs); return (2); } else if (dur_secs && dur_txg) { (void) fprintf(stderr, "choose a duration either " "in seconds (-s) or a number of txgs (-g) " "but not both\n"); usage(); + libzfs_fini(g_zfs); return (2); } else if (argc != 1) { (void) fprintf(stderr, "ignore writes (-I) " "injection requires a single pool name\n"); usage(); + libzfs_fini(g_zfs); return (2); } - (void) strcpy(pool, argv[0]); + (void) strlcpy(pool, argv[0], sizeof (pool)); dataset[0] = '\0'; } else if (type == TYPE_INVAL) { if (flags == 0) { @@ -1117,16 +1175,18 @@ main(int argc, char **argv) "'-t', '-a', '-p', '-I' or '-u' " "must be specified\n"); usage(); + libzfs_fini(g_zfs); return (2); } if (argc == 1 && (flags & ZINJECT_UNLOAD_SPA)) { - (void) strcpy(pool, argv[0]); + (void) strlcpy(pool, argv[0], sizeof (pool)); dataset[0] = '\0'; } else if (argc != 0) { (void) fprintf(stderr, "extraneous argument for " "'-f'\n"); usage(); + libzfs_fini(g_zfs); return (2); } @@ -1135,12 +1195,14 @@ main(int argc, char **argv) if (argc != 1) { (void) fprintf(stderr, "missing object\n"); usage(); + libzfs_fini(g_zfs); return (2); } if (error == ENXIO) { (void) fprintf(stderr, "data error type must be " "'checksum' or 'io'\n"); + libzfs_fini(g_zfs); return (1); } @@ -1173,8 +1235,10 @@ main(int argc, char **argv) } if (translate_record(type, argv[0], range, level, &record, pool, - dataset) != 0) + dataset) != 0) { + libzfs_fini(g_zfs); return (1); + } if (!error) error = EIO; } @@ -1185,11 +1249,16 @@ main(int argc, char **argv) * time we access the pool. */ if (dataset[0] != '\0' && domount) { - if ((zhp = zfs_open(g_zfs, dataset, ZFS_TYPE_DATASET)) == NULL) + if ((zhp = zfs_open(g_zfs, dataset, + ZFS_TYPE_DATASET)) == NULL) { + libzfs_fini(g_zfs); return (1); + } - if (zfs_unmount(zhp, NULL, 0) != 0) + if (zfs_unmount(zhp, NULL, 0) != 0) { + libzfs_fini(g_zfs); return (1); + } } record.zi_error = error; diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c index 31ce0c7e11..cb13102874 100644 --- a/usr/src/cmd/zpool/zpool_main.c +++ b/usr/src/cmd/zpool/zpool_main.c @@ -1082,6 +1082,7 @@ errout: * '/<pool>' * -t Use the temporary name until the pool is exported. * -o Set property=value. + * -o Set feature@feature=enabled|disabled. * -d Don't automatically enable all supported pool features * (individual features can be enabled with -o). * -O Set fsproperty=value in the pool's root file system @@ -1415,22 +1416,26 @@ zpool_do_create(int argc, char **argv) /* * Hand off to libzfs. */ - if (enable_all_pool_feat) { - spa_feature_t i; - for (i = 0; i < SPA_FEATURES; i++) { - char propname[MAXPATHLEN]; - zfeature_info_t *feat = &spa_feature_table[i]; - (void) snprintf(propname, sizeof (propname), - "feature@%s", feat->fi_uname); - - /* - * Skip feature if user specified it manually - * on the command line. - */ - if (nvlist_exists(props, propname)) - continue; + spa_feature_t i; + for (i = 0; i < SPA_FEATURES; i++) { + char propname[MAXPATHLEN]; + char *propval; + zfeature_info_t *feat = &spa_feature_table[i]; + (void) snprintf(propname, sizeof (propname), + "feature@%s", feat->fi_uname); + /* + * Only features contained in props will be enabled: + * remove from the nvlist every ZFS_FEATURE_DISABLED + * value and add every missing ZFS_FEATURE_ENABLED if + * enable_all_pool_feat is set. + */ + if (!nvlist_lookup_string(props, propname, &propval)) { + if (strcmp(propval, ZFS_FEATURE_DISABLED) == 0) + (void) nvlist_remove_all(props, + propname); + } else if (enable_all_pool_feat) { ret = add_prop_list(propname, ZFS_FEATURE_ENABLED, &props, B_TRUE); if (ret != 0) @@ -3411,20 +3416,20 @@ print_iostat_labels(iostat_cbdata_t *cb, unsigned int force_column_width, /* * Utility function to print out a line of dashes like: * - * -------------------------------- ----- ----- ----- ----- ----- + * -------------------------------- ----- ----- ----- ----- ----- * * ...or a dashed named-row line like: * - * logs - - - - - + * logs - - - - - * * @cb: iostat data * * @force_column_width If non-zero, use the value as the column width. - * Otherwise use the default column widths. + * Otherwise use the default column widths. * * @name: Print a dashed named-row line starting - * with @name. Otherwise, print a regular - * dashed line. + * with @name. Otherwise, print a regular + * dashed line. */ static void print_iostat_dashes(iostat_cbdata_t *cb, unsigned int force_column_width, |