diff options
| author | Brian Feldman <green@FreeBSD.org> | 1999-09-12 18:56:12 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 1999-09-12 18:56:12 +0000 |
| commit | 32952d4b37e2af9ee818481aff41144e05fa74ae (patch) | |
| tree | a33c86a5cfefd8e595bc83bcd0459cf689d3f7df /bin | |
| parent | 49c684571aa50d2b313ae39b769f37d30dd03baa (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/dd/dd.c | 4 | ||||
| -rw-r--r-- | bin/dd/dd.h | 2 | ||||
| -rw-r--r-- | bin/dd/position.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 617cd510e2cf5..ebfa792f6e066 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -222,8 +222,8 @@ getfdtype(io) } else { if (type & D_TAPE) io->flags |= ISTAPE; - else if (type & D_DISK) - io->flags |= ISDISK; + else if (type & (D_DISK | D_MEM)) + io->flags |= ISSEEK; if (S_ISCHR(sb.st_mode) && (type & D_TAPE) == 0) io->flags |= ISCHR; } diff --git a/bin/dd/dd.h b/bin/dd/dd.h index f671baabb8769..4e2419b962c63 100644 --- a/bin/dd/dd.h +++ b/bin/dd/dd.h @@ -49,7 +49,7 @@ typedef struct { #define ISCHR 0x01 /* character device (warn on short) */ #define ISPIPE 0x02 /* pipe (not truncatable) */ #define ISTAPE 0x04 /* tape (not seekable) */ -#define ISDISK 0x08 /* disk (valid to seek on) */ +#define ISSEEK 0x08 /* valid to seek on */ #define NOREAD 0x10 /* not readable */ u_int flags; diff --git a/bin/dd/position.c b/bin/dd/position.c index 6c0f6849f0f89..09b69a88a1225 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -68,7 +68,7 @@ pos_in() size_t bcnt; /* If not a character, pipe or tape device, try to seek on it. */ - if (!(in.flags & (ISCHR|ISPIPE|ISTAPE)) || in.flags & ISDISK) { + if (!(in.flags & (ISCHR|ISPIPE|ISTAPE)) || in.flags & ISSEEK) { errno = 0; if (lseek(in.fd, in.offset * in.dbsz, SEEK_CUR) == -1 && errno != 0) @@ -126,7 +126,7 @@ pos_out() ssize_t n; /* If not a character, pipe or tape device, try to seek on it. */ - if (!(out.flags & (ISCHR|ISPIPE|ISTAPE)) || out.flags & ISDISK) { + if (!(out.flags & (ISCHR|ISPIPE|ISTAPE)) || out.flags & ISSEEK) { errno = 0; if (lseek(out.fd, out.offset * out.dbsz, SEEK_SET) == -1 && errno != 0) |
