Update of /cvsroot/leaf/src/bering-uclibc/apps/busybox
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8105

Modified Files:
        busybox-tar.patch 
Log Message:
official bb tar patch, prvided by Cedric Schieli

Index: busybox-tar.patch
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/busybox/busybox-tar.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** busybox-tar.patch   14 Aug 2006 19:23:27 -0000      1.2
--- busybox-tar.patch   4 Sep 2006 12:17:29 -0000       1.3
***************
*** 1,5 ****
! diff -ur busybox-1.2.1.orig/archival/libunarchive/filter_accept_reject_list.c 
busybox-1.2.1/archival/libunarchive/filter_accept_reject_list.c
! --- busybox-1.2.1.orig/archival/libunarchive/filter_accept_reject_list.c      
2006-07-01 00:42:04.000000000 +0200
! +++ busybox-1.2.1/archival/libunarchive/filter_accept_reject_list.c   
2006-08-14 20:43:01.069368277 +0200
  @@ -14,14 +14,14 @@
   char filter_accept_reject_list(archive_handle_t *archive_handle)
--- 1,56 ----
! --- busybox/archival/libunarchive/find_list_entry.c   2006/04/13 13:32:16     
14848
! +++ busybox/archival/libunarchive/find_list_entry.c   2006/09/03 14:04:33     
16041
! @@ -9,14 +9,46 @@
!  #include <stdlib.h>
!  #include "unarchive.h"
!  
! -/* Find a string in a list */
! +/* Find a string in a shell pattern list */
!  const llist_t *find_list_entry(const llist_t *list, const char *filename)
!  {
!       while (list) {
!               if (fnmatch(list->data, filename, 0) == 0) {
! -                     return (list);
! +                     return list;
!               }
!               list = list->link;
!       }
! -     return(NULL);
! +     return NULL;
! +}
! +
! +/* Same, but compares only path components present in pattern
! + * (extra trailing path components in filename are assumed to match)
! + */
! +const llist_t *find_list_entry2(const llist_t *list, const char *filename)
! +{
! +     char buf[PATH_MAX];
! +     int pattern_slash_cnt;
! +     const char *c;
! +     char *d;
! +
! +     while (list) {
! +             c = list->data;
! +             pattern_slash_cnt = 0;
! +             while (*c)
! +                     if (*c++ == '/') pattern_slash_cnt++;
! +             c = filename;
! +             d = buf;
! +             /* paranoia is better that buffer overflows */
! +             while (*c && d != buf + sizeof(buf)-1) {
! +                     if (*c == '/' && --pattern_slash_cnt < 0)
! +                             break;
! +                     *d++ = *c++;
! +             }
! +             *d = '\0';
! +             if (fnmatch(list->data, buf, 0) == 0) {
! +                     return list;
! +             }
! +             list = list->link;
! +     }
! +     return NULL;
!  }
! --- busybox/archival/libunarchive/filter_accept_reject_list.c 2006/04/13 
13:32:16     14848
! +++ busybox/archival/libunarchive/filter_accept_reject_list.c 2006/09/03 
14:04:33     16041
  @@ -14,14 +14,14 @@
   char filter_accept_reject_list(archive_handle_t *archive_handle)
***************
*** 19,54 ****
        /* Fail if an accept list was specified and the key wasnt in there */
        if ((accept_entry == NULL) && archive_handle->accept) {
! diff -ur busybox-1.2.1.orig/archival/libunarchive/find_list_entry.c 
busybox-1.2.1/archival/libunarchive/find_list_entry.c
! --- busybox-1.2.1.orig/archival/libunarchive/find_list_entry.c        
2006-07-01 00:42:04.000000000 +0200
! +++ busybox-1.2.1/archival/libunarchive/find_list_entry.c     2006-08-14 
20:43:01.069368277 +0200
! @@ -20,3 +20,25 @@
!       }
!       return(NULL);
!  }
! +
! +const llist_t *find_list_entry2(const llist_t *list, const char *filename)
! +{
! +     char buf[256];
! +     int s;
! +     char *c,*d;
! +     while (list) {
! +             for (c=list->data, s=0; *c;)
! +                     if (*(c++) == '/') s++;
! +             for (c=filename, d=buf; *c;) {
! +                     if (*c == '/' && (--s) < 0)
! +                                     break;
! +                     *(d++) = *(c++);
! +             }
! +             *d = 0;
! +             if (fnmatch(list->data, buf, 0) == 0) {
! +                     return (list);
! +             }
! +             list = list->link;
! +     }
! +     return(NULL);
! +}
! diff -ur busybox-1.2.1.orig/archival/tar.c busybox-1.2.1/archival/tar.c
! --- busybox-1.2.1.orig/archival/tar.c 2006-07-01 00:42:04.000000000 +0200
! +++ busybox-1.2.1/archival/tar.c      2006-08-14 20:57:08.880898561 +0200
  @@ -545,8 +545,12 @@
                tmp = cur;
--- 70,75 ----
        /* Fail if an accept list was specified and the key wasnt in there */
        if ((accept_entry == NULL) && archive_handle->accept) {
! --- busybox/archival/tar.c    2006/09/03 12:31:59     16040
! +++ busybox/archival/tar.c    2006/09/03 14:04:33     16041
  @@ -545,8 +545,12 @@
                tmp = cur;
***************
*** 65,72 ****
        }
        return newlist;
! diff -ur busybox-1.2.1.orig/include/unarchive.h 
busybox-1.2.1/include/unarchive.h
! --- busybox-1.2.1.orig/include/unarchive.h    2006-07-01 00:42:10.000000000 
+0200
! +++ busybox-1.2.1/include/unarchive.h 2006-08-14 20:43:01.069368277 +0200
! @@ -101,6 +101,7 @@
   
   extern void data_align(archive_handle_t *archive_handle, const unsigned 
short boundary);
--- 86,92 ----
        }
        return newlist;
! --- busybox/include/unarchive.h       2006/09/03 12:31:59     16040
! +++ busybox/include/unarchive.h       2006/09/03 14:04:33     16041
! @@ -98,6 +98,7 @@
   
   extern void data_align(archive_handle_t *archive_handle, const unsigned 
short boundary);


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to