Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115917987
D45436.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D45436.diff
View Options
diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c
--- a/sbin/newfs_msdos/mkfs_msdos.c
+++ b/sbin/newfs_msdos/mkfs_msdos.c
@@ -568,14 +568,7 @@
x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs;
}
if (set_res) {
- if (o.align)
- alignto = bpb.bpbSecPerClust;
- else
-#ifdef PAGE_SIZE
- alignto = PAGE_SIZE / bpb.bpbBytesPerSec;
-#else
- alignto = 1;
-#endif
+ alignto = bpb.bpbSecPerClust;
if (alignto > 1) {
/* align data clusters */
alignment = (bpb.bpbResSectors + bpb.bpbBigFATsecs * bpb.bpbFATs + rds) %
diff --git a/sbin/newfs_msdos/newfs_msdos.8 b/sbin/newfs_msdos/newfs_msdos.8
--- a/sbin/newfs_msdos/newfs_msdos.8
+++ b/sbin/newfs_msdos/newfs_msdos.8
@@ -23,7 +23,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 2, 2024
+.Dd June 6, 2024
.Dt NEWFS_MSDOS 8
.Os
.Sh NAME
@@ -91,13 +91,11 @@
appended to the offset specifies that the
number is in sectors, kilobytes, megabytes or gigabytes, respectively.
.It Fl A
-Attempt to cluster align the data area, useful for SD card.
-If neither the
-.Fl A
-nor
+Attempt to cluster align the data area, useful for flash based storage.
+This option is enabled by default, unless a number of reserved sectors
+is specified using the
.Fl r
-option is used, the number of reserved sectors is set to a value that aligns
-the start of the data area to a multiple of the page size of the host.
+option.
.It Fl B Ar boot
Get bootstrap from file.
.It Fl C Ar create-size
@@ -173,12 +171,10 @@
Number of hidden sectors.
.It Fl r Ar reserved
Number of reserved sectors.
-If neither the
-.Fl A
-nor
+If the
.Fl r
-option is used, the number of reserved sectors is set to a value that aligns
-the start of the data area to a multiple of the page size of the host.
+option is not used, the number of reserved sectors is set to a value that
+aligns the start of the data area to a multiple of the cluster size.
.It Fl s Ar total
File system size.
.It Fl u Ar track-size
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 9:49 AM (4 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17878843
Default Alt Text
D45436.diff (2 KB)
Attached To
Mode
D45436: Align FAT clusters to the cluster size
Attached
Detach File
Event Timeline
Log In to Comment