Re: >2TB disk stats bug

Jan Safranek <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Desmond Vicks wrote:
> Jan Safranek wrote:
>> I had the disk space 
>> usage on my TODO list for some time, now I finally have some patch to 
>> share. You can see it at
>> https://sourceforge.net/tracker/index.php?func=detail&aid=2449210&group_id=12694&atid=312694
>>
>> I'd appreciate comments and testing (preferably on some platforms I 
>> don't have, like Solaris, HP-UX, *BSD, Windows, ...)
> 
> I just tried applying this patch against the Net-SNMP trunk from svn 
> [1], revision 17325, but had no luck:
> 
> 
> prime% patch < ../net-snmp-big-disk.patch 
>  
>  
> 
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Add 64-bit disk space statistics.
> |
> |diff --git a/net-snmp/agent/mibgroup/ucd-snmp/disk.c 
> b/net-snmp/agent/mibgroup/ucd-snmp/disk.c
> |index b0d6906..186bdd2 100644
> |--- a/net-snmp/agent/mibgroup/ucd-snmp/disk.c
> |+++ b/net-snmp/agent/mibgroup/ucd-snmp/disk.c
> --------------------------
> File to patch: agent/mibgroup/ucd-snmp/disk.c
> Patching file agent/mibgroup/ucd-snmp/disk.c using Plan A...
> Hunk #1 succeeded at 169.
> Hunk #2 succeeded at 201.
> Hunk #3 succeeded at 666.
> patch: **** unexpected end of file in patch
> 
> 
> Can you see what I'm doing wrong here?

Ouch, the patch didn't have newline at the end. I attached fixed one to 
the SF.net tracker. And it would be better to use 'patch -p2 
<../net-snmp-big-disk.patch', it shouldn't ask for the file(s) to patch 
then.

I tested it on OpenSolaris 2008.05 (uname -a says "SunOS opensolaris 
5.11 snv_86 i86pc") with today's SVN trunk and it seems to work.

Jan

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.