Commit graph

10 commits

Author SHA1 Message Date
Tom Dewey
df33637d32 qt6: Replace qAsConst() usage 2024-09-11 17:12:48 +01:00
Floris Bos
1390d3515f Workaround errornous gcc string overflow warning 2023-09-22 20:32:46 +02:00
maxnet
e357fda335
devicewrapperfatpartition.cpp: supress false positive gcc warning 2023-05-11 21:54:37 +02:00
Floris Bos
43911005a2 FAT editing: handle root directory without end-of-dir marker
Fixes customizing Homebridge image.
2023-03-22 17:54:22 +01:00
Floris Bos
65f6a07fae FAT editing: fix creating files that are multiple of cluster size
Closes #568
2023-03-22 16:42:10 +01:00
Floris Bos
c8a05b995f Make code Qt 6 compatible / raises minimum Qt 5 version to 5.14
In addition to replacing Qt5 with Qt6 in CMakeLists.txt
two small changes to the code are needed to make things build
on Qt 6 (which in turn is needed for Apple M1/M2 support).

The cost of this change is that when building on Qt 5, at least
version 5.14 is needed.
Certain older but still used Linux distributions such as
Ubuntu 10.04 LTS still use 5.12, so revert this commit if you
are building on those...
2023-03-20 14:42:48 +01:00
Floris Bos
a403df4385 Advanced settings FAT modification: fix expanding directory
When no more directory entries are available in the existing
cluster(s) of a directory on FAT32, we allocate an
extra cluster.
Make sure to zero out that new cluster, as disk checking utilities
may not stop reading when reaching an end of directory marker but
read the rest of cluster as well.
So there must not be any garbage data from a previously deleted file
in the sector there.

Also add checks to prevent getting in an endless loop on
encoutering circular "next cluster" references.
2022-11-20 18:44:22 +01:00
Floris Bos
fce80b2a67 FAT code: also look at short file names and not just long names 2022-11-19 23:46:11 +01:00
Floris Bos
5fa3fbe8dc Switch to using FAT classes for advanced settings
- No longer relies on operating system for mounting FAT partition
  when applying 'advanced settings'
- change '__attribute__ ((packed))' to '#pragma pack()' as the
  mingw version we are using for Windows has a bug with the former
2022-11-15 01:15:08 +01:00
Floris Bos
142ddfc037 Add classes for mounting FAT16/32 without help from OS
Minimal implementation for reading/writing files in the root
directory of a FAT16/FAT32 file system.

Can read/write from raw disk devices, and no longer relies on
operating system support for mounting the file system.

Currently assumes Imager will always be run on 'little endian'
architectures such as Intel and ARM (at least under Linux).
If there is a use-case for big-endian (anybody still using Sparc?)
this may be revisited later.
2022-11-14 21:41:20 +01:00