PERFORCE change 79968 for review
soc-victor
soc-victor at FreeBSD.org
Mon Jul 11 08:39:27 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=79968
Change 79968 by soc-victor at 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 <soc-victor at freebsd.org>
+# Author: Victor Cruceru <soc-victor at freebsd.org>
#
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 <stdio.h>
-#define HR_DPRINTF(args) (printf("HR DEBUG: "), printf args)
+#define HR_DPRINTF(args) (fprintf(stderr,"HR DEBUG: "), fprintf args)
#else
More information about the p4-projects
mailing list