aboutsummaryrefslogtreecommitdiff
path: root/sbin/restore
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2018-08-11 16:12:23 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2018-08-11 16:12:23 +0000
commitbce2f1d7b9067b8db97942e6ae26fd681b698e9b (patch)
tree7e612e02bf5465f744ebc8526f17c874b4af8fdc /sbin/restore
parentedb1df35b08f85ed6c082d924ca078e43854071c (diff)
downloadsrc-bce2f1d7b9067b8db97942e6ae26fd681b698e9b.tar.gz
src-bce2f1d7b9067b8db97942e6ae26fd681b698e9b.zip
Re-enable reading byte swapped NFS_MAGIC dumps.
Fix bug introduced in r98542: previously to this revision the byte-swapped value was compared at this place. The current check is in a conditional section where the non-byte-swapped value was already checked to be not the value which is checked again. As byte-swapping is activated afterwards, it only makes sense if the byte-swapped value is checked. Submitted by: Keith White <kwhite@site.uottawa.ca> PR: 200059 MFC after: 1 month Sponsored by: Essen Hackathon
Notes
Notes: svn path=/head/; revision=337630
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/tape.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 04cda7ebd636..16dba12e673c 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1314,8 +1314,8 @@ gethead(struct s_spcl *buf)
return (FAIL);
}
if (swabl(buf->c_magic) != FS_UFS2_MAGIC &&
- buf->c_magic != NFS_MAGIC) {
- if (buf->c_magic == OFS_MAGIC) {
+ swabl(buf->c_magic) != NFS_MAGIC) {
+ if (swabl(buf->c_magic) == OFS_MAGIC) {
fprintf(stderr,
"Format of dump tape is too old. Must use\n");
fprintf(stderr,