Date: Sat, 11 Aug 2018 16:12:24 +0000 (UTC) From: Alexander Leidinger <netchild@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337630 - head/sbin/restore Message-ID: <201808111612.w7BGCOs9014494@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: netchild Date: Sat Aug 11 16:12:23 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 Modified: head/sbin/restore/tape.c Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Sat Aug 11 16:06:32 2018 (r337629) +++ head/sbin/restore/tape.c Sat Aug 11 16:12:23 2018 (r337630) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808111612.w7BGCOs9014494>