bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findutils-4.1 /Solaris Largefile patch


From: Steve Revilak
Subject: Re: findutils-4.1 /Solaris Largefile patch
Date: Tue, 3 Jun 2003 16:57:29 -0400 (EDT)

> I'd like to submit a patch to gnu find (from findutils-4.1) to help it
> work better with largefiles on Solaris.  Specifically, this is the
> sort of thing that I'm trying to overcome:
>
> /usr/local/gnu/bin/find  /ora/5/oradata/odm/dmdate03.dbf 
> -ls/usr/local/gnu/bin/find: /ora/5/oradata/odm/dmdate03.dbf: Value too large 
> for defined data type

[snip]

> The patch is appended below.  I'm not sure if it would be necessary to
> make similar changes in other portions of the program (perhaps
> make_segment() in find/parser.c ?)

Yes, it appears that parser.c also needs to change in order for
-printf to print sizes properly.


------------------------------------------------------------------
--- find/parser.c.ORIG  2003-06-03 15:59:15.778000000 -0400
+++ find/parser.c       2003-06-03 16:51:43.598000000 -0400
@@ -1529,7 +1529,7 @@
   (*segment)->next = NULL;
   (*segment)->text_len = len;

-  fmt = (*segment)->text = xmalloc (len + 3);  /* room for "ld\0" */
+  fmt = (*segment)->text = xmalloc (len + 4);  /* room for "lld\0" */
   strncpy (fmt, format, len);
   fmt += len;

@@ -1563,6 +1563,7 @@
     case 'k':                  /* size in 1K blocks */
     case 's':                  /* size in bytes */
       *fmt++ = 'l';
+      *fmt++ = 'l';
       /*FALLTHROUGH*/
     case 'n':                  /* number of links */
       fprintf_stat_needed = true;
@@ -1573,6 +1574,7 @@

     case 'i':                  /* inode number */
       *fmt++ = 'l';
+      *fmt++ = 'l';
       /*FALLTHROUGH*/
     case 'G':                  /* GID number */
     case 'U':                  /* UID number */
------------------------------------------------------------------

-- 
Steve Revilak
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]