From owner-p4-projects@FreeBSD.ORG Mon Jul 11 08:39:27 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE78416A420; Mon, 11 Jul 2005 08:39:26 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B6DC16A41C for ; Mon, 11 Jul 2005 08:39:26 +0000 (GMT) (envelope-from soc-victor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7488843D6D for ; Mon, 11 Jul 2005 08:39:19 +0000 (GMT) (envelope-from soc-victor@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6B8dJ5P000965 for ; Mon, 11 Jul 2005 08:39:19 GMT (envelope-from soc-victor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6B8dJ9i000962 for perforce@freebsd.org; Mon, 11 Jul 2005 08:39:19 GMT (envelope-from soc-victor@freebsd.org) Date: Mon, 11 Jul 2005 08:39:19 GMT Message-Id: <200507110839.j6B8dJ9i000962@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-victor@freebsd.org using -f From: soc-victor To: Perforce Change Reviews Cc: Subject: PERFORCE change 79968 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 08:39:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=79968 Change 79968 by soc-victor@soc-victor_82.76.158.176 on 2005/07/11 08:38:32 Minor fixes: GMT offset, debug macro changed to print on stderr Affected files ... .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile#3 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c#2 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c#2 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h#2 edit Differences ... ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile#3 (text+ko) ==== @@ -1,6 +1,6 @@ # # Copyright (c) 2005 The FreeBSD Project -# Author: Victor Crcueru +# Author: Victor Cruceru # CONTRIB=${.CURDIR}/../../../../contrib/bsnmp ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c#2 (text+ko) ==== @@ -291,7 +291,7 @@ return 0; /*error*/ } - HR_DPRINTF(("Got boot timestamp from kernel:{%ld,%ld}\n", + HR_DPRINTF((stderr,"Got boot timestamp from kernel:{%ld,%ld}\n", kernel_boot_timestamp.tv_sec, kernel_boot_timestamp.tv_usec)); @@ -342,7 +342,7 @@ s_date_time[6] = tloc_tm.tm_sec; s_date_time[7] = right_now.tv_usec/100000; /*deci-seconds */ - if (tloc_tm.tm_gmtoff > 0){ + if (tloc_tm.tm_gmtoff < 0){ s_date_time[8] = '-'; }else{ s_date_time[8] = '+'; @@ -380,7 +380,7 @@ } (void)strncpy(hostres_ctx_g.k_boot_line, buf, 127); - HR_DPRINTF(("Got kernel boot file; %s\n",hostres_ctx_g.k_boot_line)); + HR_DPRINTF((stderr,"Got kernel boot file: %s\n",hostres_ctx_g.k_boot_line)); free(buf); } return ((u_char*)&hostres_ctx_g.k_boot_line[0]); @@ -437,7 +437,7 @@ syslog(LOG_ERR,"sysctl KERN_MAXPROC failed: %m "); return -1; /*error*/ } - HR_DPRINTF(("Got kernel maxporc; %d\n",hostres_ctx_g.max_proc)); + HR_DPRINTF((stderr, "Got kernel maxporc: %d\n",hostres_ctx_g.max_proc)); } return hostres_ctx_g.max_proc; ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c#2 (text+ko) ==== @@ -85,7 +85,7 @@ } - HR_DPRINTF(("[%s] done.\n", __FUNCTION__)); + HR_DPRINTF((stderr,"[%s] done.\n", __FUNCTION__)); return (0); } @@ -127,7 +127,7 @@ if( host_registration_id > 0){ or_unregister(host_registration_id); } - HR_DPRINTF(("[%s] done.\n", __FUNCTION__)); + HR_DPRINTF((stderr,"[%s] done.\n", __FUNCTION__)); return (0); } @@ -138,7 +138,7 @@ static void hostres_idle_v(void){ /*nothing iteresting here for the time being*/ - HR_DPRINTF(("[%s] done.\n ", __FUNCTION__)); + HR_DPRINTF((stderr,"[%s] done.\n ", __FUNCTION__)); } /* @@ -148,7 +148,7 @@ static void hostres_dump_v(void){ /*nothing iteresting here for the time being*/ - HR_DPRINTF(("[%s] done.\n ", __FUNCTION__)); + HR_DPRINTF((stderr, "[%s] done.\n ", __FUNCTION__)); } @@ -159,7 +159,7 @@ static void hostres_config_v(void){ /*nothing iteresting here for the time being*/ - HR_DPRINTF(("[%s] done.\n ", __FUNCTION__)); + HR_DPRINTF((stderr, "[%s] done.\n ", __FUNCTION__)); } @@ -172,7 +172,7 @@ goto LABEL_RETURN; } LABEL_RETURN:; - HR_DPRINTF(("[%s] done.\n ", __FUNCTION__)); + HR_DPRINTF((stderr,"[%s] done.\n ", __FUNCTION__)); } /* @@ -184,7 +184,7 @@ host_registration_id = or_register(&oid_host, "The MIB module for host resource mib (rfc 2790).", hostres_module); - HR_DPRINTF(("[%s] done.\n ", __FUNCTION__)); + HR_DPRINTF((stderr, "[%s] done.\n ", __FUNCTION__)); } /*this identifies the HOST RESOURCES mib module*/ ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h#2 (text+ko) ==== @@ -42,8 +42,7 @@ /*a debug macro*/ #ifndef NDEBUG -#include -#define HR_DPRINTF(args) (printf("HR DEBUG: "), printf args) +#define HR_DPRINTF(args) (fprintf(stderr,"HR DEBUG: "), fprintf args) #else