OSDN Git Service
David Cantrell [Mon, 19 Mar 2007 14:43:56 +0000 (10:43 -0400)]
Sleep for one second after uploading a file to ftp-upload.gnu.org. Seems transactions need to be spaced out a bit otherwise the server will reject files.
David Cantrell [Mon, 19 Mar 2007 15:09:25 +0000 (11:09 -0400)]
Fix for compile problems with gcc-4.1.2 as indicated here:
http://lists.gnu.org/archive/html/bug-parted/2007-03/msg00008.html
David Cantrell [Mon, 19 Mar 2007 15:10:38 +0000 (11:10 -0400)]
Check for tgetent() in libtinfo as well as ncurses, curses, termcap, and termlib.
David Cantrell [Mon, 19 Mar 2007 15:12:11 +0000 (11:12 -0400)]
Remove some unused variables, check the return values from fgets() and asprintf(), and remove the unused _dm_remove_map() function.
David Cantrell [Mon, 19 Mar 2007 15:19:27 +0000 (11:19 -0400)]
Include vtoc.h for the format1_label_t typedef.
David Cantrell [Mon, 19 Mar 2007 18:20:52 +0000 (14:20 -0400)]
Remove GNU make-specific things from po4a.mk.
David Cantrell [Fri, 16 Mar 2007 19:18:08 +0000 (15:18 -0400)]
Install the libparted.pc file, not the libparted.pc.in file.
David Cantrell [Fri, 16 Mar 2007 19:19:57 +0000 (15:19 -0400)]
More spec file template cleanups.
David Cantrell [Fri, 16 Mar 2007 20:09:08 +0000 (16:09 -0400)]
Updated the release script to work with the new source layout.
Debarshi Ray [Fri, 16 Mar 2007 14:20:32 +0000 (19:50 +0530)]
Fixed faulty information in README-hacking (Bison is not a maintainer tool for Parted), and Makefile.maint (every project has certain variations of it).
Jim Meyering [Fri, 16 Mar 2007 09:59:19 +0000 (10:59 +0100)]
po/POTFILES.in: Add lib/getopt.c
Debarshi Ray [Fri, 16 Mar 2007 06:42:34 +0000 (12:12 +0530)]
Prevented DASD specific headers and sources from being compiled/installed on non-s390 systems; and conditionally included fdasd.h in linux.h for s390 systems.
David Cantrell [Thu, 15 Mar 2007 17:03:24 +0000 (13:03 -0400)]
Move static variable flagging little endian or not to journal.c. We don't 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.
David Cantrell [Tue, 13 Mar 2007 21:34:05 +0000 (17:34 -0400)]
Modernize the spec file template.
David Cantrell [Tue, 13 Mar 2007 21:33:44 +0000 (17:33 -0400)]
Ignore more files.
David Cantrell [Tue, 13 Mar 2007 17:37:45 +0000 (13:37 -0400)]
Patch from Matthew Garrett <mjg59@srcf.ucam.org> to add HFS+ resize support.
Jim Meyering [Mon, 12 Mar 2007 13:58:40 +0000 (14:58 +0100)]
hfs.c: Detect write failure.
* 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.
Jim Meyering [Thu, 8 Mar 2007 22:40:03 +0000 (23:40 +0100)]
aix.c: Avoid memory overrun. Don't assume logical sector size <= 512B
* libparted/labels/aix.c (struct AixLabel): Remove definition.
(aix_label_magic_get, aix_label_magic_set): New functions.
(read_sector): New function.
(aix_probe): Rewrite not to use the above, and not a static buffer.
(aix_clobber): Likewise.
Also, rather than PED_ASSERT'ing that aix_probe returns 1,
simply return 0 if aix_probe returns fails.
(ped_disk_aix_init): Remove assertion, now that AixLabel is gone.
Jim Meyering [Thu, 8 Mar 2007 22:11:53 +0000 (23:11 +0100)]
Use PED_SECTOR_SIZE_DEFAULT not 512
* libparted/arch/beos.c (beos_read, beos_write):
* libparted/arch/linux.c (_device_get_length, _device_seek)
(linux_read, linux_write, _blkpg_add_partition):
* libparted/fs/fat/bootsector.c (fat_boot_sector_read):
* libparted/labels/bsd.c (bsd_alloc):
* libparted/labels/dos.c (probe_filesystem_for_geom):
* libparted/labels/rdb.c (amiga_read):
Jim Meyering [Thu, 8 Mar 2007 21:39:33 +0000 (22:39 +0100)]
* parted/ui.c (non_interactive_mode): Plug a tiny leak.
Exercise by running the following with a CD-ROM in the drive:
valgrind --leak-check=full parted/parted /dev/cdrom print
Before, we'd leak the 6-byte command: "print\0".
Jim Meyering [Thu, 8 Mar 2007 16:41:34 +0000 (17:41 +0100)]
linux.c: Avoid memory overrun. Handle 2048-byte logical sectors.
* libparted/arch/linux.c (linux_read): Allocate the right amount of
space for the (potentially 2048-byte-long) sectors we're about to read.
Jim Meyering [Thu, 8 Mar 2007 00:05:33 +0000 (01:05 +0100)]
Don't use deprecated mktemp, to avoid linker warning
* libparted/tests/common.c (_create_disk): Rewrite to
use mkstemp instead.
Jim Meyering [Thu, 8 Mar 2007 00:04:44 +0000 (01:04 +0100)]
* libparted/tests/label.c: Plug a trivial leak.
Debarshi Ray [Wed, 7 Mar 2007 20:22:08 +0000 (01:52 +0530)]
Merge branch 'master' of git+ssh://rishi-guest@git.debian.org/git/parted/parted
Debarshi Ray [Wed, 7 Mar 2007 20:18:30 +0000 (01:48 +0530)]
Replaced [f]printf with fput[c|s] globally.
Jim Meyering [Wed, 7 Mar 2007 18:39:56 +0000 (19:39 +0100)]
libparted/unit.c: constify interfaces
* include/parted/unit.h (PED_UNIT_LAST):
* libparted/unit.c (ped_unit_get_size):
(ped_unit_format_custom_byte, ped_unit_format_byte):
(ped_unit_format_custom, ped_unit_format, ped_unit_parse):
(find_suffix, parse_chs, clip, geometry_from_centre_radius):
(ped_unit_parse_custom):
Jim Meyering [Wed, 7 Mar 2007 18:27:18 +0000 (19:27 +0100)]
Declare some static arrays to be "const".
* libparted/labels/dos.c (MBR_BOOT_CODE):
* libparted/labels/efi_crc32.c (crc32_tab):
* libparted/labels/pc98.c (MBR_BOOT_CODE):
* libparted/labels/vtoc.c (EBCtoASC, ASCtoEBC):
Jim Meyering [Wed, 7 Mar 2007 17:58:29 +0000 (18:58 +0100)]
* configure.ac: Fix a typo: s/have_scintilla/have_check/
Jim Meyering [Wed, 7 Mar 2007 17:56:21 +0000 (18:56 +0100)]
tests/label: Don't dereference NULL if open fails.
* libparted/tests/label.c (START_TEST): Return right away if
ped_device_get returns NULL.
Jim Meyering [Wed, 7 Mar 2007 17:17:00 +0000 (18:17 +0100)]
Add "const" to parameters in these public interfaces.
* libparted/disk.c (ped_disk_check):
(ped_disk_get_primary_partition_count):
(ped_disk_get_last_partition_num, ped_partition_print):
(ped_disk_print):
(ped_partition_print): Also declare to be "static".
This is ok, since the function is referenced only from this file.
* include/parted/disk.h: Update their prototypes.
Jim Meyering [Wed, 7 Mar 2007 11:29:47 +0000 (12:29 +0100)]
Use <config.h> consistently, not "config.h".
* Makefile.cfg (local-checks-to-skip): Remove sc_require_config_h,
to enable the "make distcheck" test for this.
David Cantrell [Tue, 6 Mar 2007 22:19:31 +0000 (17:19 -0500)]
start_pos is a PedSector, not a PedGeometry.
David Cantrell [Tue, 6 Mar 2007 16:18:20 +0000 (11:18 -0500)]
Preserve starting sector for primary NTFS 3.1 partitions (Windows Vista)
when modifying the DOS disk label. NTFS 3.1 partitions do not start on
the 2nd head of the 1st cylinder at the beginning of the drive.
David Cantrell [Fri, 2 Mar 2007 18:20:28 +0000 (13:20 -0500)]
Patched parted.8 man page to show partition names apply to GPT disk labels
as well as Mac and PC98 disk labels.
Debarshi Ray [Tue, 6 Mar 2007 15:17:58 +0000 (20:47 +0530)]
Replaced [f]printf with fput[c|s] in libparted/fs/ext2/ext2_block_relocator.c.
Debarshi Ray [Tue, 6 Mar 2007 11:08:33 +0000 (16:38 +0530)]
Re-arranging .gitignore in alphabetical order.
Debarshi Ray [Tue, 6 Mar 2007 10:27:24 +0000 (15:57 +0530)]
Defined a dummy '_dump_history' function in parted/ui.c when Readline is absent. Thanks to Jim Meyering for the suggestion.
Debarshi Ray [Tue, 6 Mar 2007 10:21:58 +0000 (15:51 +0530)]
Added libparted/tests/label to .gitignore.
Debarshi Ray [Tue, 6 Mar 2007 09:07:25 +0000 (14:37 +0530)]
Fixed parted/ui.c to incorporate signal handlers for systems lacking 'sigaction', 'SA_SIGINFO', and other constants in signal.h.
Jim Meyering [Mon, 5 Mar 2007 21:44:38 +0000 (22:44 +0100)]
Undo part of the dos.c constification.
* libparted/disk.c: The sole parameter of ped_disk_type_register
and ped_disk_type_unregister must *not* be const.
* libparted/labels/dos.c (msdos_disk_type): Likewise for the
corresponding static struct in dos.c, since those functions modify
the struct. This didn't show up at compile time due to casts.
* include/parted/disk.h: Update prototypes, too.
Jim Meyering [Mon, 5 Mar 2007 21:07:23 +0000 (22:07 +0100)]
Hide two unnecessarily-"extern" functions.
* libparted/labels/mac.c (mac_alloc): Declare static.
* libparted/labels/dos.c (raw_part_parse): Declare static.
Jim Meyering [Mon, 5 Mar 2007 14:37:25 +0000 (15:37 +0100)]
* libparted/labels/dos.c: Complete constification of this file.
* libparted/disk.c (ped_disk_type_register): Make the sole
parameter "const", so that caller's argument may be "const".
(ped_disk_type_unregister): Likewise.
Jim Meyering [Mon, 5 Mar 2007 14:06:31 +0000 (15:06 +0100)]
* po/POTFILES.in: Add partprobe/partprobe.c, now that it contains
translatable strings.
Jim Meyering [Mon, 5 Mar 2007 13:47:02 +0000 (14:47 +0100)]
Make partprobe accept --help and --version options.
Add long options: --no-update (same as existing -d), and
--summary (same as existing -s).
* partprobe/partprobe.c
Include configmake.h, getopt.h, and NLS-related things.
(main): Rewrite option handling.
Along the way, fix a bug whereby "partprobe DEV1 DEV2 ... DEVN" would
exit successfully whenever process_dev (DEVN) returns nonzero, even
when that function fails for each of the preceding devices.
Jim Meyering [Mon, 5 Mar 2007 13:47:02 +0000 (14:47 +0100)]
Make clearfat accept --help and --version options.
* debug/clearfat/clearfat.c (AUTHORS, PROGRAM_NAME): Define.
Include gettext-related things.
Include closeout.h.
(usage): New function.
(main): Set up for translations, use close_stdout.
* bootstrap.conf: Add long-options, for clearfat.
* debug/clearfat/Makefile.am: Use gnulib.
Jim Meyering [Mon, 5 Mar 2007 13:44:58 +0000 (14:44 +0100)]
* include/parted/disk.h (struct _PedDiskOps) [write]: Change
parameter type to be "const".
Jim Meyering [Mon, 5 Mar 2007 13:37:39 +0000 (14:37 +0100)]
Begin making libparted/labels/*.c const-correct.
For an introduction, see
http://mail-archive.com/parted-devel@lists.alioth.debian.org/msg00930.html
In particular, I've used a const-adding case in mac.c to work around
the current, inconsistent semantics of mac_write.
Jim Meyering [Mon, 5 Mar 2007 09:19:53 +0000 (10:19 +0100)]
Avoid a libtool warning:
libtool: link: warning: `-release' is ignored for convenience libraries
* libparted/labels/Makefile.am (liblabels_la_LDFLAGS): Don't define.
Jim Meyering [Mon, 5 Mar 2007 09:13:08 +0000 (10:13 +0100)]
Make "make distcheck" work better.
* Makefile.cfg (local-checks-to-skip): Skip sc_system_h_headers, too.
* Makefile.maint (my-distcheck): Don't depend on $(release_archive_dir).
Jim Meyering [Fri, 2 Mar 2007 11:23:25 +0000 (12:23 +0100)]
Avoid recursive "LIBS = ... $(LIBS)" assignments.
* libparted/labels/Makefile.am (liblabels_la_LIBADD): Add $(INTLLIBS)
here rather than via a recursive LIBS = ... $(LIBS) assignment.
* libparted/fs/Makefile.am (libfs_la_LIBADD): Likewise.
Jim Meyering [Fri, 2 Mar 2007 10:56:02 +0000 (11:56 +0100)]
Use $(VAR), rather than obsolescent @VAR@ automake notation.
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.
Jim Meyering [Fri, 2 Mar 2007 10:55:58 +0000 (11:55 +0100)]
Enable the po-check rule.
* Makefile.cfg (local-checks-to-skip): Remove po-check.
* po/POTFILES.in: Add a bunch of names of files that contain
translatable strings. Remove some which contain none.
Jim Meyering [Fri, 2 Mar 2007 10:55:50 +0000 (11:55 +0100)]
Add infrastructure for more rigorous "make distcheck" rules.
* GNUmakefile: New file.
* .prev-version: New file.
* Makefile.am (MAINTAINERCLEANFILES): Remove names of files now in build-aux/.
(distcheck-hook): New rule, to run the checks in Makefile.maint.
(EXTRA_DIST): Add .prev-version.
* Makefile.maint: New file. Improved "make distcheck" rules.
* Makefile.cfg: Select which Makefile.maint checks to run.
(local-checks-to-skip): List all currently-failing and irrelevant
tests here.
* build-aux/vc-list-files: New file. List version-controlled files.
* .gitignore: Remove build-aux, since now it contains a
version-controlled file.
Debarshi Ray [Thu, 1 Mar 2007 16:12:32 +0000 (21:42 +0530)]
Fixing indentation in parted/ui.c. Replaced TABs with spaces to ensure uniformity in all editors.
Debarshi Ray [Wed, 28 Feb 2007 15:31:52 +0000 (21:01 +0530)]
Fixing indentation in parted/ui.c.
Jim Meyering [Tue, 27 Feb 2007 17:56:36 +0000 (18:56 +0100)]
Normalize the way we handle a generated-and-distributed file, parted.spec.
* Makefile.am (EXTRA_DIST): Add parted.spec.
(parted.spec): New rule.
(MAINTAINERCLEANFILES): Add parted.spec.
* configure.ac (AC_OUTPUT): Remove parted.spec from the list.
Jim Meyering [Tue, 27 Feb 2007 15:22:29 +0000 (16:22 +0100)]
Add -I$(top_srcdir)/lib, required for new use of close_stdout.
* partprobe/Makefile.am (partedincludedir):
Jim Meyering [Tue, 27 Feb 2007 12:16:44 +0000 (13:16 +0100)]
Arrange for "make distcheck" to be stricter.
Jim Meyering [Mon, 26 Feb 2007 23:43:55 +0000 (00:43 +0100)]
* bootstrap: new file.
Debarshi Ray [Mon, 26 Feb 2007 22:32:44 +0000 (04:02 +0530)]
Fixing libparted/arch/gnu.c to remove build-time errors.
Jim Meyering [Sun, 25 Feb 2007 17:46:05 +0000 (18:46 +0100)]
partprobe: Detect/report any error when writing to stdout.
* partprobe/Makefile.am (partprobe_LDADD): Add lib/libparted.la.
* partprobe/partprobe.c:
Include "closeout.h" for close_stdout.
Include "version-etc.h" for version_etc prototype.
Declare global, program_name.
(PROGRAM_NAME, AUTHORS): Define.
(help): Use PROGRAM_NAME, rather than hard-coding it.
(version): Use gnulib's version_etc.
(main): Set program_name.
Use atexit to close stdout carefully upon exit.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
Add a bunch of .gitignore files.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
Avoid a gcc format warning:
* debug/clearfat/clearfat.c (_do_help): Use fputs, not printf.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
Remove now-generated files.
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po:
* po/gl.po, po/id.po, po/it.po, po/ja.po, po/nl.po, po/nn.po:
* po/pl.po, po/pt.po, po/pt_BR.po, po/ru.po:
* po/sv.po, po/tr.po, po/uk.po, po/vi.po, po/zh_CN.po, po/zh_TW.po:
* po/Makevars: Remove now-generated file.
* po/parted.pot: Remove -generated file.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
mv parted.m4 into new dir, m4/
* Makefile.am (EXTRA_DIST): Remove parted.m4.
Now that it's in m4, it's included automatically.
(aclocal_DATA): Remove unnecessary definition.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
* libparted/tests/label.c: Fail if _create_disk returns NULL.
Make global and functions static.
* libparted/tests/common.c (_create_disk): Handle fopen failure.
Handle fclose failure.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
Include <config.h> from every .c file:
* libparted/unit.c, libparted/timer.c:
* libparted/cs/natmath.c, libparted/cs/constraint.c:
* libparted/tests/label.c, libparted/tests/common.c:
* libparted/fs/fat/count.c, libparted/fs/fat/bootsector.c:
* libparted/fs/fat/context.c, libparted/fs/fat/fatio.c:
* libparted/fs/fat/fat.c, libparted/fs/fat/clstdup.c:
* libparted/fs/fat/resize.c, libparted/fs/fat/traverse.c:
* libparted/fs/fat/table.c, libparted/fs/fat/calc.c:
* libparted/fs/amiga/amiga.c, libparted/labels/fdasd.c:
* libparted/labels/dvh.c, libparted/labels/efi_crc32.c:
* libparted/labels/vtoc.c, parted/command.c:
* libparted/tests/label.c, libparted/tests/common.c:
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
* libparted/libparted.c: Include "configmake.h" for LOCALEDIR defn.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
parted: Detect/report stdout write errors.
* parted/parted.c: Include "closeout.h" for close_stdout.
Include "configmake.h" for LOCALEDIR definition.
Include "version-etc.h" for version_etc prototype.
Declare global, program_name.
(PROGRAM_NAME, AUTHORS): Define.
(_version): Use gnulib's version_etc.
(main): Set program_name.
Use atexit to close stdout carefully upon exit.
Jim Meyering [Sun, 25 Feb 2007 17:44:29 +0000 (18:44 +0100)]
Include <config.h>, not "../config.h".
Jim Meyering [Sun, 25 Feb 2007 17:43:53 +0000 (18:43 +0100)]
Begin adjusting Makefile.am files to use gnulib.
* libparted/Makefile.am (partedincludedir): Add -I$(top_srcdir)/lib.
* parted/Makefile.am (parted_LDADD): Add lib/libparted.la.
(partedincludedir): Add -I$(top_srcdir)/lib.
Jim Meyering [Sun, 25 Feb 2007 17:38:41 +0000 (18:38 +0100)]
Update to use gnulib, and newer autoconf, automake conventions.
Add build-from-checkout instructions.
* README-hacking: New file. Mostly copied from coreutils'
README-cvs.
* bootstrap: Generate ChangeLog here, if needed/possible,
before invoking tools that require its presence.
* autogen.sh: Remove this file. It's superseded by bootstrap.
Use gnulib, modernize some uses of autoconf, automake, etc.
* bootstrap, bootstrap.conf: New files.
* configure.ac: Modernize.
Require the latest stable releases: autoconf-2.61, automake-1.10.
Require gettext-0.15.
Use more modern form of AC_INIT, etc.
Now that the version string must be hard-coded in the AC_INIT line,
add code to ensure it agrees with the PED_* and LT_* variables.
Use AM_CPPFLAGS, not CFLAGS
Remove obsolete setting of ALL_LINGUAS.
Don't set CFLAGS=-D_GNU_SOURCE=1 explicitly , since that's already
done via AC_GNU_SOURCE, which gnulib pulls in by default,
through gl_EARLY.
Use gl_INIT and gl_EARLY.
* Makefile.am (SUBDIRS): Add lib.
(EXTRA_DIST): Remove names that are automatically included.
* lib/Makefile.am: New file.
Anant Narayanan [Fri, 23 Feb 2007 10:48:31 +0000 (16:18 +0530)]
Fix memleaks. Patch thanks to Mike Hommey
Debarshi Ray [Mon, 19 Feb 2007 05:28:46 +0000 (10:58 +0530)]
Introduced MAINTAINERCLEANFILES in Makefile.am for carrying out 'make maintainer-clean'.
Debarshi Ray [Mon, 19 Feb 2007 03:39:44 +0000 (09:09 +0530)]
Cleaning up nested structs & unions.
Jim Meyering [Fri, 16 Feb 2007 14:55:40 +0000 (15:55 +0100)]
Avoid compiler warnings with gcc -Wall -Wshadow.
* 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>
Jim Meyering [Thu, 15 Feb 2007 15:05:17 +0000 (16:05 +0100)]
* libparted/labels/rdb.c (amiga_read): Remove decl of unused local(s).
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Thu, 15 Feb 2007 14:56:23 +0000 (15:56 +0100)]
* libparted/labels/bsd.c (bsd_partition_new): Remove unused label.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Thu, 15 Feb 2007 14:53:44 +0000 (15:53 +0100)]
* libparted/labels/dasd.c: Remove unused labels and declarations
of unused variables.
Signed-off-by: Jim Meyering <jim@meyering.net>
Debarshi Ray [Fri, 16 Feb 2007 04:40:17 +0000 (10:10 +0530)]
Fix the style of typedef, enum, struct and __attribute__ ((packed)).
Debarshi Ray [Thu, 15 Feb 2007 04:55:41 +0000 (10:25 +0530)]
Deprecating ped_[register|unregister]_disk_type in favour of ped_disk_type_[register|unregister].
Jim Meyering [Tue, 13 Feb 2007 21:51:56 +0000 (22:51 +0100)]
Use lighter-weight fputs and putchar in place of printf, when possible.
* parted/ui.c (wipe_line, _dump_history, reset_env):
(sigsegv_handler, sigfpe_handler, sigill_handler, _readline):
(help_msg, interactive_mode, non_interactive_mode): Use puts,
fputs, and putchar in place of printf, when possible.
(reset_env): Correct misleading indentation.
(wipe_line): Split a long string.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Wed, 14 Feb 2007 11:37:45 +0000 (12:37 +0100)]
Make it so "make distcheck" passes.
* doc/po4a.mk (updatepo): Don't choke when *.$(lang).po matches no file.
* doc/C/Makefile.am (updatepo): Don't do anything when $(srcdir) is not writable.
Signed-off-by: Jim Meyering <jim@meyering.net>
Debarshi Ray [Wed, 14 Feb 2007 16:49:42 +0000 (22:19 +0530)]
Fixed the copyright notices.
Debarshi Ray [Wed, 14 Feb 2007 16:09:57 +0000 (21:39 +0530)]
Cleaned up the formatting of AUTHORS.
Debarshi Ray [Wed, 14 Feb 2007 14:55:12 +0000 (20:25 +0530)]
Tidying up the formatting and comments in linux_swap.c.
Jim Meyering [Tue, 13 Feb 2007 20:02:08 +0000 (21:02 +0100)]
Don't define _GNU_SOURCE manually.
It's better not to define _GNU_SOURCE manually.
By using AC_GNU_SOURCE, you get the definition in exactly one place:
in config.h. I verified that each affected file also includes config.h.
Don't define _GNU_SOURCE manually.
* configure.ac: Use AC_GNU_SOURCE instead.
* libparted/arch/gnu.c: Remove definition of _GNU_SOURCE.
* libparted/arch/linux.c: Likewise.
* libparted/device.c: Likewise.
* parted/table.c: Likewise.
* parted/table.h: Likewise.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Tue, 13 Feb 2007 16:10:18 +0000 (17:10 +0100)]
Remove some #ifdefs
Remove some #ifdefs.
* parted/table.c (L_): define.
Remove in-function #ifdefs; use L_(str) instead.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Tue, 13 Feb 2007 16:08:35 +0000 (17:08 +0100)]
* libparted/labels/fdasd.c (GETARG): Remove unused definition.
A tiny change...
Signed-off-by: Jim Meyering <jim@meyering.net>
Otavio Salvador [Tue, 13 Feb 2007 11:44:33 +0000 (09:44 -0200)]
Create 'm4' directory when generating the building system
Jim Meyering [Mon, 12 Feb 2007 22:30:46 +0000 (23:30 +0100)]
Work with automake-1.10.
I've just tried building parted from scratch (running ./autogen.sh
after git-clone) and hit a couple of snags:
Without aclocal's -I m4, ./autogen.sh produced this:
configure.ac:192: warning: macro `AM_GNU_GETTEXT_VERSION' not found in library
configure.ac:193: warning: macro `AM_GNU_GETTEXT' not found in library
configure.ac:192: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
With automake-1.10, I got this:
parted/Makefile.am:5: compiling `command.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
Here's a patch that fixes those and also removes some trailing blanks.
Jim Meyering [Mon, 12 Feb 2007 22:35:30 +0000 (23:35 +0100)]
Compile warning-free with "gcc -Wall -Wshadow".
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>
Jim Meyering [Mon, 12 Feb 2007 22:38:07 +0000 (23:38 +0100)]
configure.ac: Add LOCALEDIR definition to CFLAGS only once.
I noticed that there were two identical lines in configure.ac,
adding the same LOCALEDIR definition to CFLAGS.
This change removes the latter.
* configure.ac: Add LOCALEDIR definition to CFLAGS only once.
Signed-off-by: Jim Meyering <jim@meyering.net>
Riccardo Setti [Mon, 12 Feb 2007 12:24:29 +0000 (13:24 +0100)]
Added a pkgconfig file for libparted, adjusted Makefile.am and configure.ac for reflect the canges
modified: Makefile.am
modified: configure.ac
new file: libparted.pc.in
Debarshi Ray [Tue, 30 Jan 2007 20:31:43 +0000 (02:01 +0530)]
Renaming PARTITION_EXT to PARTITION_DOS_EXT in MSDOS disk-label code, to maintain similarity with Linux v2.6.18.2
Debarshi Ray [Wed, 17 Jan 2007 13:26:46 +0000 (18:56 +0530)]
Enable support for swsusp partitions, and the ability to differentiate between old and new versions of linux-swap partitions. Changed the swap_init signature and removed extra ped_geometry_read from _swap*_open.
Debarshi Ray [Tue, 16 Jan 2007 17:43:09 +0000 (23:13 +0530)]
Synchronize the linux-swap (new version) header according to the Linux kernel sources.
Debarshi Ray [Tue, 16 Jan 2007 17:11:47 +0000 (22:41 +0530)]
Debarshi Ray [Tue, 16 Jan 2007 01:13:36 +0000 (06:43 +0530)]
Add stdint.h stdlib.h & string.h to include/parted/parted.h and remove them from other files.
Debarshi Ray [Sun, 14 Jan 2007 15:36:58 +0000 (21:06 +0530)]
Synchronise manual page and --help documentation.