Bug 200059 - [patch] restore(8) re-enable the ability to read some byte swapped dumps
Summary: [patch] restore(8) re-enable the ability to read some byte swapped dumps
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexander Leidinger
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-09 00:50 UTC by Keith White
Modified: 2019-01-22 21:02 UTC (History)
3 users (show)

See Also:


Attachments
restore(8) patch to enable reading byte swapped NFS_MAGIC dumps (525 bytes, patch)
2015-05-09 00:50 UTC, Keith White
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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...