Bug 214908 - /usr/sbin/fstyp is not able to detect EXFAT filesystem
Summary: /usr/sbin/fstyp is not able to detect EXFAT filesystem
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 16:07 UTC by Slawomir Wojciech Wojtczak
Modified: 2017-01-13 04:05 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2016-11-28 16:07:01 UTC
Its quite easy to detect EXFAT filesystem:

% dd < /dev/da0s1 count=1 2> /dev/null | strings | head -1
EXFAT   

... but /usr/sbin/fstyp is not able to do that:

% /usr/sbin/fstyp /dev/da0s1
fstyp: /dev/da0s1: filesystem not recognized

Regards,
vermaden
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-01-13 02:13:09 UTC
A commit references this bug:

Author: cem
Date: Fri Jan 13 02:12:59 UTC 2017
New revision: 312003
URL: https://svnweb.freebsd.org/changeset/base/312003

Log:
  fstyp(8): Detect exFAT filesystems

  Simply detect the exFAT filesystem name in the Volume Boot Record
  (superblock).

  PR:		214908
  Reported by:	<vermaden at interia.pl>

Changes:
  head/usr.sbin/fstyp/Makefile
  head/usr.sbin/fstyp/exfat.c
  head/usr.sbin/fstyp/fstyp.8
  head/usr.sbin/fstyp/fstyp.c
  head/usr.sbin/fstyp/fstyp.h
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-13 04:02:46 UTC
A commit references this bug:

Author: ngie
Date: Fri Jan 13 04:02:09 UTC 2017
New revision: 312010
URL: https://svnweb.freebsd.org/changeset/base/312010

Log:
  Add testcase for exFAT that currently fails

  Disk image obtained from:
  http://www.cfreds.nist.gov/dfr-images/dfr-01-xfat.dd.bz2 -- was ripped off the
  first GPT partition and verified to be a FAT-like partition with file(1)/hexdump.

  This testcase currently fails

  PR:		214908
  Sponsored by:	Dell EMC Isilon

Changes:
  head/usr.sbin/fstyp/tests/Makefile
  head/usr.sbin/fstyp/tests/dfr-01-xfat.img.bz2
  head/usr.sbin/fstyp/tests/fstyp_test.sh
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-13 04:05:51 UTC
A commit references this bug:

Author: ngie
Date: Fri Jan 13 04:04:48 UTC 2017
New revision: 312011
URL: https://svnweb.freebsd.org/changeset/base/312011

Log:
  Use dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latter
  case was the full disk image from the website, which was never
  checked in to svn)

  Regardless, the testcase still fails

  PR:		214908
  Sponsored by:	Dell EMC Isilon

Changes:
  head/usr.sbin/fstyp/tests/fstyp_test.sh