Bug 200059

Summary: [patch] restore(8) re-enable the ability to read some byte swapped dumps
Product: Base System Reporter: Keith White <ksw.childe>
Component: binAssignee: Alexander Leidinger <netchild>
Status: Closed FIXED    
Severity: Affects Only Me CC: eadler, gonzo, netchild
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
restore(8) patch to enable reading byte swapped NFS_MAGIC dumps none

Description Keith White 2015-05-09 00:50:07 UTC
Created attachment 156522 [details]
restore(8) patch to enable reading byte swapped NFS_MAGIC dumps

I needed to restore some *old* dumps made on a Solaris sparc machine to a FreeBSD amd64 machine.  The 4.11 restore worked with these dumps, the current version does not.

The attached patch restores the byte-swap functionality for NFS_MAGIC dumps.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-03 08:48:31 UTC
Doesn't this break restore on other use cases or this just fixing the "too old" check?
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-08-11 16:12:57 UTC
A commit references this bug:

Author: netchild
Date: Sat Aug 11 16:12:24 UTC 2018
New revision: 337630
URL: https://svnweb.freebsd.org/changeset/base/337630

Log:
  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

Changes:
  head/sbin/restore/tape.c
Comment 3 Alexander Leidinger freebsd_committer freebsd_triage 2018-08-11 16:13:32 UTC
Take the PR.
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 17:52:23 UTC
Alexander, can this PR be closed or is there work pending?

Thanks
Comment 5 Alexander Leidinger freebsd_committer freebsd_triage 2019-01-22 21:01:54 UTC
(In reply to Oleksandr Tymoshenko from comment #4)
My intend was to MFC it. Now that 12.0 is out the door, we have a release with the fix available. As this seems to be a not so common case (no people with "I have the same problem and the patch fixes it"), I think we can close it...