dd.h (50471) | dd.h (51208) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)dd.h 8.3 (Berkeley) 4/2/94 | 1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)dd.h 8.3 (Berkeley) 4/2/94 |
38 * $FreeBSD: head/bin/dd/dd.h 50471 1999-08-27 23:15:48Z peter $ | 38 * $FreeBSD: head/bin/dd/dd.h 51208 1999-09-12 16:51:53Z green $ |
39 */ 40 41/* Input/output stream state. */ 42typedef struct { 43 u_char *db; /* buffer address */ 44 u_char *dbp; /* current buffer I/O address */ | 39 */ 40 41/* Input/output stream state. */ 42typedef struct { 43 u_char *db; /* buffer address */ 44 u_char *dbp; /* current buffer I/O address */ |
45 int dbcnt; /* current buffer byte count */ 46 int dbrcnt; /* last read byte count */ 47 int dbsz; /* buffer size */ | 45 size_t dbcnt; /* current buffer byte count */ 46 size_t dbrcnt; /* last read byte count */ 47 size_t dbsz; /* buffer size */ |
48 49#define ISCHR 0x01 /* character device (warn on short) */ 50#define ISPIPE 0x02 /* pipe (not truncatable) */ 51#define ISTAPE 0x04 /* tape (not seekable) */ 52#define ISDISK 0x08 /* disk (valid to seek on) */ 53#define NOREAD 0x10 /* not readable */ 54 u_int flags; 55 56 char *name; /* name */ 57 int fd; /* file descriptor */ 58 off_t offset; /* # of blocks to skip */ 59 | 48 49#define ISCHR 0x01 /* character device (warn on short) */ 50#define ISPIPE 0x02 /* pipe (not truncatable) */ 51#define ISTAPE 0x04 /* tape (not seekable) */ 52#define ISDISK 0x08 /* disk (valid to seek on) */ 53#define NOREAD 0x10 /* not readable */ 54 u_int flags; 55 56 char *name; /* name */ 57 int fd; /* file descriptor */ 58 off_t offset; /* # of blocks to skip */ 59 |
60 quad_t f_stats; /* # of full blocks processed */ 61 quad_t p_stats; /* # of partial blocks processed */ 62 quad_t s_stats; /* # of odd swab blocks */ 63 quad_t t_stats; /* # of truncations */ | 60 u_quad_t f_stats; /* # of full blocks processed */ 61 u_quad_t p_stats; /* # of partial blocks processed */ 62 u_quad_t s_stats; /* # of odd swab blocks */ 63 u_quad_t t_stats; /* # of truncations */ |
64} IO; 65 66typedef struct { | 64} IO; 65 66typedef struct { |
67 quad_t in_full; /* # of full input blocks */ 68 quad_t in_part; /* # of partial input blocks */ 69 quad_t out_full; /* # of full output blocks */ 70 quad_t out_part; /* # of partial output blocks */ 71 quad_t trunc; /* # of truncated records */ 72 quad_t swab; /* # of odd-length swab blocks */ 73 quad_t bytes; /* # of bytes written */ | 67 u_quad_t in_full; /* # of full input blocks */ 68 u_quad_t in_part; /* # of partial input blocks */ 69 u_quad_t out_full; /* # of full output blocks */ 70 u_quad_t out_part; /* # of partial output blocks */ 71 u_quad_t trunc; /* # of truncated records */ 72 u_quad_t swab; /* # of odd-length swab blocks */ 73 u_quad_t bytes; /* # of bytes written */ |
74 double start; /* start time of dd */ 75} STAT; 76 77/* Flags (in ddflags). */ 78#define C_ASCII 0x00001 79#define C_BLOCK 0x00002 80#define C_BS 0x00004 81#define C_CBS 0x00008 --- 18 unchanged lines hidden --- | 74 double start; /* start time of dd */ 75} STAT; 76 77/* Flags (in ddflags). */ 78#define C_ASCII 0x00001 79#define C_BLOCK 0x00002 80#define C_BS 0x00004 81#define C_CBS 0x00008 --- 18 unchanged lines hidden --- |