summaryrefslogtreecommitdiff
path: root/libparted/filesys.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-1/+2
| | | | By running make update-copyright
* maint: Update copyright statements to 2019Brian C. Lane2019-08-121-1/+1
| | | | By running make update-copyright
* libparted: Replace abs() with llabs()Shin'ichiro Kawasaki2019-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | GCC 9 fails to compile a few C source files which call abs() function. An example of the error messages was as follows: CC dos.lo dos.c: In function '_best_solution': dos.c:1773:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value] 1773 | a_delta = abs (part->geom.start - a->start); | ^~~ dos.c:1774:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value] 1774 | b_delta = abs (part->geom.start - b->start); | ^~~ cc1: all warnings being treated as errors To avoid the errors, replace abs() function calls with llabs(). Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> Signed-off-by: Brian C. Lane <bcl@redhat.com>
* maint: run "make update-copyright"Jim Meyering2014-05-251-1/+1
|
* Fix filesystem detection on non 512 byte sectorsPhillip Susi2014-04-181-5/+0
| | | | | | 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.
* maint: update all copyright year number rangesJim Meyering2013-01-061-1/+1
| | | | Run "make update-copyright".
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* remove all top-level FS-op code and the clearfat programJim Meyering2011-05-271-562/+0
|
* maint: s/can not/cannot/ in a comment and documentationJim Meyering2011-04-141-1/+1
| | | | | | Without this, a new "make syntax-check" rule would fail. * libparted/filesys.c: s/can not/cannot/ * doc/parted-pt_BR.texi (BIOSes and Firmware): Likewise.
* Remove PED_ASSERT action argumentBrian C. Lane2011-03-051-35/+35
| | | | | | The action argument was a leftover from when the PED_ASSERT macro was last changed. This removes that argument from the macro and from all occurrences of it.
* maint: update copyright year ranges to include 2011Jim Meyering2011-02-221-1/+1
| | | | Run "make update-copyright".
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-081-1/+1
| | | | Run this command: make update-copyright
* libparted: plug an FS-alias-related leakJim Meyering2009-10-271-0/+1
| | | | | * libparted/filesys.c (ped_file_system_alias_unregister): Free the alias we've just unregistered.
* disable some file-system-related probe tests for sector size > 512Jim Meyering2009-07-241-1/+6
| | | | | | | | | | | | | | | | | | | These changes keep us from recognizing most file systems when the sector size is larger than 512. However, for now (while concentrating on getting partition table support right) that's not a problem. Besides, the code we're avoiding would inevitably make parted smash its stack. * libparted/fs/linux_swap/linux_swap.c (_generic_swap_probe): Fail the swap-file-system-recognizing test when sector size is not 512. * libparted/filesys.c (ped_file_system_probe_specific): Fail all fs-specific probe-related tests when sector size is not 512. * libparted/fs/jfs/jfs.c (jfs_probe): For now, don't even try to deal with larger sector size. * libparted/label.c: Skip tests of problematic file system types. * tests/t0100-print.sh: Print with units of sectors, and adjust expected output accordingly. * tests/t1000-mkpartfs.sh: Use a smaller test file.
* Rationalise linux-swap fs names, and add a "linux-swap" aliasColin Watson2009-07-101-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libparted/filesys.c (ped_file_system_alias_register, ped_file_system_alias_unregister, ped_file_system_alias_get_next): New functions. (ped_file_system_type_get): Walk aliases as well. * include/parted/filesys.h (struct _PedFileSystemAlias): New structure. (ped_file_system_alias_register, ped_file_system_alias_unregister, ped_file_system_alias_get_next): Add prototypes. * parted/parted.c (_init_messages): Walk file system aliases as well as types. * parted/ui.c (init_fs_type_str): Likewise. * libparted/fs/linux_swap/linux_swap.c (_swap_v1_type, _swap_v1_open, _swap_v1_probe, _swap_v1_clobber, _swap_v1_ops): Rename to _swap_v0_type etc. to match version number used in mkswap. Update all users. (_swap_v2_type, _swap_v2_open, _swap_v2_probe, _swap_v2_clobber, _swap_v2_ops): Rename to _swap_v1_type etc. to match version number used in mkswap. Update all users. (_swap_v0_type): Rename type from "linux-swap(old)" to "linux-swap(v0)". (_swap_v1_type): Rename type from "linux-swap(new)" to "linux-swap(v1)". (ped_file_system_linux_swap_init, ped_file_system_linux_swap_done): Register/unregister a "linux-swap" alias for "linux-swap(v1)", and deprecated aliases "linux-swap(old)" and "linux-swap(new)". * libparted/labels/misc.h (is_linux_swap): Update comment. * tests/t2100-mkswap.sh: Refer to "linux-swap(v1)" rather than "linux-swap(new)". Test creation via the new alias.
* remove all trailing blanksJim Meyering2009-03-051-20/+20
| | | | | | ...by running these commands: t=$'\t' git grep -l "[ $t]\$"|xargs perl -pi -e 's/[ \t]+$//'
* Use free, not ped_free.Jim Meyering2008-05-291-2/+2
| | | | | | | * libparted/libparted.c (ped_free): Remove function. [DEBUG] (_check_dodgy_pointer): Remove function. Global substitution: perl -pi -e 's/\bped_free\b/free/g' $(lid -knone ped_free)
* Removing unnecessary type-casts and eerie comments.Debarshi Ray2007-11-021-3/+2
|
* Updated GPL license boilerplate.David Cantrell2007-07-231-3/+2
|
* Use <config.h> consistently, not "config.h".Jim Meyering2007-03-071-1/+1
| | | | | * Makefile.cfg (local-checks-to-skip): Remove sc_require_config_h, to enable the "make distcheck" test for this.
* Avoid compiler warnings with gcc -Wall -Wshadow.Jim Meyering2007-02-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libparted/arch/linux.c (init_ide): Add missing "break" at end of final case: stmt. Add "default:" in the same switch to avoid a compiler warning. * libparted/fs/fat/bootsector.c (fat_boot_sector_analyse): Likewise. * libparted/fs/fat/resize.c (ask_type): Likewise. * libparted/fs/fat/traverse.c (fat_dir_entry_set_first_cluster): Likewise. * debug/clearfat/clearfat.c (_calc_fat_entry_offset): Likewise. * parted/parted.c (_timer_handler): Cast time_t values to "int" to agree with %d printf format. (g_timer): Rename file-scoped global from shadowed "timer". Update all uses of the global. (version_msg): Remove decl of unused global. * parted/ui.c (current_exception_opt): Remove decl of unused global. * libparted/filesys.c (ped_file_system_close): Remove unused label. * libparted/unit.c (parse_chs): Likewise. * libparted/debug.c (ped_assert): Use "int" as type of backtrace return value, not size_t. * libparted/fs/reiserfs/reiserfs.c (reiserfs_check): Guard declaration of local with #ifdef HAVE_REISERFS_FS_CHECK, since it's used only in a similarly-guarded block. (reiserfs_fs_check): Likewise for this file-scoped global. Avoid warnings about unused file-scoped global variables. * libparted/fs/hfs/hfs.h (hfs_type, hfsplus_type): Remove these declarations of file-scoped static variables. * libparted/fs/hfs/hfs.c: Put them here, instead. * libparted/fs/fat/table.c (_test_code_active): Remove unused function. * libparted/arch/linux.c: Add casts to avoid performing pointer arithmetic on "void *" pointers. * libparted/fs/hfs/file_plus.c (hfsplus_file_read): Don't do pointer arithmetic on a "void *" pointer. (hfsplus_file_write): Likewise. * libparted/fs/fat/count.c (flag_traverse_dir): Move decl of unused local into #if-0'd block where it is referenced. (print_chain): Guard definition with #ifdef PED_VERBOSE, since the sole use of this function is guarded the same way. * libparted/fs/amiga/amiga.c: (_amiga_valid_block_id): Remove unused function. (_amiga_get_bstr): Likewise. (_amiga_set_bstr): Likewise. Remove unused labels and/or declarations of unused variables. * parted/ui.c (_readline): Likewise. * libparted/cs/constraint.c (_constraint_get_canonical_start_range): Likewise. * libparted/cs/geom.c (ped_geometry_read): Likewise. * libparted/fs/amiga/apfs.c (_generic_apfs_probe): Likewise. * libparted/fs/ext2/ext2_mkfs.c (ext2_mkfs_write_meta): Likewise. * libparted/disk.c: Likewise. * libparted/fs/hfs/hfs.c: Likewise. * libparted/fs/fat/fat.c: Likewise. * libparted/fs/fat/clstdup.c: Likewise. * libparted/fs/fat/calc.c: Likewise. * libparted/fs/ext2/ext2.c: Likewise. * libparted/fs/amiga/affs.c: Likewise. * libparted/fs/amiga/asfs.c: Likewise. * libparted/labels/aix.c: Likewise. * libparted/labels/sun.c: Likewise. * libparted/labels/pc98.c: Likewise. * libparted/labels/mac.c: Likewise. * libparted/labels/dos.c: Likewise. * libparted/labels/loop.c (loop_alloc): Likewise. * libparted/labels/gpt.c: Likewise. * libparted/labels/dvh.c (dvh_alloc): Likewise. (dvh_read) [!DISCOVER_ONLY]: Add "default:" in a switch. * libparted/labels/fdasd.c (fdasd_reread_partition_table): Remove decl of unused local(s). (fdasd_get_partition_data): Likewise. (fdasd_partition_type): Remove unused function. (fdasd_write_vtoc_labels): Likewise. (fdasd_change_volser): Likewise. (fdasd_check_volser): Likewise. (fdasd_reread_partition_table): Likewise. Signed-off-by: Jim Meyering <jim@meyering.net>
* Add stdint.h stdlib.h & string.h to include/parted/parted.h and remove them ↵Debarshi Ray2007-01-161-1/+0
| | | | from other files.
* Changes done on darcs repository suitable for 1.8 release:Otavio Salvador2006-11-111-1/+2
| | | | | | | | | | | Sat Nov 11 10:41:54 BRST 2006 Otavio Salvador <otavio@debian.org> * Break lines bigger then 80 columns. Sat Nov 11 02:02:26 BRST 2006 Otavio Salvador <otavio@debian.org> * Fix autogen.sh script to call autopoint with -f git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@892 2d424fd7-7fe2-0310-af74-8bc65edeb173
* Changes done on darcs repository suitable for 1.8 release:Otavio Salvador2006-11-111-8/+6
| | | | | | | | | | | | | | | | | | | Fri Nov 10 23:19:15 BRST 2006 Otavio Salvador <otavio@debian.org> * Code clean-up on registering and unregistering of disks * libparted/disk.c (ped_register_disk_type, ped_unregister_disk_type): Clean-up. Patch sent by Debarshi 'Rishi' Ray <debarshi.ray@gmail.com>. Fri Nov 10 23:14:58 BRST 2006 Otavio Salvador <otavio@debian.org> * Fix filesystem unregistering * libparted/filesys.c (ped_file_system_type_unregister): Handle instances where fs_types == NULL and the given fs_type is not in the list of registered file-system types. Some code clean-up. Patch sent by Debarshi 'Rishi' Ray <debarshi.ray@gmail.com>. git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@891 2d424fd7-7fe2-0310-af74-8bc65edeb173
* Fix ChangeLogAnant Narayanan2006-09-141-0/+786
git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@820 2d424fd7-7fe2-0310-af74-8bc65edeb173