From owner-freebsd-ports Wed Feb 13 5:38:23 2002 Delivered-To: freebsd-ports@freebsd.org Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by hub.freebsd.org (Postfix) with ESMTP id 2742237B405; Wed, 13 Feb 2002 05:38:17 -0800 (PST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by white.imgsrc.co.jp (Postfix) with ESMTP id A278924D06; Wed, 13 Feb 2002 22:38:16 +0900 (JST) Received: from waterblue.imgsrc.co.jp (waterblue.imgsrc.co.jp [2001:218:422:2::160]) by black.imgsrc.co.jp (Postfix) with ESMTP id DD4D51E46E4; Wed, 13 Feb 2002 22:38:13 +0900 (JST) Date: Wed, 13 Feb 2002 22:37:48 +0900 Message-ID: <7madud5wpf.wl@waterblue.imgsrc.co.jp> From: Jun Kuriyama To: billf@FreeBSD.org Cc: Ports Team Subject: net/net-snmp hr_disk.c and diskio.c patch User-Agent: Wanderlust/2.9.6 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.1 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Wed_Feb_13_22:37:48_2002-1" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --Multipart_Wed_Feb_13_22:37:48_2002-1 Content-Type: text/plain; charset=US-ASCII I've made a patch to fit 4-stable and 5-current situation of hr_disk.c. And this patch includes "WITH_SNMP_DISKIO" knob to enable ucd-snmp/diskio module. If there is no objection, I'll commit this patch and will turn on WITH_SNMP_DISKIO knob by default after aging test on my environment. # Of course, this patch will be sent to ucd-snmp coders. -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project --Multipart_Wed_Feb_13_22:37:48_2002-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="net-snmp.diff" Content-Transfer-Encoding: 7bit Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/net-snmp/Makefile,v retrieving revision 1.59 diff -u -r1.59 Makefile --- Makefile 21 Jan 2002 16:54:50 -0000 1.59 +++ Makefile 13 Feb 2002 13:30:47 -0000 @@ -7,6 +7,7 @@ PORTNAME= ucd-snmp PORTVERSION= 4.2.3 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://ucd-snmp.ucdavis.edu/ \ @@ -61,6 +62,9 @@ .if ${OSVERSION} >= 400014 CONFIGURE_ARGS+= --enable-ipv6 +.endif +.if defined(WITH_SNMP_DISKIO) +CONFIGURE_ARGS+=--with-mib-modules="ucd-snmp/diskio" --with-libs="-ldevstat" .endif SHLIB_VERSION= 4 Index: files/patch-diskio.c =================================================================== RCS file: files/patch-diskio.c diff -N files/patch-diskio.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-diskio.c 13 Feb 2002 13:25:26 -0000 @@ -0,0 +1,31 @@ +--- agent/mibgroup/ucd-snmp/diskio.c.orig Mon Sep 17 06:49:41 2001 ++++ agent/mibgroup/ucd-snmp/diskio.c Wed Feb 13 22:22:45 2002 +@@ -46,10 +46,10 @@ + #include + #endif /* bsdi */ + +-#if defined (freebsd4) ++#if __FreeBSD__ >= 4 + #include + #include +-#endif /* freebsd */ ++#endif /* __FreeBSD__ */ + + + /********************* +@@ -298,7 +298,7 @@ + } + #endif /* bsdi */ + +-#if defined(freebsd4) ++#if __FreeBSD__ >= 4 + static int ndisk; + static struct statinfo *stat; + +@@ -377,5 +377,5 @@ + } + return NULL; + } +-#endif /* freebsd4 */ ++#endif /* __FreeBSD__ >= 4 */ + Index: files/patch-hr_disk.c =================================================================== RCS file: files/patch-hr_disk.c diff -N files/patch-hr_disk.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-hr_disk.c 13 Feb 2002 13:09:25 -0000 @@ -0,0 +1,12 @@ +--- agent/mibgroup/host/hr_disk.c.orig Mon Nov 19 13:48:10 2001 ++++ agent/mibgroup/host/hr_disk.c Tue Feb 12 22:37:43 2002 +@@ -178,6 +178,9 @@ + #elif defined(solaris2) + Add_HR_Disk_entry ( "/dev/rdsk/c%dt%dd0s%d", 0, 1, 0, 15, "/dev/rdsk/c%dt%dd0s0", 0, 7 ); + Add_HR_Disk_entry ( "/dev/rdsk/c%dd%ds%d", 0, 1, 0, 15, "/dev/rdsk/c%dd%ds0", 0, 7 ); ++#elif defined(__FreeBSD__) && __FreeBSD__ >= 4 ++ Add_HR_Disk_entry ( "/dev/ad%ds%d%c", 0, 1, 1, 4, "/dev/ad%ds%d", 'a', 'h'); ++ Add_HR_Disk_entry ( "/dev/da%ds%d%c", 0, 1, 1, 4, "/dev/da%ds%d", 'a', 'h'); + #elif defined(freebsd3) + Add_HR_Disk_entry ( "/dev/wd%ds%d%c", 0, 1, 1, 4, "/dev/wd%ds%d", 'a', 'h'); + Add_HR_Disk_entry ( "/dev/sd%ds%d%c", 0, 1, 1, 4, "/dev/sd%ds%d", 'a', 'h'); Index: files/patch-hr_print.c =================================================================== RCS file: files/patch-hr_print.c diff -N files/patch-hr_print.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-hr_print.c 13 Feb 2002 13:09:27 -0000 @@ -0,0 +1,12 @@ +--- agent/mibgroup/host/hr_print.c.orig Wed Oct 3 00:02:07 2001 ++++ agent/mibgroup/host/hr_print.c Wed Feb 13 01:02:53 2002 +@@ -30,7 +30,9 @@ + int printer_detail_status(int); + int printer_errors(int); + int header_hrprint (struct variable *,oid *, size_t *, int, size_t *, WriteMethod **); ++#ifdef HAVE_LPSTAT + FILE * run_lpstat(void); ++#endif + + + /********************* --Multipart_Wed_Feb_13_22:37:48_2002-1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message