summaryrefslogtreecommitdiff
path: root/usr.sbin/fstyp
Commit message (Collapse)AuthorAgeFilesLines
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-283-3/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-252-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* usr.sbin/fstyp: Fix incorrect pfs_type test in ondisk inodePedro F. Giffuni2020-08-201-1/+1
| | | | | | | | | | "ipdata.meta.pfs_type & HAMMER2_PFSTYPE_SUPROOT" happened to have the same result (except HAMMER2_PFSTYPE_DUMMY could also match). Obtained from: Dragonfly (git 29e6489bbd4f8e237c9c17b300ac8b711f36770) Notes: svn path=/head/; revision=364417
* Revert r362390, those tests are fixed by r362418Li-Wen Hsu2020-06-231-9/+0
| | | | | | | | PR: 247425 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=362551
* Skip ufs related tests in fstyp(8) and makefs(8) temporarilyLi-Wen Hsu2020-06-191-0/+9
| | | | | | | | | | They are failing after r362358 and r362359. PR: 247425 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=362390
* Move the pointers stored in the superblock into a separateKirk McKusick2020-06-191-0/+3
| | | | | | | | | | | | | | | | | fs_summary_info structure. This change was originally done by the CheriBSD project as they need larger pointers that do not fit in the existing superblock. This cleanup of the superblock eases the task of the commit that immediately follows this one. Suggested by: brooks Reviewed by: kib PR: 246983 Sponsored by: Netflix Notes: svn path=/head/; revision=362358
* fstyp: sync HAMMER1/2 detection support with DragonFly BSD.Pedro F. Giffuni2020-02-062-60/+210
| | | | | | | | Submitted by: Tomohiro Kusumi PR: 243929 Notes: svn path=/head/; revision=357631
* fstyp hammer2: remove dead codeEric van Gyzen2020-01-131-5/+0
| | | | | | | | | | | | | best_i will always be >= 0, so remove code to test otherwise. Reported by: Coverity CID: 1412244 MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23159 Notes: svn path=/head/; revision=356709
* fstyp hammer: use strlcpyEric van Gyzen2020-01-131-2/+2
| | | | | | | | | | | | | | Use strlcpy to guarantee NUL termination. Due to this, there is no need for strncmp; simply use strcmp. Reported by: Coverity CID: 1412242 MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23159 Notes: svn path=/head/; revision=356708
* Make this compile under external gcc toolchain if WITH_ICONV isn't defined.Adrian Chadd2019-12-291-1/+4
| | | | | | | This quietens a bunch of unused variable warnings that are treated as errors. Notes: svn path=/head/; revision=356169
* sbin/fstyp: recgonize Dragonfly's hammer and hammer2.Pedro F. Giffuni2019-12-248-2/+2842
| | | | | | | | | | | | This is based on DragonFly's implementation from about 2019-09-13. It only contains the basic code and header information to identify the disks. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D13369 Notes: svn path=/head/; revision=356060
* fstyp(8): Fix WITHOUT_ICONV buildConrad Meyer2019-12-236-2/+20
| | | | | | | Reported by: olivier Notes: svn path=/head/; revision=356041
* fstyp(8): Detect APFS containersConrad Meyer2019-12-234-1/+111
| | | | | | | | APFS NXSBs are more like slices (or zvols?) than individual filesystem, but go ahead and detect them nicely as well. Notes: svn path=/head/; revision=356034
* fstyp(8): Detect HFS+ / HFSX volumesConrad Meyer2019-12-234-1/+129
| | | | Notes: svn path=/head/; revision=356033
* fstyp(8): Use iconv(3) to convert NTFS vol labels correctlyConrad Meyer2019-12-233-24/+50
| | | | | | | | Rather than hackily extracting only the ASCII subset of UTF-16LE, go ahead and convert the label to the user's locale correctly. Notes: svn path=/head/; revision=356032
* fstyp(8): Show exFAT volume labels with -l flagConrad Meyer2019-12-224-12/+347
| | | | | | | | | | | | | | | | | | | | | exfat is fundamentally the same design as fat32. The superblock differs marginally, and there are some additional optional features irrelevant to fstype(8); the structure of dirents has changed slightly to enable, among other things, larger files; the directory entries are no longer DOS 8.3 ASCII or local 8-bit encoding, but instead explicitly UCS-2-LE. (As a result, this change uses iconv to convert a found exfat volume label to the user's locale.) Locating the volume label is identical to FAT32: locate the root directory and walk through dirents until you find a volume label. Like FAT32, follow the FAT chain between root directory clusters as necessary. PR: 242225 Reported by: Victor Sudakov <vas AT sibptus.ru> Notes: svn path=/head/; revision=355996
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-4/+3
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+11
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* Drop "All rights reserved" from the files I ownAlan Somers2019-03-111-1/+2
| | | | | | | | | Also, add SPDX tags where needed. MFC after: 2 weeks Notes: svn path=/head/; revision=345034
* Normally when an attempt is made to mount a UFS/FFS filesystem whoseKirk McKusick2018-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | superblock has a check-hash error, an error message noting the superblock check-hash failure is printed and the mount fails. The administrator then runs fsck to repair the filesystem and when successful, the filesystem can once again be mounted. This approach fails if the filesystem in question is a root filesystem from which you are trying to boot. Here, the loader fails when trying to access the filesystem to get the kernel to boot. So it is necessary to allow the loader to ignore the superblock check-hash error and make a best effort to read the kernel. The filesystem may be suffiently corrupted that the read attempt fails, but there is no harm in trying since the loader makes no attempt to write to the filesystem. Once the kernel is loaded and starts to run, it attempts to mount its root filesystem. Once again, failure means that it breaks to its prompt to ask where to get its root filesystem. Unless you have an alternate root filesystem, you are stuck. Since the root filesystem is initially mounted read-only, it is safe to make an attempt to mount the root filesystem with the failed superblock check-hash. Thus, when asked to mount a root filesystem with a failed superblock check-hash, the kernel prints a warning message that the root filesystem superblock check-hash needs repair, but notes that it is ignoring the error and proceeding. It does mark the filesystem as needing an fsck which prevents it from being enabled for writing until fsck has been run on it. The net effect is that the reboot fails to single user, but at least at that point the administrator has the tools at hand to fix the problem. Reported by: Rick Macklem (rmacklem@) Discussed with: Warner Losh (imp@) Sponsored by: Netflix Notes: svn path=/head/; revision=341608
* Do not blindly include illumos kernel headers instead of user-space.Alexander Motin2018-08-021-1/+0
| | | | | | | | It is not needed now, and I doubt it much helped at all, creating more confusions then good. Notes: svn path=/head/; revision=337160
* Use capsicum helpers in fstype and ctld.Mariusz Zaborski2018-07-151-2/+2
| | | | | | | Reviewed by: trasz Notes: svn path=/head/; revision=336307
* Remove "All rights reserved" from my files.Xin LI2018-05-101-1/+0
| | | | | | | | | See r333391 for the rationale. MFC after: 1 week Notes: svn path=/head/; revision=333449
* Refactoring of reading and writing of the UFS/FFS superblock.Kirk McKusick2018-01-262-59/+14
| | | | | | | | | | | | | | | Specifically reading is done if ffs_sbget() and writing is done in ffs_sbput(). These functions are exported to libufs via the sbget() and sbput() functions which then used in the various filesystem utilities. This work is in preparation for adding subperblock check hashes. No functional change intended. Reviewed by: kib Notes: svn path=/head/; revision=328426
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-2/+2
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* fstyp: move sys/ include path after zfs include pathsAndriy Gapon2017-06-201-2/+2
| | | | | | | | | | | | | | | The reason is that FreeBSD refcount.h shadows ZFS refcount.h and that will lead to a build error after a planned import of the ARC buf data scatter-ization. It's possible that some day we will have an opposite problem where a ZFS header would shadow an essential FreeBSD header. So, we need to think about a better long term solution. Discussed with: allanjude MFC after: 17 days Notes: svn path=/head/; revision=320152
* Make fstyp(8) recognize exFAT even without the -u option.Edward Tomasz Napierala2017-04-262-4/+4
| | | | | | | | | | While it's not directly mountable with mount(8), it's something that's mountable - differently from GELI or zpools. MFC after: 2 weeks Notes: svn path=/head/; revision=317459
* Improve formatting.Edward Tomasz Napierala2017-03-191-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=315564
* Fix harmless mismerge from r286964Alan Somers2017-03-091-1/+0
| | | | | | | | MFC after: 3 days Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=314963
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-1/+1
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Use SRCTOP-relative paths to other directories instead of .CURDIR-relative onesEnji Cooper2017-03-011-9/+9
| | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314452
* Fix broken fstyp exfat testcaseConrad Meyer2017-01-141-1/+1
| | | | | | | | | Introduced in r312010. It helps to read the documentation before trying to test something. Notes: svn path=/head/; revision=312104
* fstyp.8: Move initial exFAT blurb to the -u sectionConrad Meyer2017-01-131-4/+5
| | | | | | | | | Didn't notice the second list in r312003. Reported by: trasz@ Notes: svn path=/head/; revision=312078
* Use dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latterEnji Cooper2017-01-131-1/+1
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=312011
* Add testcase for exFAT that currently failsEnji Cooper2017-01-133-0/+11
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=312010
* Add license preamble for r286964; credit to asomersEnji Cooper2017-01-131-3/+29
| | | | | | | | | | While here, clean up trailing whitespace MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312009
* fstyp(8): Detect exFAT filesystemsConrad Meyer2017-01-135-3/+84
| | | | | | | | | | | Simply detect the exFAT filesystem name in the Volume Boot Record (superblock). PR: 214908 Reported by: <vermaden at interia.pl> Notes: svn path=/head/; revision=312003
* fstyp tests comes with pre-created EL filesystems,Ruslan Bukin2016-10-181-1/+2
| | | | | | | | | | | | but fstyp cannot detect EL filesystem on EB machine, so exclude test files from distribution and skip the test. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=307559
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* MFHGlen Barber2016-04-161-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-141-1/+1
| | | | | | | | | | | | | | | | The malloc will return a pointer to the allocated memory if successful, otherwise a NULL pointer is returned. Notes: svn path=/head/; revision=297964
* | MFHGlen Barber2016-03-101-0/+11
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | MFHGlen Barber2016-03-021-2/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * Fix .Xr - autofs(5) is section 5, not 8.Edward Tomasz Napierala2016-02-281-2/+2
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296157
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Eliminate unneeded includes.Xin LI2015-12-282-3/+0
| | | | | | | | Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D4716 Notes: svn path=/head/; revision=292829
* Fix includes in usr.sbin/fstyp/zfs.cAllan Jude2015-12-262-2/+5
| | | | | | | | | | Approved by: bapt (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4710 Notes: svn path=/head/; revision=292757