Date: Wed, 13 Feb 2002 22:37:48 +0900 From: Jun Kuriyama <kuriyama@imgsrc.co.jp> To: billf@FreeBSD.org Cc: Ports Team <ports@FreeBSD.org> Subject: net/net-snmp hr_disk.c and diskio.c patch Message-ID: <7madud5wpf.wl@waterblue.imgsrc.co.jp>
next in thread | raw e-mail | index | archive | help
--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 <kuriyama@imgsrc.co.jp> // IMG SRC, Inc. <kuriyama@FreeBSD.org> // 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 <sys/diskstats.h> + #endif /* bsdi */ + +-#if defined (freebsd4) ++#if __FreeBSD__ >= 4 + #include <sys/dkstat.h> + #include <devstat.h> +-#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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7madud5wpf.wl>