summaryrefslogtreecommitdiffstats
path: root/sbin/restore
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-02-25 02:25:02 +0000
committerimp <imp@FreeBSD.org>1997-02-25 02:25:02 +0000
commit17cf792b06fe96ed8f6c7acf449d6b8951d38cda (patch)
tree7477c61b88da1d20574becad7d89037683a838cc /sbin/restore
parent28e9c6477d7a6f4228e378162b2c4ee5a2315e94 (diff)
downloadFreeBSD-src-17cf792b06fe96ed8f6c7acf449d6b8951d38cda.zip
FreeBSD-src-17cf792b06fe96ed8f6c7acf449d6b8951d38cda.tar.gz
Fix a minor problem with restore from tapes from big endian machines.
This finishes the closing of PR2446 which J"org Wunsch pointed out to me after I closed it. Submitted by: Tor Egge <Tor.Egge@idt.ntnu.no>
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/tape.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 51a1ac5..79fba3f 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1022,8 +1022,11 @@ gethead(buf)
}
if (checksum((int *)buf) == FAIL)
return (FAIL);
- if (Bcvt)
+ if (Bcvt) {
swabst((u_char *)"8l4s31l", (u_char *)buf);
+ swabst((u_char *)"l",(u_char *) &buf->c_level);
+ swabst((u_char *)"2l",(u_char *) &buf->c_flags);
+ }
goto good;
}
readtape((char *)(&u_ospcl.s_ospcl));
OpenPOWER on IntegriCloud