summaryrefslogtreecommitdiff
path: root/libparted/fs/hfs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Update copyright statements to 2022Brian C. Lane2022-03-234-4/+4
| | | | By running make update-copyright
* maint: Update copyright statements to 2021Brian C. Lane2021-01-184-4/+4
| | | | By running make update-copyright
* maint: Update copyright statements to 2020Brian C. Lane2020-12-114-7/+7
| | | | By running make update-copyright
* hfs: Fix gcc 10 bounds check warningBrian C. Lane2020-11-201-1/+1
| | | | | binfo is actually a list of structs that cannot be known until runtime, so use a variable length array.
* maint: Update copyright statements to 2019Brian C. Lane2019-08-124-5/+8
| | | | By running make update-copyright
* maint: run "make update-copyright"Jim Meyering2014-05-254-4/+4
|
* Fix filesystem detection on non 512 byte sectorsPhillip Susi2014-04-182-12/+8
| | | | | | 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-064-4/+4
| | | | Run "make update-copyright".
* maint: hoist libparted/fs/*/Makefile.am into parent Makefile.amJim Meyering2012-01-101-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | There was no need to have a separate Makefile.am for each file system type, and a good reason *not* to do that (reduce duplication). * configure.ac (AC_OUTPUT): Remove Makefiles. * libparted/fs/Makefile.am (SUBDIRS): Remove. (EXTRA_DIST): List the two non-src files: hfs/DOC hfs/HISTORY. (libfs_la_SOURCES): Hoist file names to here from... * libparted/fs/amiga/Makefile.am: ...here. * libparted/fs/ext2/Makefile.am: Likewise. * libparted/fs/fat/Makefile.am: Likewise. * libparted/fs/hfs/Makefile.am: Likewise. * libparted/fs/jfs/Makefile.am: Likewise. * libparted/fs/linux_swap/Makefile.am: Likewise. * libparted/fs/nilfs2/Makefile.am: Likewise. * libparted/fs/ntfs/Makefile.am: Likewise. * libparted/fs/reiserfs/Makefile.am: Likewise. * libparted/fs/ufs/Makefile.am: Likewise. * libparted/fs/xfs/Makefile.am: Likewise. * libparted/fs/*/Makefile.am: Remove files. * libparted/fs/amiga/a-interface.c: Now that the .o files are all in the same place, rename from interface.c, to avoid collision with name of .o file from ext2/interface.c.
* maint: update all copyright year number rangesJim Meyering2012-01-014-4/+4
| | | | Run "make update-copyright".
* libparted: HFS/HFS+ probe: don't let a corrupt FS evoke failed assertionBrian C. Lane2011-11-051-7/+11
| | | | | | | | * libparted/fs/hfs/probe.c (hfsplus_probe): Add a check on the search value and reject it if it is negative. (hfsx_probe): Likewise. (hfs_and_wrapper_probe): Likewise. Reported by Flos Lonicerae in http://bugzilla.redhat.com/714758
* hfs: remove all-but-probe FS-related codeJim Meyering2011-05-2718-5063/+2
|
* remove all top-level FS-op code and the clearfat programJim Meyering2011-05-271-82/+0
|
* Remove PED_ASSERT action argumentBrian C. Lane2011-03-057-37/+36
| | | | | | 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-2220-33/+21
| | | | Run "make update-copyright".
* tests: distribute a few more tests and documentation filesColin Watson2010-03-301-0/+2
| | | | | | | * debug/test/Makefile.am (noinst_SCRIPTS): Add test_fs_hfs and test_fs_hfsplus. * libparted/fs/hfs/Makefile.am (EXTRA_DIST): Add DOC and HISTORY. * tests/Makefile.am (TESTS): Add t3200-type-change.sh.
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-0820-20/+33
| | | | Run this command: make update-copyright
* maint: remove more dead stores and fix a bug in do_mkpartfsJim Meyering2009-10-012-8/+4
| | | | | | | | | | | | | | | | | | * libparted/fs/ext2/ext2_mkfs.c (ext2_mkfs_create_lost_and_found_inode): Punt: suppress clang's (aka scan-build's) warning. * parted/parted.c (snap_to_boundaries): Remove a dead store. (do_mkpartfs): The apparent dead store to part_name exposed a real bug. In fact, it highlighted that while do_mkpart uses its "part_name" variable (and calls ped_partition_set_name), do_mkpartfs did not. (snap_to_boundaries): Remove dead store. * libparted/unit.c (parse_chs): Likewise, and a leak. * libparted/fs/hfs/reloc_plus.c (hfsplus_cache_from_catalog): Likewise. (hfsplus_cache_from_extent): Remove a dead store. (hfsplus_cache_from_attributes): Likewise. * libparted/fs/hfs/advfs_plus.c (hfsplus_btree_search): Likewise. * libparted/fs/ext2/ext2_block_relocator.c (ext2_block_relocate_shrink): Remove dead store and corresponding decl. * parted/ui.h: Mark 2nd parameter as non-null.
* maint: remove dead store code and declarationsJim Meyering2009-10-012-2/+2
| | | | | | | | | | | | | | | | | * libparted/labels/bsd.c (bsd_partition_set_flag): Remove dead store and corresponding decl. * libparted/arch/linux.c (init_ide): Likewise. (_dm_maptype): Likewise. (_mount_table_search): Likewise. * libparted/fs/amiga/asfs.c (_asfs_probe): Likewise. * libparted/labels/mac.c (mac_alloc_metadata): Likewise. * libparted/labels/rdb.c (amiga_write): Likewise. (amiga_write): Again. * libparted/fs/amiga/apfs.c (_generic_apfs_probe): Likewise. * libparted/fs/hfs/reloc_plus.c (hfsplus_effect_move_extent): Likewise. * libparted/fs/hfs/reloc.c (hfs_effect_move_extent): Likewise. * libparted/labels/dos.c (probe_partition_for_geom): Remove dead store in "can't happen" case.
* build: avoid a shadowing warningJim Meyering2009-10-012-12/+12
| | | | | | * libparted/fs/hfs/advfs_plus.c (hfsplus_get_empty_end): Rename local, "link" to avoid shadowing the syscall. * libparted/fs/hfs/advfs.c (hfs_get_empty_end): Likewise.
* maint: update most copyright year lists to include 2009Jim Meyering2009-09-2920-20/+20
| | | | | | I used this command: make update-copyright \ UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
* remove all trailing blanksJim Meyering2009-03-0514-83/+83
| | | | | | ...by running these commands: t=$'\t' git grep -l "[ $t]\$"|xargs perl -pi -e 's/[ \t]+$//'
* Use free, not ped_free.Jim Meyering2008-05-299-56/+56
| | | | | | | * 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)
* Updated GPL license boilerplate.David Cantrell2007-07-2320-76/+56
|
* Move static variable flagging little endian or not to journal.c. We don't ↵David Cantrell2007-03-152-34/+33
| | | | | | want static variables in general, but if they must exist, put them in a C file, not a header. Parameterize the little_endian flag for the macros in journal.h.
* Patch from Matthew Garrett <mjg59@srcf.ucam.org> to add HFS+ resize support.David Cantrell2007-03-132-25/+37
|
* hfs.c: Detect write failure.Jim Meyering2007-03-121-10/+10
| | | | | | * libparted/fs/hfs/hfs.c (hfs_extract_file, hfs_extract_bitmap): (hfs_extract_mdb, hfsplus_extract_file, hfsplus_extract_vh): Fail when fclose fails for a written-to file handle.
* Use <config.h> consistently, not "config.h".Jim Meyering2007-03-0710-10/+10
| | | | | * Makefile.cfg (local-checks-to-skip): Remove sc_require_config_h, to enable the "make distcheck" test for this.
* Use $(VAR), rather than obsolescent @VAR@ automake notation.Jim Meyering2007-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the makefile-check rule. * Makefile.cfg: Remove makefile-check from the list of rules to skip. * Makefile.am: change e.g., @VERSION@ to $(VERSION). * debug/clearfat/Makefile.am: Likewise. * libparted/Makefile.am: Likewise. * libparted/fs/Makefile.am: Likewise. * libparted/fs/amiga/Makefile.am: Likewise. * libparted/fs/bfs/Makefile.am: Likewise. * libparted/fs/ext2/Makefile.am: Likewise. * libparted/fs/fat/Makefile.am: Likewise. * libparted/fs/hfs/Makefile.am: Likewise. * libparted/fs/jfs/Makefile.am: Likewise. * libparted/fs/linux_swap/Makefile.am: Likewise. * libparted/fs/ntfs/Makefile.am: Likewise. * libparted/fs/reiserfs/Makefile.am: Likewise. * libparted/fs/ufs/Makefile.am: Likewise. * libparted/fs/xfs/Makefile.am: Likewise. * libparted/labels/Makefile.am: Likewise. * libparted/tests/Makefile.am: Likewise. * parted/Makefile.am: Likewise. * partprobe/Makefile.am: Likewise. The above conversion caused a problem: * libparted/Makefile.am: Remove this recursive definition: LIBS = @INTLLIBS@ @LIBS@. Once converted to LIBS = ...$(LIBS), GNU make would (rightly) fail, objecting to the recursive definition. (libparted_la_LIBADD): Instead, add $(INTLLIBS) here.
* Introduced MAINTAINERCLEANFILES in Makefile.am for carrying out 'make ↵Debarshi Ray2007-02-191-0/+2
| | | | maintainer-clean'.
* Cleaning up nested structs & unions.Debarshi Ray2007-02-191-304/+304
|
* Avoid compiler warnings with gcc -Wall -Wshadow.Jim Meyering2007-02-163-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Compile warning-free with "gcc -Wall -Wshadow".Jim Meyering2007-02-133-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hello, I find that keeping code warning-free (wrt gcc -Wall -Wshadow) makes it easier to avoid certain classes of bugs. Compiling with gcc -Wall -Wshadow evoked a few warnings on a Debian/unstable system. Here are patches to fix those: * libparted/exception.c (default_handler): Rename parameter "ex" to "e", to avoid shadowing file-scoped global. * libparted/fs/linux_swap/linux_swap.c (_generic_swap_probe): Add a "can't happen" (with current callers) "default: goto error" clause in a switch to avoid a may-be-used-uninitialized warning. (_generic_swap_clobber): Likewise. * libparted/fs/hfs/reloc_plus.c (hfsplus_pack_free_space_from_block): Rename local variable "div" to "divisor", to avoid shadowing the function in <stdlib.h>. * libparted/fs/hfs/reloc.c (hfs_pack_free_space_from_block): Likewise. * libparted/fs/hfs/cache.c (hfsc_cache_add_extent): Rename parameter "index" to "ref_index" to avoid shadowing the <string.h> function. * libparted/labels/sun.c (sun_partition_enumerate): Rename local variable "i" to "j", to avoid shadowing another local. Signed-off-by: Jim Meyering <jim@meyering.net>
* cb6ca73be06f360308e6a2fccb7142ed8175af29 continued.Debarshi Ray2007-01-1610-21/+0
|
* Changes done on darcs repository suitable for 1.8 release:Otavio Salvador2006-11-101-1/+2
| | | | | | | | | | | | | | | Wed Nov 8 20:40:43 BRST 2006 Otavio Salvador <otavio@debian.org> * Merge libparted/ChangeLog conflict caused by Subversion syncing Wed Nov 8 21:15:58 BRST 2006 Otavio Salvador <otavio@debian.org> * doc/C/parted.8: small documentation simplification Wed Nov 8 20:09:03 BRST 2006 Otavio Salvador <otavio@debian.org> * libparted/fs/hfs/probe.c: Fix a segmentation fault when running without debug git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@890 2d424fd7-7fe2-0310-af74-8bc65edeb173
* Fix ChangeLogAnant Narayanan2006-09-1424-0/+6437
git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@820 2d424fd7-7fe2-0310-af74-8bc65edeb173