summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Carlson <james.d.carlson@sun.com>2009-02-09 14:12:33 -0500
committerJames Carlson <james.d.carlson@sun.com>2009-02-09 14:12:33 -0500
commit47842382d52f28aa3173aa6b511781c322ccb6a2 (patch)
tree1d36002cbf0be08a944218cb8d92826017a0527a
parentb9c2bf667ad59c0802cbb7b278a64bfeacceab14 (diff)
downloadillumos-joyent-47842382d52f28aa3173aa6b511781c322ccb6a2.tar.gz
4875943 NOTE() lint directives don't work in ON
-rw-r--r--usr/src/Makefile.master12
-rw-r--r--usr/src/cmd/ndmpd/ndmp/ndmpd_connect.c2
-rw-r--r--usr/src/cmd/ndmpd/ndmp/ndmpd_util.c3
-rw-r--r--usr/src/cmd/ndmpd/tlm/tlm_bitmap.c15
-rw-r--r--usr/src/cmd/ndmpd/tlm/tlm_hardlink.c3
5 files changed, 9 insertions, 26 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 7b09f89cc7..d4840df9aa 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -20,7 +20,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
@@ -653,9 +653,15 @@ ALWAYS_LINT_DEFS += -erroff=E_INTEGRAL_CONST_EXP_EXPECTED
ALWAYS_LINT_DEFS += -erroff=E_PASS_INT_TO_SMALL_INT
ALWAYS_LINT_DEFS += -erroff=E_PTR_CONV_LOSES_BITS
+# This forces lint to pick up note.h and sys/note.h from Devpro rather than
+# from the proto area. The note.h that ON delivers would disable NOTE().
+ONLY_LINT_DEFS = -I$(SPRO_VROOT)/prod/include/lint
+
SECLEVEL= core
-LINT.c= $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(ALWAYS_LINT_DEFS)
-LINT64.c= $(LINT) $(LINTFLAGS64) $(CPPFLAGS) $(ALWAYS_LINT_DEFS)
+LINT.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS) $(CPPFLAGS) \
+ $(ALWAYS_LINT_DEFS)
+LINT64.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS64) $(CPPFLAGS) \
+ $(ALWAYS_LINT_DEFS)
LINT.s= $(LINT.c)
# For some future builds, NATIVE_MACH and MACH might be different.
diff --git a/usr/src/cmd/ndmpd/ndmp/ndmpd_connect.c b/usr/src/cmd/ndmpd/ndmp/ndmpd_connect.c
index 6a84b387b7..75e4d40482 100644
--- a/usr/src/cmd/ndmpd/ndmp/ndmpd_connect.c
+++ b/usr/src/cmd/ndmpd/ndmp/ndmpd_connect.c
@@ -684,7 +684,6 @@ ndmp_connect_list_add(ndmp_connection_t *connection, int *id)
clp->cl_id = *id;
(void) mutex_lock(&cl_mutex);
- /* LINTED: E_CONSTANT_CONDITION */
LIST_INSERT_HEAD(&cl_head, clp, cl_q);
(*id)++;
(void) mutex_unlock(&cl_mutex);
@@ -716,7 +715,6 @@ ndmp_connect_list_del(ndmp_connection_t *connection)
return (-1);
}
- /* LINTED: E_CONSTANT_CONDITION */
LIST_REMOVE(clp, cl_q);
(void) mutex_unlock(&cl_mutex);
free(clp);
diff --git a/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c b/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c
index 40b31f2001..9c916092cd 100644
--- a/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c
+++ b/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c
@@ -1611,7 +1611,6 @@ ndmp_open_list_add(ndmp_connection_t *conn, char *dev, int sid, int lun, int fd)
else
olp->ol_fd = -1;
(void) mutex_lock(&ol_mutex);
- /* LINTED: E_CONSTANT_CONDITION */
LIST_INSERT_HEAD(olhp, olp, ol_q);
(void) mutex_unlock(&ol_mutex);
}
@@ -1651,7 +1650,6 @@ ndmp_open_list_del(char *dev, int sid, int lun)
if (--olp->ol_nref <= 0) {
NDMP_LOG(LOG_DEBUG,
"Removed dev: %s, sid: %d, lun: %d", dev, sid, lun);
- /* LINTED: E_CONSTANT_CONDITION */
LIST_REMOVE(olp, ol_q);
free(olp->ol_devnm);
free(olp);
@@ -1689,7 +1687,6 @@ ndmp_open_list_release(ndmp_connection_t *conn)
NDMP_LOG(LOG_DEBUG,
"Removed dev: %s, sid: %d, lun: %d",
olp->ol_devnm, olp->ol_sid, olp->ol_lun);
- /* LINTED: E_CONSTANT_CONDITION */
LIST_REMOVE(olp, ol_q);
if (olp->ol_fd > 0)
(void) close(olp->ol_fd);
diff --git a/usr/src/cmd/ndmpd/tlm/tlm_bitmap.c b/usr/src/cmd/ndmpd/tlm/tlm_bitmap.c
index 27cc612543..03711cb718 100644
--- a/usr/src/cmd/ndmpd/tlm/tlm_bitmap.c
+++ b/usr/src/cmd/ndmpd/tlm/tlm_bitmap.c
@@ -390,7 +390,6 @@ bm_chunk_setup(bitmap_t *bmp, bmap_chunk_t *cp, u_quad_t bn)
h = HASH(bn);
hp = &bmp->bm_hash[h];
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_HEAD(hp, cp, c_hash);
cp->c_off = off;
cp->c_clen = cl;
@@ -462,7 +461,6 @@ hash_free(bmap_list_t *hp)
while (!TAILQ_EMPTY(hp)) {
cp = TAILQ_FIRST(hp);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(hp, cp, c_hash);
free(cp->c_bmp);
free(cp);
@@ -497,9 +495,7 @@ bm_chunk_reposition(bitmap_t *bmp, bmap_list_t *hp, bmap_chunk_t *cp)
return;
if (TAILQ_FIRST(hp) != cp) {
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(hp, cp, c_hash);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_HEAD(hp, cp, c_hash);
}
}
@@ -641,7 +637,6 @@ hash_init(bmap_list_t *hp)
int i;
for (i = 0; i < BMAP_HASH_SIZE; hp++, i++) {
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INIT(hp);
}
}
@@ -999,11 +994,9 @@ dbm_chunk_load(dbitmap_t *bmp, dbmap_chunk_t *cp, u_quad_t bn, int new)
}
if (cp) {
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_TAIL(&bmp->bm_lru, cp, c_lru);
h = HASH(bn);
hp = &bmp->bm_hash[h];
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_HEAD(hp, cp, c_hash);
cp->c_flags = 0;
cp->c_off = off;
@@ -1068,11 +1061,9 @@ dbm_chunk_alloc(dbitmap_t *bmp, u_quad_t bn)
if (BMAP_CIS_DIRTY(cp))
(void) dbm_chunk_flush(bmp, cp);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(&bmp->bm_lru, cp, c_lru);
h = HASH(cp->c_off);
hp = &bmp->bm_hash[h];
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(hp, cp, c_hash);
return (dbm_chunk_load(bmp, cp, bn, BMAP_OLD_CHUNK));
}
@@ -1098,7 +1089,6 @@ dbm_chunks_free(dbitmap_t *bmp)
while (!TAILQ_EMPTY(headp)) {
cp = TAILQ_FIRST(headp);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(headp, cp, c_lru);
free(cp->c_bmp);
free(cp);
@@ -1115,14 +1105,10 @@ static void
dbm_chunk_reposition(dbitmap_t *bmp, dbmap_list_t *hp, dbmap_chunk_t *cp)
{
if (bmp && hp && cp) {
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(&bmp->bm_lru, cp, c_lru);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_TAIL(&bmp->bm_lru, cp, c_lru);
if (TAILQ_FIRST(hp) != cp) {
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_REMOVE(hp, cp, c_hash);
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INSERT_HEAD(hp, cp, c_hash);
}
}
@@ -1427,7 +1413,6 @@ dbm_alloc(char *fname, u_quad_t len, int set)
bmp->bm_len = len;
bmp->bm_ccur = 0;
bmp->bm_cmax = BMAP_CHUNK_MAX;
- /* LINTED: E_CONSTANT_CONDITION */
TAILQ_INIT(&bmp->bm_lru);
hash_init((bmap_list_t *)bmp->bm_hash);
}
diff --git a/usr/src/cmd/ndmpd/tlm/tlm_hardlink.c b/usr/src/cmd/ndmpd/tlm/tlm_hardlink.c
index 6599bf567b..c3224fa4a5 100644
--- a/usr/src/cmd/ndmpd/tlm/tlm_hardlink.c
+++ b/usr/src/cmd/ndmpd/tlm/tlm_hardlink.c
@@ -59,7 +59,6 @@ hardlink_q_init()
qhead = (struct hardlink_q *)malloc(sizeof (struct hardlink_q));
if (qhead) {
- /* LINTED: E_CONSTANT_CONDITION */
SLIST_INIT(qhead);
}
@@ -87,7 +86,6 @@ hardlink_q_cleanup(struct hardlink_q *hl_q)
NDMP_LOG(LOG_DEBUG, "(2): remove node, inode = %lu",
hl->inode);
- /* LINTED: E_CONSTANT_CONDITION */
SLIST_REMOVE_HEAD(hl_q, next_hardlink);
/* remove the temporary file */
@@ -193,7 +191,6 @@ hardlink_q_add(struct hardlink_q *hl_q, unsigned long inode,
"(2): added node, inode = %lu, path = %p (%s)",
hl->inode, hl->path, hl->path? hl->path : "(--)");
- /* LINTED: E_CONSTANT_CONDITION */
SLIST_INSERT_HEAD(hl_q, hl, next_hardlink);
return (0);