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/tables.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/tables.c,v 1.6 2006/06/24 00:21:54 tg Exp $ */  /**     $MirOS: src/bin/pax/tables.c,v 1.7 2007/02/17 04:52:41 tg Exp $ */
2  /*      $OpenBSD: tables.c,v 1.23 2005/04/21 21:47:18 beck Exp $        */  /*      $OpenBSD: tables.c,v 1.23 2005/04/21 21:47:18 beck Exp $        */
3  /*      $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $   */  /*      $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $   */
4    
# Line 50  Line 50 
50  #include "extern.h"  #include "extern.h"
51    
52  __SCCSID("@(#)tables.c  8.1 (Berkeley) 5/31/93");  __SCCSID("@(#)tables.c  8.1 (Berkeley) 5/31/93");
53  __RCSID("$MirOS: src/bin/pax/tables.c,v 1.6 2006/06/24 00:21:54 tg Exp $");  __RCSID("$MirOS: src/bin/pax/tables.c,v 1.7 2007/02/17 04:52:41 tg Exp $");
54    
55  /*  /*
56   * Routines for controlling the contents of all the different databases pax   * Routines for controlling the contents of all the different databases pax
# Line 169  chk_lnk(ARCHD *arcn) Line 169  chk_lnk(ARCHD *arcn)
169                          arcn->ln_nlen = strlcpy(arcn->ln_name, pt->name,                          arcn->ln_nlen = strlcpy(arcn->ln_name, pt->name,
170                                  sizeof(arcn->ln_name));                                  sizeof(arcn->ln_name));
171                          /* XXX truncate? */                          /* XXX truncate? */
172                          if (arcn->nlen >= sizeof(arcn->name))                          if ((size_t)arcn->nlen >= sizeof(arcn->name))
173                                  arcn->nlen = sizeof(arcn->name) - 1;                                  arcn->nlen = sizeof(arcn->name) - 1;
174                          if (arcn->type == PAX_REG)                          if (arcn->type == PAX_REG)
175                                  arcn->type = PAX_HRG;                                  arcn->type = PAX_HRG;
# Line 601  sub_name(char *oname, int *onamelen, siz Line 601  sub_name(char *oname, int *onamelen, siz
601                           * and return (we know that oname has enough space)                           * and return (we know that oname has enough space)
602                           */                           */
603                          *onamelen = strlcpy(oname, pt->nname, onamesize);                          *onamelen = strlcpy(oname, pt->nname, onamesize);
604                          if (*onamelen >= onamesize)                          if ((size_t)*onamelen >= onamesize)
605                                  *onamelen = onamesize - 1; /* XXX truncate? */                                  *onamelen = onamesize - 1; /* XXX truncate? */
606                          return;                          return;
607                  }                  }
# Line 1127  add_dir(char *name, struct stat *psb, in Line 1127  add_dir(char *name, struct stat *psb, in
1127          if (dirp == NULL)          if (dirp == NULL)
1128                  return;                  return;
1129    
1130          if (dircnt == dirsize) {          if (dircnt == (long)dirsize) {
1131                  dblk = realloc(dirp, 2 * dirsize * sizeof(DIRDATA));                  dblk = realloc(dirp, 2 * dirsize * sizeof(DIRDATA));
1132                  if (dblk == NULL) {                  if (dblk == NULL) {
1133                          paxwarn(1, "Unable to store mode and times for created"                          paxwarn(1, "Unable to store mode and times for created"
# Line 1205  proc_dir(void) Line 1205  proc_dir(void)
1205   */   */
1206    
1207  u_int  u_int
1208  st_hash(char *name, int len, int tabsz)  st_hash(const char *name, int len, int tabsz)
1209  {  {
1210          char *pt;          const char *pt;
1211          char *dest;          char *dest;
1212          char *end;          const char *end;
1213          int i;          int i;
1214          u_int key = 0;          u_int key = 0;
1215          int steps;          int steps;

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

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