summaryrefslogtreecommitdiff
path: root/libparted/fs/r/fat/bootsector.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: Update copyright statements to 2022Brian C. Lane2023-03-241-1/+1
| | | | By running make update-copyright
* maint: Update copyright statements to 2022Brian C. Lane2022-03-231-1/+1
| | | | By running make update-copyright
* maint: Update copyright statements to 2021Brian C. Lane2021-01-181-1/+1
| | | | By running make update-copyright
* maint: Update copyright statements to 2020Brian C. Lane2020-12-111-2/+2
| | | | By running make update-copyright
* libparted: Fix warnings from GCC 8 -Wsuggest-attribute=pureShin'ichiro Kawasaki2020-11-201-1/+1
| | | | | | | | | | | | | | As GCC 8 suggests, add 'pure' attribute to 17 functions. After adding pure attributes, GCC suggested three more functions to add pure attributes. Add pure attribute to those functions also. In total, add pure attributes to 20 functions. I read code of the functions and confirmed the 20 functions are pure: they have no effect except the return value, and their return value depend only on the parameters and/or global variables. Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> Signed-off-by: Brian C. Lane <bcl@redhat.com>
* libparted: Fix warnings from GCC 8 -Wunused-variable and -Warray-boundsShin'ichiro Kawasaki2020-11-051-3/+2
| | | | | | | | | | | | | | | | | | | | GCC 8 reports two warnings as follows. r/fat/bootsector.c: In function 'fat_boot_sector_set_boot_code': r/fat/bootsector.c:274:15: warning: unused variable 'fs_info' [-Wunused-variable] FatSpecific* fs_info = FAT_SPECIFIC (fs); ^~~~~~~ In function 'memcpy', inlined from 'fat_boot_sector_set_boot_code' at r/fat/bootsector.c:283:2: /usr/include/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' forming offset [126, 128] is out of the bounds [0, 125] [-Warray-bounds] return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To avoid the warnings, remove the unused variable. Use strcpy in place of memcpy checking copy length. Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> Signed-off-by: Brian C. Lane <bcl@redhat.com>
* maint: Update copyright statements to 2019Brian C. Lane2019-08-121-1/+1
| | | | By running make update-copyright
* Lift 512 byte restriction on fat resizePhillip Susi2018-06-051-12/+0
| | | | | | As Colin Watson pointed out way back in 2014, when I removed the 512 byte sector size restriction from the fs recognition code, I missed the same from the fat resize code.
* lib-fs-resize: Fix recognition of FAT file system after resizingCurtis Gedak2016-04-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | When resizing a FAT partition, an extra boot_sector memory allocation was causing the original boot_sector information to be lost. The resulting FAT file system was still recognized by GNU/Linux, but not recognized by the proprietary Windows operating system. The problem with Windows FAT32 recognition was introduced with: Fix filesystem detection on non 512 byte sectors 80678bdd957cf49a9ccfc8b88ba3fb8b4c63fc12 Fix by removing the extra boot_sector memory allocation. Note that since parted-3.0 another code path to the extra memory allocation of fat_create(...) via ped_file_system_create(...) is inaccessible. In an effort to maintain the ability to re-instate the code, add a new boot_sector memory allocation where it is needed in the alternate code path. GNU bug report logs - #22266 [libparted] jump instruction and boot code is corrupted with random bytes after fat is resized http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22266
* maint: run "make update-copyright"Jim Meyering2014-05-251-1/+1
|
* Fix filesystem detection on non 512 byte sectorsPhillip Susi2014-04-181-14/+18
| | | | | | Enable probing for filesystems with non 512 byte sectors, and fix up each filesystem to correctly handle that. Remove unused field from the fs type structure listing acceptable sector sizes.
* libparted: don't require a system id stringPhillip Susi2014-03-021-7/+0
| | | | | | | Historically the system ID field of a fat boot sector contains a string identifying the OS that formatted it. It appears that some recent versions of Windows have stopped bothering with this. Stop requiring this string to recognize fat as valid.
* maint: update all copyright year number rangesJim Meyering2013-01-061-1/+1
| | | | Run "make update-copyright".
* maint: update copyrights in r/Jim Meyering2012-02-101-1/+1
|
* lib-fs-resize: re-add HFS and FAT file-system-related codeJim Meyering2012-02-071-0/+452
This just adds the code, without hooking it up yet. * po/POTFILES.in: Add all libparted/fs/r/**.c files.