English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Diff of /branches/freewrt_1_0/tools/paxmirabilis/src/tar.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2714 by wbx, Thu Sep 28 10:42:55 2006 UTC revision 2715 by tg, Tue Jun 5 14:52:44 2007 UTC
# Line 1  Line 1 
1  /**     $MirOS: src/bin/pax/tar.c,v 1.3 2006/06/23 23:03:57 tg Exp $ */  /**     $MirOS: src/bin/pax/tar.c,v 1.4 2007/02/17 04:52:41 tg Exp $ */
2  /*      $OpenBSD: tar.c,v 1.41 2006/03/04 20:24:55 otto Exp $   */  /*      $OpenBSD: tar.c,v 1.41 2006/03/04 20:24:55 otto Exp $   */
3  /*      $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $      */  /*      $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $      */
4    
# Line 36  Line 36 
36   * SUCH DAMAGE.   * SUCH DAMAGE.
37   */   */
38    
39  #ifndef lint  #include <sys/param.h>
 #if 0  
 static const char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";  
 #else  
 static const char rcsid[] = "$OpenBSD: tar.c,v 1.41 2006/03/04 20:24:55 otto Exp $";  
 #endif  
 #endif /* not lint */  
   
 #include <sys/types.h>  
40  #include <sys/time.h>  #include <sys/time.h>
41  #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/param.h>  
42  #include <string.h>  #include <string.h>
43  #include <stdio.h>  #include <stdio.h>
44  #include <unistd.h>  #include <unistd.h>
# Line 57  static const char rcsid[] = "$OpenBSD: t Line 48  static const char rcsid[] = "$OpenBSD: t
48  #include "tar.h"  #include "tar.h"
49  #include "options.h"  #include "options.h"
50    
51    __SCCSID("@(#)tar.c     8.2 (Berkeley) 4/18/94");
52    __RCSID("$MirOS: src/bin/pax/tar.c,v 1.4 2007/02/17 04:52:41 tg Exp $");
53    
54  /*  /*
55   * Routines for reading, writing and header identify of various versions of tar   * Routines for reading, writing and header identify of various versions of tar
56   */   */
# Line 122  tar_endrd(void) Line 116  tar_endrd(void)
116   */   */
117    
118  int  int
119  tar_trail(ARCHD *ignore, char *buf, int in_resync, int *cnt)  tar_trail(ARCHD *ignore __attribute__((unused)), char *buf, int in_resync,
120        int *cnt)
121  {  {
122          int i;          int i;
123    
# Line 557  tar_wr(ARCHD *arcn) Line 552  tar_wr(ARCHD *arcn)
552          case PAX_SLK:          case PAX_SLK:
553          case PAX_HLK:          case PAX_HLK:
554          case PAX_HRG:          case PAX_HRG:
555                  if (arcn->ln_nlen > sizeof(hd->linkname)) {                  if ((size_t)arcn->ln_nlen > sizeof(hd->linkname)) {
556                          paxwarn(1, "Link name too long for tar %s",                          paxwarn(1, "Link name too long for tar %s",
557                              arcn->ln_name);                              arcn->ln_name);
558                          return(1);                          return(1);
# Line 575  tar_wr(ARCHD *arcn) Line 570  tar_wr(ARCHD *arcn)
570          len = arcn->nlen;          len = arcn->nlen;
571          if (arcn->type == PAX_DIR)          if (arcn->type == PAX_DIR)
572                  ++len;                  ++len;
573          if (len > sizeof(hd->name)) {          if ((size_t)len > sizeof(hd->name)) {
574                  paxwarn(1, "File name too long for tar %s", arcn->name);                  paxwarn(1, "File name too long for tar %s", arcn->name);
575                  return(1);                  return(1);
576          }          }
# Line 935  ustar_wr(ARCHD *arcn) Line 930  ustar_wr(ARCHD *arcn)
930           * check the length of the linkname           * check the length of the linkname
931           */           */
932          if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||          if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
933              (arcn->type == PAX_HRG)) && (arcn->ln_nlen > sizeof(hd->linkname))){              (arcn->type == PAX_HRG)) &&
934                ((size_t)arcn->ln_nlen > sizeof(hd->linkname))) {
935                  paxwarn(1, "Link name too long for ustar %s", arcn->ln_name);                  paxwarn(1, "Link name too long for ustar %s", arcn->ln_name);
936                  return(1);                  return(1);
937          }          }

Legend:
Removed from v.2714  
changed lines
  Added in v.2715

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20