| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
- Report overly long OEM string as too long, not just "bad".
- Use warn instead of warnx for open or ftruncate failure to report the
error string.
Reviewed by: se
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53649
|
| |
|
|
| |
This reverts commit 024f676b399fc8acee7288c543d32c581328833c.
|
| |
|
|
|
|
|
|
|
|
|
| |
Add support for the creation of exFAT file systems, if invoked as
newfs_exfat.
Reviewed by: olce
Approved by: olce, mckusick
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D48727
|
| |
|
|
|
|
|
|
|
|
|
|
| |
+ add `(FAT)` to all descriptions to enable `apropos fat`
+ xref all msdosfs(4) utilities in base to msdosfs(4)
+ xref msdosfs(4) to all msdosfs(4) utilities
+ remove unrelated fsck_ffs(8) from fsck_msdos(8)
MFC after: 3 days
Reviewed by: mhorne
Approved by: mhorne (mentor)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1557
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tracking newer versions of C (and C++) permits assuming newer language
features in the base system. Some C11 extensions are already used in
the base system but implemented on top of GNU C extensions such as
_Alignas and _Static_assert. In some cases the fallback versions in
cdefs.h are more limited than the native C11 extensions.
Even though C11 is the next major version of C, C17 is chosen instead
since C17 does not add new features to C but merely fixes defects in
C11. It is also well supported by a wide range of clang (7.0.0+) and
GCC (8.1+) versions.
Along with changing the default, this change also removes explicit
requests for c11 via the CSTD variable in various Makefiles.
Libraries and binaries for ZFS continue to use c99.
PR: 284039 (exp-run)
Reviewed by: imp, arichardson, emaste
Differential Revision: https://reviews.freebsd.org/D43237
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A previous commit aligned the start of the data area to a multiple of
the VM page size, in order to prevent extra buffers to be allocated
(which failed for 64 KB cluster size without this alignment).
Since a dependency on PAGE_SIZE caused compatibility issues, the
alignment was made conditional on this macro being defined, in the
previous commit. This lead to different behavior of this program
when built on FreeBSD vs. Linux (which does not define PAGE_SIZE).
This commit removes any use of PAGE_SIZE and instead always aligns
the start of the data area to a multiple of the cluster size.
The -A option is now implied, unless overridden by a specific number
of reserved sectors with the -r option.
Approved by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45436
|
| |
|
|
|
|
|
|
| |
Disable data area alignment if the build environment does not define
PAGE_SIZE (e.g., when building on Linux or macOS).
Reported by: jrtc27
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without alignment, the data area will not be aligned with the buffer
cache, leading to overhead, higher write multiplication on SSD devices
and issues with very large cluster sizes (see PR 277414).
The -A option used to align the start of the root directory to a
multiple of the cluster size, which happens to align the start of the
data area with a buffer page boundary in case of large clusters and
the default number of directory entries (512 entries requiring 16 KB
for FAT12 or FAT16, FAT32 puts the root directory into the data area).
This commit aligns the start of the data area with the page size, if
neither -A nor -r is used. It changes -A to align the start of the
data area (end of the root directory) to a multiple of the cluster
size, since this is the alignment that prevents write multiplication
due to clusters crossing erase block boundaries of a SSD device.
The -r option is unchanged and will prevent any automatic alignment
from occuring.
Approved by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45436
|
| |
|
|
|
|
|
|
|
|
| |
The usual use case in 2024 for newfs_msdosfs is creating filesystems on SD cards
for older hardware. In most tutorials, they call the cluster size "allocation
size". Therefore, add a small note next to cluster size that it is also called
allocation size, and add an example for how to do this.
Reviewed by: jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1045
|
| |
|
|
|
|
|
| |
These do not use __FBSDID but instead use bare char arrays.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957
|
| |
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
|
|
|
|
| |
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| | |
|
| |
|
|
|
| |
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
| |
NetBSD has an ATF test for newfs_msdos. Connect it to the build.
Adapt it for FreeBSD. This would have caught the bug fixed by my
previous commit.
Reviewed by: delphij, emaste
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D34116
|
| |
|
|
|
|
|
|
|
|
| |
The type of the kern.maxphys sysctl OID is now ulong. Change the
local variable type to match.
Reviewed by: delphij, emaste
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D34116
|
| |
|
|
|
|
|
|
|
|
|
| |
The macOS assert.h header does not define static_assert when compiling in
C99 mode. To fix this compile with -std=c11.
Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D25928
Notes:
svn path=/head/; revision=364765
|
| |
|
|
|
|
|
|
|
|
| |
Suggested by: imp
Reviewed by: imp, cem (earlier version), emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25563
Notes:
svn path=/head/; revision=362937
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sectors.
On my SanDisk Cruzer Blade 16GB USB stick this made formatting much faster:
x before
+ after
+--------------------------------------------------------------------------+
|+ |
|+ x |
|+ x x|
|A MA||
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 3 15.89 16.38 16 16.09 0.2570992
+ 3 0.32 0.37 0.35 0.34666667 0.025166115
Difference at 95.0% confidence
-15.7433 +/- 0.414029
-97.8455% +/- 0.25668%
(Student's t, pooled s = 0.182665)
Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24508
Notes:
svn path=/head/; revision=362936
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
if (o.align) {
^
sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here
if (argc < 1 || argc > 2)
^
MFC after: 3 days
Notes:
svn path=/projects/clang1000-import/; revision=357225
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to do so we need to install the msdosfs headers to the bootstrap
sysroot and avoid includes of kernel headers that may not exist on every
host (e.g. sys/lockmgr.h). This change should allow bootstrapping of makefs
on FreeBSD 11+ as well as Linux and macOS.
We also have to avoid using the IO_SYNC macro since that may not be
available. In makefs it is only used to switch between calling
bwrite() and bdwrite() which both call the same function. Therefore we
can simply always call bwrite().
For our CheriBSD builds we always bootstrap makefs by setting
LOCAL_XTOOL_DIRS='lib/libnetbsd usr.sbin/makefs' and use the makefs binary
from the build tree to create a bootable disk image.
Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D23201
Notes:
svn path=/head/; revision=357169
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Do not unnecessarily strdup().
- Check return value of getdiskinfo(), if it failed, bail out.
Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D22729
Notes:
svn path=/head/; revision=355513
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=355318
|
| |
|
|
|
|
|
|
|
| |
PR: 242314
Submitted by: Guy Yur <guyyur gmail com>
MFC after: 2 weeks
Notes:
svn path=/head/; revision=355317
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the mkfs_msdos function (from newfs_msdos) emitted warnings
in the case that an image size is specified and the target is not a
file, or no size is specified and the target is not a character device.
The latter warning (not a character device) doesn't make sense when this
code is used in makefs, regardless of whether an image size is specified
or not.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=354537
|
| |
|
|
|
|
|
|
|
|
|
|
| |
FSI_Nxt_Free instead of providing a wrong value.
With this change, fsck_msdosfs would no longer complain about invalid
FSInfo information.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=351382
|
| |
|
|
|
|
|
|
|
|
|
| |
Obtained from: Android
Obtained from: https://android.googlesource.com/platform/system/core/+/052f27562154d175267999106bd6bf18fc8c363e
Obtained from: https://android.googlesource.com/platform/system/core/+/8218b6aae9cd4a19fa074a8a8203fe9275b35447
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D15672
Notes:
svn path=/head/; revision=335189
|
| |
|
|
|
|
|
| |
CID: 1384018, 1384017
Notes:
svn path=/head/; revision=327570
|
| |
|
|
|
|
|
| |
CID: 978234, 978236
Notes:
svn path=/head/; revision=327275
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
No functional change intended.
Notes:
svn path=/head/; revision=326276
|
| |
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
| |
|
|
|
|
|
|
|
|
| |
Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Reported by: Daniel Shahaf <danielsh apache org>
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=318366
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes some whitespace and minor bug fixes relative to NetBSD,
which will be submitted upstream at the conclusion of the makefs
msdos update.
NetBSD revs:
mkfs_msdos.c 1.11
mkfs_msdos.h 1.4
newfs_msdos.8 1.22
newfs_msdos.c 1.44
Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Reviewed by: emaste
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=318355
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the hidden and huge sectors is less than or equal MAXU16. When
formatting in Windows bpbSectors is still used for 63488 sectors and
2048 hidden (sum > MAXU16). The hidden sectors count is the number of
sectors before the FAT16 Boot Record so it shouldn't affect the sector
count. Attached patch (huge_sec_conversion.patch) to only check for
bpb.bpbHugeSectors <= MAXU16 when converting to bpbSectors.
Submitted by: Guy Yur
PR: 183234
Notes:
svn path=/head/; revision=305075
|
| |
|
|
|
|
|
|
|
|
| |
boot partition. NetBSD removed it in 1.10 in their repo some time ago.
Submitted by: Guy Yur
PR: 183234
Notes:
svn path=/head/; revision=305074
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks.
Notes:
svn path=/head/; revision=298250
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=295450
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the function
Differential Revision: https://reviews.freebsd.org/D4405
MFC after: 1 week
PR: 204943
Reviewed by: emaste, jilles
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=291908
|
| |
|
|
|
|
|
|
|
|
| |
In r289629 newfs_msdos option descriptions are available in
mkfs_msdos.h.
Obtained from: NetBSD
Notes:
svn path=/head/; revision=291385
|
| |
|
|
|
|
|
|
|
| |
Add a sanity test and clean up whitespace.
Obtained from: NetBSD
Notes:
svn path=/head/; revision=291382
|
| |
|
|
|
|
|
|
|
|
|
| |
Return -1 on errors from mkfs_msdos() instead of err()/errx(), to
allow different consumers to handle errors as appropriate.
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=291219
|
| |
|
|
|
|
|
|
|
| |
NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the
license block, which had already been done in the source I imported in
r289629.
Notes:
svn path=/head/; revision=291218
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=289629
|
| |
|
|
|
|
|
|
| |
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=289424
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=289376
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD split newfs_msdos in two so that they can reuse the file system
creation part in makefs. This change is a step on the path of bringing
that support to FreeBSD.
Reviewed by: kib, pfg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3905
Notes:
svn path=/head/; revision=289369
|