OSDN Git Service

android-x86/external-parted.git
17 years ago[tests] Separate and improved test for reading of disk labels.
Debarshi Ray [Tue, 1 May 2007 04:31:50 +0000 (10:01 +0530)]
[tests] Separate and improved test for reading of disk labels.

17 years agoFix endianness bugs
Matthew Harris [Tue, 24 Apr 2007 15:13:41 +0000 (08:13 -0700)]
Fix endianness bugs

17 years agoAdd integration tests, then adjust code so that they pass.
Jim Meyering [Thu, 26 Apr 2007 21:17:32 +0000 (23:17 +0200)]
Add integration tests, then adjust code so that they pass.
These changes affect how --script (-s) works, and when diagnostics
are displayed.
* Makefile.am (SUBDIRS): Add tests.
* configure.ac (AC_OUTPUT): Add tests/Makefile.
* tests/Makefile.am: New file.
* tests/part-01, tests/label-01: New files.
* tests/part-02, tests/label-02: New files.
* parted/parted.c (enum) [PRETEND_INPUT_TTY]: Define.
Support a new, undocumented option: ---pretend-input-tty.
It is intended solely for testing.  The leading '---' ensures
that it will never conflict with a "regular" long option.
(do_mkpartfs): Prompt only when not in script mode.
Call ped_exception_leave_all() to decrement global counter.
Without this, the use of parted in tests/part-01 would still fail,
but would not issue the diagnostic explaining why.
* parted/ui.h (pretend_input_tty): Declare new global.
* parted/ui.c (exception_handler): Let the new "pretend_input_tty"
option override "!isatty (0)".
(init_ui): Don't set opt_script_mode.
* tests/lang-default, tests/priv-check: New files.

17 years agoTemporarily disable the clone-dvh-label test.
Jim Meyering [Thu, 26 Apr 2007 19:54:51 +0000 (21:54 +0200)]
Temporarily disable the clone-dvh-label test.
* libparted/tests/label.c (test_clone_label):

17 years ago[PATCH] Avoid warning from -Wformat-security; tweak error diagnostic.
Jim Meyering [Sat, 21 Apr 2007 16:59:43 +0000 (18:59 +0200)]
[PATCH] Avoid warning from -Wformat-security; tweak error diagnostic.

* parted/parted.c (_parse_options): Upon failure, output diagnostic
to stderr, not stdout.  Use "program_name" value, not literal "parted".

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago[tests] New test for probing of disk labels.
Debarshi Ray [Fri, 20 Apr 2007 19:29:15 +0000 (00:59 +0530)]
[tests] New test for probing of disk labels.

17 years agoRevert "[libparted] dvh label fixes"
Otavio Salvador [Fri, 20 Apr 2007 15:03:45 +0000 (12:03 -0300)]
Revert "[libparted] dvh label fixes"

This reverts commit dcf8e966abf997b9df69b1664c470ed2aa5c166b.

17 years ago[libparted] dvh label fixes
Otavio Salvador [Fri, 20 Apr 2007 15:01:37 +0000 (12:01 -0300)]
[libparted] dvh label fixes

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Simplify test_clone_label removing the label reading test
Otavio Salvador [Fri, 20 Apr 2007 06:53:18 +0000 (03:53 -0300)]
[tests] Simplify test_clone_label removing the label reading test

Since the test_create_label already tests the label reading we
shouldn't redo it. It's always better to have simple tests so is much
easier to find the bugs.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Trivial coding style fixes around the tests code
Otavio Salvador [Fri, 20 Apr 2007 03:37:07 +0000 (00:37 -0300)]
[tests] Trivial coding style fixes around the tests code

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Add _test_exception_handler to fail every time an exception is raised
Otavio Salvador [Fri, 20 Apr 2007 00:30:53 +0000 (21:30 -0300)]
[tests] Add _test_exception_handler to fail every time an exception is raised

Sometimes parts of code raises exceptions and this shouldn't happen on
tests. To ensure we catch them a specific exception handler has been
implemented.

The handler usage is very easy. You just need to put the following
code at testsuite main method:

...
        /* Fail when an exception is raised */
        ped_exception_set_handler (_test_exception_handler);
...

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] New test for cloning of disk labels.
Debarshi Ray [Fri, 20 Apr 2007 00:19:44 +0000 (05:49 +0530)]
[tests] New test for cloning of disk labels.

17 years ago[tests] Fix spacing around brackets and asterisks.
Debarshi Ray [Thu, 19 Apr 2007 19:30:50 +0000 (01:00 +0530)]
[tests] Fix spacing around brackets and asterisks.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years agoHandle options independent of their order.
Benno Schulenberg [Mon, 9 Apr 2007 21:34:15 +0000 (23:34 +0200)]
Handle options independent of their order.

Abort on any invalid option, and handle -v and -h first.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Small refactoring on test_create_label
Otavio Salvador [Wed, 18 Apr 2007 22:37:11 +0000 (19:37 -0300)]
[tests] Small refactoring on test_create_label

 - Destroy the temporary device once the test has been finished,
 - Use the _implemented_disk_label and _create_disk_label methods
   to avoid code duplication.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Implements _implemented_disk_label and _create_disk_label on common.[hc]
Otavio Salvador [Wed, 18 Apr 2007 22:35:57 +0000 (19:35 -0300)]
[tests] Implements _implemented_disk_label and _create_disk_label on common.[hc]

 - _implemented_disk_label: returns 0 when we haven't yet implemented
   this specific label and 1 otherwise;

 - _create_disk_label: creates a disk label of a specific type on a
   specific device;

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years ago[tests] Ensure that we're able to read the just created disk label
Otavio Salvador [Wed, 18 Apr 2007 20:05:05 +0000 (17:05 -0300)]
[tests] Ensure that we're able to read the just created disk label

To ensure we're able to read the just created disk label we introduced a call
ped_disk_new using the same loopback. This could detect bad label creating or
probing detectiong mistakes.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years agoIndentation fixes in libparted/tests/.
Debarshi Ray [Tue, 17 Apr 2007 15:38:14 +0000 (21:08 +0530)]
Indentation fixes in libparted/tests/.

17 years agoShow the update /etc/fstab message only when there has been a change to the disk...
Debarshi Ray [Mon, 16 Apr 2007 18:34:54 +0000 (00:04 +0530)]
Show the update /etc/fstab message only when there has been a change to the disk. The message is now shorter and more direct.

17 years agochange the variable named start to offset to be consistent with the doc
solsTiCe d'Hiver [Thu, 5 Apr 2007 22:01:46 +0000 (00:01 +0200)]
change the variable named start to offset to be consistent with the doc

17 years agoremove any trace of PED_PARTITION_PRIMARY which was deprecated a long time ago to...
solsTiCe d'Hiver [Thu, 5 Apr 2007 12:39:45 +0000 (14:39 +0200)]
remove any trace of PED_PARTITION_PRIMARY which was deprecated a long time ago to use PED_PARTITION_NORMAL

17 years agoAdded 'rescue', 'unit', and 'version' to the man page, plus some small edits.
Benno Schulenberg [Thu, 29 Mar 2007 17:28:25 +0000 (19:28 +0200)]
Added 'rescue', 'unit', and 'version' to the man page, plus some small edits.

17 years agoAvoid segfault due a double free on reiserfs support (patch sent by Jakub Bogusz...
Otavio Salvador [Wed, 4 Apr 2007 12:04:30 +0000 (09:04 -0300)]
Avoid segfault due a double free on reiserfs support (patch sent by Jakub Bogusz <qboosh@pld-linux.org>)

17 years agoMake the wording of warning somewhat clearer.
Benno Schulenberg [Wed, 4 Apr 2007 10:03:29 +0000 (12:03 +0200)]
Make the wording of warning somewhat clearer.

17 years agoTweak some help messages: change third person to imperative for consistency, add...
Benno Schulenberg [Mon, 26 Mar 2007 22:23:18 +0000 (00:23 +0200)]
Tweak some help messages: change third person to imperative for consistency, add single quotes and remove letters for clarity

17 years agoConditionalize the System Z stuff correctly. We get headers installed on non-System...
David Cantrell [Mon, 19 Mar 2007 18:01:46 +0000 (14:01 -0400)]
Conditionalize the System Z stuff correctly.  We get headers installed on non-System Z platforms, but the code only compiles on that platform.

17 years agoRemove the COMPILE_FOR_S390 flag-setting stuff. It wasn't correct anyway. Take...
David Cantrell [Mon, 19 Mar 2007 15:20:55 +0000 (11:20 -0400)]
Remove the COMPILE_FOR_S390 flag-setting stuff.  It wasn't correct anyway.  Take a kernel-style approach and check uname -m to see if we are on s390.  If so, we build for zSeries.  Otherwise we do not.

17 years agoSleep for one second after uploading a file to ftp-upload.gnu.org. Seems transaction...
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.

17 years agoFix for compile problems with gcc-4.1.2 as indicated here:
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

17 years agoCheck for tgetent() in libtinfo as well as ncurses, curses, termcap, and termlib.
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.

17 years agoRemove some unused variables, check the return values from fgets() and asprintf(...
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.

17 years agoInclude vtoc.h for the format1_label_t typedef.
David Cantrell [Mon, 19 Mar 2007 15:19:27 +0000 (11:19 -0400)]
Include vtoc.h for the format1_label_t typedef.

17 years agoRemove GNU make-specific things from po4a.mk.
David Cantrell [Mon, 19 Mar 2007 18:20:52 +0000 (14:20 -0400)]
Remove GNU make-specific things from po4a.mk.

17 years agoInstall the libparted.pc file, not the libparted.pc.in file.
David Cantrell [Fri, 16 Mar 2007 19:18:08 +0000 (15:18 -0400)]
Install the libparted.pc file, not the libparted.pc.in file.

17 years agoMore spec file template cleanups.
David Cantrell [Fri, 16 Mar 2007 19:19:57 +0000 (15:19 -0400)]
More spec file template cleanups.

17 years agoUpdated the release script to work with the new source layout.
David Cantrell [Fri, 16 Mar 2007 20:09:08 +0000 (16:09 -0400)]
Updated the release script to work with the new source layout.

17 years agoFixed faulty information in README-hacking (Bison is not a maintainer tool for Parted...
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).

17 years agopo/POTFILES.in: Add lib/getopt.c
Jim Meyering [Fri, 16 Mar 2007 09:59:19 +0000 (10:59 +0100)]
po/POTFILES.in: Add lib/getopt.c

17 years agoPrevented DASD specific headers and sources from being compiled/installed on non...
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.

17 years agoMove static variable flagging little endian or not to journal.c. We don't want stati...
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.

17 years agoModernize the spec file template.
David Cantrell [Tue, 13 Mar 2007 21:34:05 +0000 (17:34 -0400)]
Modernize the spec file template.

17 years agoIgnore more files.
David Cantrell [Tue, 13 Mar 2007 21:33:44 +0000 (17:33 -0400)]
Ignore more files.

17 years agoPatch from Matthew Garrett <mjg59@srcf.ucam.org> to add HFS+ resize support.
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.

17 years agohfs.c: Detect write failure.
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.

17 years ago aix.c: Avoid memory overrun. Don't assume logical sector size <= 512B
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.

17 years ago Use PED_SECTOR_SIZE_DEFAULT not 512
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):

17 years ago* parted/ui.c (non_interactive_mode): Plug a tiny leak.
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".

17 years agolinux.c: Avoid memory overrun. Handle 2048-byte logical sectors.
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.

17 years agoDon't use deprecated mktemp, to avoid linker warning
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.

17 years ago* libparted/tests/label.c: Plug a trivial leak.
Jim Meyering [Thu, 8 Mar 2007 00:04:44 +0000 (01:04 +0100)]
* libparted/tests/label.c: Plug a trivial leak.

17 years agoMerge branch 'master' of git+ssh://rishi-guest@git.debian.org/git/parted/parted
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

17 years agoReplaced [f]printf with fput[c|s] globally.
Debarshi Ray [Wed, 7 Mar 2007 20:18:30 +0000 (01:48 +0530)]
Replaced [f]printf with fput[c|s] globally.

17 years agolibparted/unit.c: constify interfaces
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):

17 years agoDeclare some static arrays to be "const".
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):

17 years ago* configure.ac: Fix a typo: s/have_scintilla/have_check/
Jim Meyering [Wed, 7 Mar 2007 17:58:29 +0000 (18:58 +0100)]
* configure.ac: Fix a typo: s/have_scintilla/have_check/

17 years agotests/label: Don't dereference NULL if open fails.
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.

17 years agoAdd "const" to parameters in these public interfaces.
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.

17 years agoUse <config.h> consistently, not "config.h".
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.

17 years agostart_pos is a PedSector, not a PedGeometry.
David Cantrell [Tue, 6 Mar 2007 22:19:31 +0000 (17:19 -0500)]
start_pos is a PedSector, not a PedGeometry.

17 years agoPreserve starting sector for primary NTFS 3.1 partitions (Windows Vista)
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.

17 years agoPatched parted.8 man page to show partition names apply to GPT disk labels
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.

17 years agoReplaced [f]printf with fput[c|s] in libparted/fs/ext2/ext2_block_relocator.c.
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.

17 years agoRe-arranging .gitignore in alphabetical order.
Debarshi Ray [Tue, 6 Mar 2007 11:08:33 +0000 (16:38 +0530)]
Re-arranging .gitignore in alphabetical order.

17 years agoDefined a dummy '_dump_history' function in parted/ui.c when Readline is absent....
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.

17 years agoAdded libparted/tests/label to .gitignore.
Debarshi Ray [Tue, 6 Mar 2007 10:21:58 +0000 (15:51 +0530)]
Added libparted/tests/label to .gitignore.

17 years agoFixed parted/ui.c to incorporate signal handlers for systems lacking 'sigaction'...
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.

17 years agoUndo part of the dos.c constification.
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.

17 years agoHide two unnecessarily-"extern" functions.
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.

17 years ago* libparted/labels/dos.c: Complete constification of this file.
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.

17 years ago* po/POTFILES.in: Add partprobe/partprobe.c, now that it contains
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.

17 years agoMake partprobe accept --help and --version options.
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.

17 years agoMake clearfat accept --help and --version options.
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.

17 years ago* include/parted/disk.h (struct _PedDiskOps) [write]: Change
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".

17 years agoBegin making libparted/labels/*.c const-correct.
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.

17 years agoAvoid a libtool warning:
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.

17 years agoMake "make distcheck" work better.
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).

17 years agoAvoid recursive "LIBS = ... $(LIBS)" assignments.
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.

17 years agoUse $(VAR), rather than obsolescent @VAR@ automake notation.
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.

17 years agoEnable the po-check rule.
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.

17 years agoAdd infrastructure for more rigorous "make distcheck" rules.
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.

17 years agoFixing indentation in parted/ui.c. Replaced TABs with spaces to ensure uniformity...
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.

17 years agoFixing indentation in parted/ui.c.
Debarshi Ray [Wed, 28 Feb 2007 15:31:52 +0000 (21:01 +0530)]
Fixing indentation in parted/ui.c.

17 years agoNormalize the way we handle a generated-and-distributed file, parted.spec.
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.

17 years agoAdd -I$(top_srcdir)/lib, required for new use of close_stdout.
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):

17 years agoArrange for "make distcheck" to be stricter.
Jim Meyering [Tue, 27 Feb 2007 12:16:44 +0000 (13:16 +0100)]
Arrange for "make distcheck" to be stricter.

17 years ago* bootstrap: new file.
Jim Meyering [Mon, 26 Feb 2007 23:43:55 +0000 (00:43 +0100)]
* bootstrap: new file.

17 years agoFixing libparted/arch/gnu.c to remove build-time errors.
Debarshi Ray [Mon, 26 Feb 2007 22:32:44 +0000 (04:02 +0530)]
Fixing libparted/arch/gnu.c to remove build-time errors.

17 years agopartprobe: Detect/report any error when writing to stdout.
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.

17 years agoAdd a bunch of .gitignore files.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
Add a bunch of .gitignore files.

17 years ago Avoid a gcc format warning:
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.

17 years ago Remove now-generated files.
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.

17 years ago mv parted.m4 into new dir, m4/
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.

17 years ago * libparted/tests/label.c: Fail if _create_disk returns NULL.
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.

17 years ago Include <config.h> from every .c file:
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:

17 years ago * libparted/libparted.c: Include "configmake.h" for LOCALEDIR defn.
Jim Meyering [Sun, 25 Feb 2007 17:44:30 +0000 (18:44 +0100)]
* libparted/libparted.c: Include "configmake.h" for LOCALEDIR defn.

17 years agoparted: Detect/report stdout write errors.
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.

17 years agoInclude <config.h>, not "../config.h".
Jim Meyering [Sun, 25 Feb 2007 17:44:29 +0000 (18:44 +0100)]
Include <config.h>, not "../config.h".

17 years agoBegin adjusting Makefile.am files to use gnulib.
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.

17 years agoUpdate to use gnulib, and newer autoconf, automake conventions.
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.

17 years agoFix memleaks. Patch thanks to Mike Hommey
Anant Narayanan [Fri, 23 Feb 2007 10:48:31 +0000 (16:18 +0530)]
Fix memleaks. Patch thanks to Mike Hommey