buf_subs.c (76019) | buf_subs.c (76351) |
---|---|
1/*- 2 * Copyright (c) 1992 Keith Muller. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Keith Muller of the University of California, San Diego. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; 41#endif 42static const char rcsid[] = | 1/*- 2 * Copyright (c) 1992 Keith Muller. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Keith Muller of the University of California, San Diego. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; 41#endif 42static const char rcsid[] = |
43 "$FreeBSD: head/bin/pax/buf_subs.c 76019 2001-04-26 09:22:28Z kris $"; | 43 "$FreeBSD: head/bin/pax/buf_subs.c 76351 2001-05-08 06:19:06Z kris $"; |
44#endif /* not lint */ 45 46#include <sys/types.h> 47#include <sys/stat.h> 48#include <errno.h> 49#include <unistd.h> | 44#endif /* not lint */ 45 46#include <sys/types.h> 47#include <sys/stat.h> 48#include <errno.h> 49#include <unistd.h> |
50#include <stdio.h> |
|
50#include <stdlib.h> 51#include <string.h> 52#include "pax.h" 53#include "extern.h" 54 55/* 56 * routines which implement archive and file buffering 57 */ --- 48 unchanged lines hidden (view full) --- 106 wrblksz, MAXBLK); 107 return(-1); 108 } 109 if (wrblksz % BLKMULT) { 110 paxwarn(1, "Write block size of %d is not a %d byte multiple", 111 wrblksz, BLKMULT); 112 return(-1); 113 } | 51#include <stdlib.h> 52#include <string.h> 53#include "pax.h" 54#include "extern.h" 55 56/* 57 * routines which implement archive and file buffering 58 */ --- 48 unchanged lines hidden (view full) --- 107 wrblksz, MAXBLK); 108 return(-1); 109 } 110 if (wrblksz % BLKMULT) { 111 paxwarn(1, "Write block size of %d is not a %d byte multiple", 112 wrblksz, BLKMULT); 113 return(-1); 114 } |
115 if (wrblksz > MAXBLK_POSIX) { 116 paxwarn(0, "Write block size of %d larger than POSIX max %d, archive may not be portable", 117 wrblksz, MAXBLK_POSIX); 118 return(-1); 119 } |
|
114 115 /* 116 * we only allow wrblksz to be used with all archive operations 117 */ 118 blksz = rdblksz = wrblksz; 119 if ((ar_open(arcname) < 0) && (ar_next() < 0)) 120 return(-1); 121 wrcnt = 0; --- 962 unchanged lines hidden --- | 120 121 /* 122 * we only allow wrblksz to be used with all archive operations 123 */ 124 blksz = rdblksz = wrblksz; 125 if ((ar_open(arcname) < 0) && (ar_next() < 0)) 126 return(-1); 127 wrcnt = 0; --- 962 unchanged lines hidden --- |