OSDN Git Service
Joel Granados Moreno [Wed, 15 Jul 2009 10:03:48 +0000 (12:03 +0200)]
Document our release proceedure.
* README-release: New file.
Joel Granados Moreno [Mon, 13 Jul 2009 16:01:48 +0000 (18:01 +0200)]
Update the NEWS file for the next release.
* NEWS : Describe some of the latest bugfixes and behavioral changes.
Jim Meyering [Thu, 23 Jul 2009 08:47:50 +0000 (10:47 +0200)]
build: update from gnulib, for fixed maint.mk
* gnulib: Update submodule to latest.
Jim Meyering [Wed, 22 Jul 2009 21:37:45 +0000 (23:37 +0200)]
build: avoid "make dist-hook" failure
* Makefile.am (dist-hook): Remove coreutils-specific rm-substitution.
Jim Meyering [Wed, 22 Jul 2009 18:18:52 +0000 (20:18 +0200)]
build: avoid automake warning
* libparted/Makefile.am (SUBDIRS_CHECK): Do not redefine.
Instead, append to existing value.
Jim Meyering [Sun, 19 Jul 2009 18:09:29 +0000 (20:09 +0200)]
build: adjust Makefiles
* libparted/Makefile.am (ARCH_SOURCE): Factor out duplication.
* libparted/labels/Makefile.am (partedincludedir): Split long line.
Otavio Salvador [Sun, 19 Jul 2009 12:03:59 +0000 (09:03 -0300)]
Avoid compilation failure on s390
To export LinuxSpecific stuff for labels, in this case fdasd, we now
provide arch/linux.h. This aids in avoiding code duplication.
* configure.ac: add BUILD_LINUX conditional.
* libparted/Makefile.am: conditionally use linux.h.
* libparted/arch/linux.c: move LinuxSpecific stuff to linux.h.
* libparted/arch/linux.h: New file.
* libparted/labels/Makefile.am: include from libparted as well.
* libparted/labels/dasd.c: use arch/linux.h and use dev->path for
error message.
* libparted/labels/fdasd.c: include linux.h and drop an unused
variable.
Jim Meyering [Thu, 16 Jul 2009 14:21:29 +0000 (16:21 +0200)]
build: avoid configure-time syntax error
Running ./configure on a system without devmapper devel libraries
would provoke this:
./configure: line 264: return: but: numeric argument required
./configure: line 24783: --enable-device-mapper: command not found
* configure.ac: Add quotes to most AC_MSG_ERROR uses, both around
the argument, and (when needed) around the macro use itself.
Jim Meyering [Fri, 26 Jun 2009 15:25:16 +0000 (17:25 +0200)]
ui: avoid NULL dereference on realloc failure
* parted/strlist.c (gettext_to_wchar) [ENABLE_NLS]: Use xrealloc,
so we never return NULL, which could then be dereferenced.
Colin Watson [Fri, 10 Jul 2009 11:42:14 +0000 (12:42 +0100)]
Rationalise linux-swap fs names, and add a "linux-swap" alias
* 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.
Jim Meyering [Thu, 9 Jul 2009 17:36:46 +0000 (19:36 +0200)]
tests: disable the taint-distcheck rule
* dist-check.mk (taint-distcheck): Disable rule, since it
would trigger a bug in libtool-generated scripts.
Jim Meyering [Thu, 9 Jul 2009 17:07:01 +0000 (19:07 +0200)]
tests: better quoting to avoid failure with poorly-named src directory
* libparted/tests/Makefile.am (init.sh): Quote, in case
$(abs_top_srcdir) contains e.g., spaces.
* tests/Makefile.am (init.sh): Likewise.
* libparted/tests/t2000-disk.sh: Better quoting here, too.
* libparted/tests/t1000-label.sh: Likewise.
Reported by Joel Granados
Jim Meyering [Thu, 9 Jul 2009 16:07:28 +0000 (18:07 +0200)]
build: update from gnulib
* gnulib: Update submodule to latest.
* cfg.mk (local-checks-to-skip): Add sc_require_test_exit_idiom.
This skips a new-from-gnulib test that doesn't apply here.
Joel Granados Moreno [Wed, 3 Jun 2009 18:36:56 +0000 (20:36 +0200)]
tests: ensure that we preserve the first 446 byts of a GPT pmbr
* tests/t0202-gpt-pmbr.sh: Ensure that the first 446 bytes are
unchanged after creating a GPT partition.
Joel Granados Moreno [Wed, 3 Jun 2009 18:36:55 +0000 (20:36 +0200)]
gpt: preserve first 446 bytes of the PMBR (protective MBR)
* libparted/label/gpt.c (_write_pmbr): Make sure we read and preserve
the first 446 bytes of the device when we are creating the PMBR.
Jim Meyering [Wed, 17 Jun 2009 11:53:47 +0000 (13:53 +0200)]
build: update from gnulib
* gnulib: Update submodule to latest.
Jim Meyering [Wed, 17 Jun 2009 09:31:35 +0000 (11:31 +0200)]
build: require autoconf-2.63 and automake-1.11
* configure.ac (AC_PREREQ): Require 2.63, not 2.61.
(AM_INIT_AUTOMAKE): Require 1.11, not 1.10c.
Colin Watson [Tue, 16 Jun 2009 17:09:45 +0000 (18:09 +0100)]
linux-swap: generate UUIDs for fresh swap spaces
* libparted/fs/linux_swap/linux_swap.c: Generate a UUID when creating a
fresh swap space.
* tests/t2100-mkswap.sh: Test that two fresh swap spaces get different
UUIDs, and that 'check' preserves the swap UUID.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:53 +0000 (19:05 +0200)]
tests: simplify t6001-dm-ignoremd.sh
* tests/t6001-dm-ignoremd.sh (md_dev_create_): Use functions in
test-util.sh for mdadm commands. Move mddev_ to the top of the
file. Remove unneeded comment.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:54 +0000 (19:05 +0200)]
tests: add mdadm specific functions
* tests/test-lib.sh (require_mdadm_): New function.
(mdadm_create_linear_device_): New function.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:51 +0000 (19:05 +0200)]
doc: improve mkpart description
* doc/parted.texi: Make sure that part-type is portrayed as an
optional argument. Mention the "special behavior" that mkpart has
with specific disk label types.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:50 +0000 (19:05 +0200)]
parted-ui: ensure cmd-line buffer is empty before ped_exception_throw
When ped_exception_throw requires input from the user and there are
leftover strings in the command line, there is an "invalid token" error
from parted. This happens because the ped_exception expects some input
that is, most likely, different from the leftover string(s). To address
this, one must make sure that all the argument strings are parsed before
invoking any exception that requires input.
* parted/parted.c (do_mklabel): Call command_line_get_disk_type call
before the disk checks (_disk_warn_loss will call ped_exception_throw).
* tests/t0000-basic.sh: Adjust, now that the output need not include
the error message.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:49 +0000 (19:05 +0200)]
tests: verify that "md" devices are not listed
* tests/t6001-dm-ignored.sh: New test file.
* tests/Makefile.am (TESTS): Add it.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:48 +0000 (19:05 +0200)]
linux: skip "md" devices when probing
* libparted/arch/linux.c (_skip_entry) : Add "md" to the entries
array so all devices of type "/dev/md#" get ignored.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:47 +0000 (19:05 +0200)]
fat: support 64KB clusters for FAT16
* libparted/fs/fat/calc.c (fat_max_cluster_size): A 64KB cluster
size (128 sectors) for FAT16 is not common but is possible. Allow
the use of 128-sector clusters instead of outputting an error.
Fixes this:
http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/207
Additional info here:
http://lists.alioth.debian.org/\
pipermail/parted-devel/2009-June/002882.html
Matthew S. Harris [Wed, 10 Jun 2009 17:05:46 +0000 (19:05 +0200)]
gpt: fix gpt_read to read all of the partition entries correctly
* libparted/labels/gpt.c (gpt_read): Use the SizeOfPartitionEntry
field value when reading the partition entries rather than assuming
that the entries are the same size as our struct.
(gpt_read): When reading the partition
entries, round up, not down, the number of sectors to read.
(_header_is_valid): Check that the SizeOfPartitionEntry is sane.
With minor adjustments by Joel Granados Moreno.
Joel Granados Moreno [Wed, 10 Jun 2009 17:05:55 +0000 (19:05 +0200)]
Tweak distcheck.
* dist-check.mk (install-transform-check): The binaries will be located
in /sbin instead of /bin.
Jim Meyering [Wed, 3 Jun 2009 10:28:01 +0000 (12:28 +0200)]
build: require automake-1.11 via bootstrap.conf, too
* bootstrap.conf (buildreq): s/1.10c/1.11/
Jim Meyering [Wed, 3 Jun 2009 10:14:05 +0000 (12:14 +0200)]
doc: sync README-hacking from coreutils
* README-hacking: update
Jim Meyering [Wed, 3 Jun 2009 09:54:32 +0000 (11:54 +0200)]
build: rename internal library: lib/libparted -> lib/libgnulib
* bootstrap.conf (gnulib_name): Define gnulib_name=libgnulib.
* libparted/Makefile.am (libparted_la_LIBADD): Update sole use.
Jim Meyering [Wed, 3 Jun 2009 08:29:36 +0000 (10:29 +0200)]
libparted: link with gnulib
* libparted/Makefile.am (libparted_la_LIBADD): Add
$(top_builddir)/lib/libparted.la to the list.
* partprobe/Makefile.am (partprobe_LDADD): Remove now-unneeded
$(top_builddir)/lib/libparted.la.
* libparted/tests/Makefile.am (LDADD): Remove now-unneeded
$(top_builddir)/lib/libparted.la.
* debug/clearfat/Makefile.am (clearfat_LDADD): Likewise.
* parted/Makefile.am (parted_LDADD): Likewise.
Otavio Salvador reported that linking with the resulting shared
library produced an unresolved reference to last_component.
Jim Meyering [Tue, 26 May 2009 12:36:18 +0000 (14:36 +0200)]
tests: adjust t4100-msdos-starting-sector.sh
* tests/t4100-msdos-starting-sector.sh: Use parted's -m option
when printing, and adjust expected output to match.
Filter out "Disk...:" part to avoid false-positive failures due
to mount-point- related differences.
Joel Granados Moreno [Wed, 13 May 2009 15:24:33 +0000 (17:24 +0200)]
Add test for msdos starting sector.
* tests/t4100-msdos-starting-sector.sh : Make sure we are consistent
when displaying starting sector for msdos lables.
Joel Andres Granados [Wed, 13 May 2009 15:24:32 +0000 (17:24 +0200)]
Make sure we always create msdos metadata parts.
Given a disk with no partition, parted did not create metadata
partitions for an msdos label. This led to inconsistencies when
reporting free space partition ranges. This patch addresses this issue.
* libparted/labels/dos.c (get_last_part): Remove function.
* libparted/labels/dos.c (get_start_first_nonfree_part): New function.
* libparted/labels/dos.c (get_end_last_nonfree_part): New function.
* libparted/lables/dos.c (add_startend_metadata): Add code that
handles disks no partitions. Add check that prevents the metadata
partitions from being greater than the device length. Add check
that prevents metadata partitions from overlapping in small devs.
Joel Granados Moreno [Wed, 13 May 2009 15:24:31 +0000 (17:24 +0200)]
Improve readability in linux.c
* libparted/arch/linux.c : Gather all the _is_major functions together.
change the name of readFD to _read_fd since its not used anywhere
else. Also rename the "_is_major_type" function to
"_major_type_in_device" as it better expresses what we do in said
function.
Joel Granados Moreno [Wed, 13 May 2009 15:24:30 +0000 (17:24 +0200)]
Correctly name virtio devices.
* include/parted/device.h (PedDeviceType): Add a new PED_DEVICE_VIRTBLK
type to the list.
* libparted/arch/linux.c (_is_dm_major): Modify this function so it
calls the new _is_major_type function with type "device-mapper".
* libparted/arch/linux.c (_is_major_type): Searches a major number
inside /proc/devices based on a "type" string.
* libparted/arch/linux.c (_is_virtblk_major): New function. Calls
_is_major_type with type "virtblk".
* libparted/arch/linux.c (_device_probe_type): Add a new
PED_DEVICE_VIRTBLK case to the probe possibilities.
* libparted/arch/linux.c (linux_new): Add a new PED_DEVICE_VIRTBLK case
to the possible device types.
* parted/parted.c (do_print): add the "virtblk" string to the transport
array.
Otavio Salvador [Sun, 24 May 2009 00:01:07 +0000 (21:01 -0300)]
Makefile.am: fail if ABI has changed
Otavio Salvador [Sat, 23 May 2009 23:04:26 +0000 (20:04 -0300)]
configure.ac: fix PED_MINOR_VERSION sed expression
Otavio Salvador [Sat, 23 May 2009 22:58:56 +0000 (19:58 -0300)]
add build-aux to .gitignore
Joel Granados Moreno [Thu, 14 May 2009 17:06:53 +0000 (19:06 +0200)]
build: enable device mapper support by default
* configure.ac: Device mapper is ubiquitous enough: enable by default.
Adjust --help and diagnostics to reflect the new default.
Jim Meyering [Fri, 15 May 2009 14:29:37 +0000 (16:29 +0200)]
portability: don't perform pointer arithmetic on a "void *" pointer
* libparted/arch/linux.c (_dm_remove_parts) [ENABLE_DEVICE_MAPPER]:
Don't perform pointer arithmetic on a "void *" pointer.
Interpose a (char *) cast.
Jim Meyering [Fri, 15 May 2009 13:13:14 +0000 (15:13 +0200)]
maint: cfg.mk: remove now-unnecessary gnulib_dir definition
* cfg.mk (gnulib_dir): Remove definition, now that gnulib's
maint.mk provides the default we want.
Jim Meyering [Fri, 15 May 2009 13:12:19 +0000 (15:12 +0200)]
build: require 1.10c (get it by building from automake.git)
* bootstrap.conf (buildreq): Require 1.10c (1.11 is coming soon)
for our use of AM_SILENT_RULES.
* configure.ac (AM_INIT_AUTOMAKE): Require 1.10c, for our use of
AM_SILENT_RULES. Reported by Joel Granados.
Jim Meyering [Fri, 15 May 2009 13:17:20 +0000 (15:17 +0200)]
build: update from gnulib, for newer maint.mk and more
* gnulib: Update submodule to latest.
Jim Meyering [Fri, 15 May 2009 13:33:49 +0000 (15:33 +0200)]
build: use gnulib's vc-list-files module
* bootstrap.conf (gnulib_modules): Add vc-list-files, so we pull
this file from gnulib.
* build-aux/vc-list-files: Remove now-outdated file.
Jim Meyering [Sun, 26 Apr 2009 18:08:16 +0000 (20:08 +0200)]
build: accommodate maint.mk, now that it's pulled from gnulib
* dist-check.mk: New file, from coreutils. Was part of maint.mk.
* cfg.mk (old_NEWS_hash): Include $(srcdir)/dist-check.mk.
Remove trailing " -", to align with new check in maint.mk.
* Makefile.am (EXTRA_DIST): Add dist-check.mk.
Jim Meyering [Sun, 26 Apr 2009 14:24:35 +0000 (16:24 +0200)]
build: use gnulib's dirname module
* bootstrap.conf (gnulib_modules): Add dirname.
Jim Meyering [Sun, 26 Apr 2009 14:25:28 +0000 (16:25 +0200)]
build: make automake's silent-rules option the default
* configure.ac (AM_INIT_AUTOMAKE): Remove silent-rules. Instead,...
(AM_SILENT_RULES): Use this, with it's undocumented [yes] argument.
Those who want verbose build output may configure with
--disable-silent-rules or use "make V=1".
Jim Meyering [Sun, 26 Apr 2009 14:21:51 +0000 (16:21 +0200)]
build: stop using obsolete gnulib modules
* bootstrap.conf (obsolete_gnulib_modules): Remove.
(gnulib_modules): Remove use.
Jim Meyering [Sun, 26 Apr 2009 14:20:02 +0000 (16:20 +0200)]
build: use maint.mk from gnulib
* maint.mk: Remove file. Now it's generated.
* .gitignore: Ignore it.
* bootstrap.conf (gnulib_modules): Add maintainer-makefile.
* gnulib: Update submodule to latest.
Jim Meyering [Sat, 11 Apr 2009 20:38:50 +0000 (22:38 +0200)]
maint: use a git submodule for gnulib
* .gitmodules: New file, to track gnulib.
* gnulib: New file, created by running this:
git submodule add git://git.sv.gnu.org/gnulib.git gnulib
Jim Meyering [Fri, 10 Apr 2009 07:59:52 +0000 (09:59 +0200)]
maint: sync from coreutils
* maint.mk: Sync from coreutils.
* bootstrap: Likewise.
Jim Meyering [Wed, 8 Apr 2009 20:40:23 +0000 (22:40 +0200)]
build-from-git: depend on automake-1.10b
* bootstrap.conf (buildreq): Note the automake-1.10b requirement.
* configure.ac (AM_INIT_AUTOMAKE): Enable new automake options:
dist-xz, color-tests, parallel-tests, silent-rules.
Otavio Salvador [Wed, 8 Apr 2009 18:03:28 +0000 (15:03 -0300)]
bootstrap.conf: require automake 1.10 since 1.10a is an alpha version
Jim Meyering [Sat, 21 Mar 2009 16:37:31 +0000 (17:37 +0100)]
* maint.mk: merge with latest from coreutils
Jim Meyering [Sat, 21 Mar 2009 16:47:58 +0000 (17:47 +0100)]
maint: indent consistently
* doc/po4a.mk (updatepo): Replace TAB+8-spaces with two TABs.
Jim Meyering [Thu, 8 Jan 2009 13:04:06 +0000 (14:04 +0100)]
* bootstrap: sync from coreutils
Jim Meyering [Thu, 5 Mar 2009 19:45:19 +0000 (20:45 +0100)]
build: enable "make syntax-check" rule to prohibit trailing spaces
* cfg.mk (local-checks-to-skip): Remove sc_trailing_blank.
Jim Meyering [Thu, 5 Mar 2009 18:22:39 +0000 (19:22 +0100)]
remove all trailing blanks
...by running these commands:
t=$'\t'
git grep -l "[ $t]\$"|xargs perl -pi -e 's/[ \t]+$//'
Jim Meyering [Thu, 5 Mar 2009 17:49:55 +0000 (18:49 +0100)]
portability: use last_component, not basename
* libparted/arch/linux.c (read_device_sysfs_file): Use last_component
from gnulib's basename module, not the less-portable "basename" function.
(_device_get_partition_range): Likewise.
Reported by Karel Zak.
* debug/clearfat/Makefile.am (clearfat_LDADD): Link gnulib *after*
libparted, not before.
* partprobe/Makefile.am (partprobe_LDADD): Likewise.
* parted/Makefile.am (parted_LDADD): Likewise.
Karel Zak [Thu, 5 Mar 2009 17:34:47 +0000 (18:34 +0100)]
test correctly for snprintf failure
* libparted/arch/linux.c (_device_get_partition_range): Correct
test for failed snprintf.
Petr Uzel [Thu, 5 Mar 2009 15:52:20 +0000 (16:52 +0100)]
gpt: plug a memory leak in gpt_read()
* libparted/labels/gpt.c (gpt_read): Free local variable, "zeros".
Jim Meyering [Thu, 5 Mar 2009 15:28:17 +0000 (16:28 +0100)]
update some release-related administrivia
* .prev-version: Record that the previous release was 1.8.8.1.
* NEWS: Fill in the date for the previous release.
* cfg.mk (old_NEWS_hash): Update
Jim Meyering [Thu, 5 Mar 2009 15:15:56 +0000 (16:15 +0100)]
* maint.mk: Sync from coreutils.
Jim Meyering [Thu, 5 Mar 2009 14:18:02 +0000 (15:18 +0100)]
adjust "parted -s dev print" not to emit trailing spaces
* parted/table.c (table_render_row): Don't append trailing spaces
or delimiter after final field, and trim any other trailing spaces.
* tests/t5000-tags.sh: Remove trailing spaces from expected output.
Jim Meyering [Thu, 5 Mar 2009 14:33:55 +0000 (15:33 +0100)]
reword a comment; more formatting changes.
* libparted/arch/linux.c (_disk_sync_part_table): Reword comment
to use the "active" voice, not "we ...".
Adjust formatting in new/moved code.
Jim Meyering [Thu, 5 Mar 2009 10:42:45 +0000 (11:42 +0100)]
rename all "support" parameters; avoid new compiler warnings
Change each occurrence like this (which evokes a warning from gcc):
- return *supported = MAX_TOTAL_PART;
to this:
+ *max_n = MAX_TOTAL_PART;
+ return true;
I did it mostly mechanically:
cd libparted/labels &&
grep -l 'return .supported = ' *.c|xargs perl -ni \
-e '$m=/^\treturn \*supported( = .*;)/;' \
-e 'print $m ? "\t*max_n$1\n\treturn true;\n" : $_'
git grep -l 'int\* supported'|xargs perl -pi -e 's/int\* supported/int *max_n/'
That got all but aix.c, which used different spacing: "int *supported",
which I changed manually. Then I updated all copyright dates.
Jim Meyering [Thu, 5 Mar 2009 10:03:45 +0000 (11:03 +0100)]
gpt: adjust formatting and rename a parameter: s/supported/max_n/.
* libparted/labels/gpt.c (gpt_get_max_supported_partition_count): Rename
parameter: s/supported/max_n/. The latter sounds more like a number,
while "supported" sounds boolean at first.
Joel Granados Moreno [Thu, 5 Mar 2009 09:44:48 +0000 (10:44 +0100)]
Properly sync partitions with operating system
* include/parted/disk.h: Add prototypes for new function.
* libparted/disk.c (ped_disk_get_max_supported_partition_count): New
function that calls the partition-table-specific function.
* libparted/arch/linux.c (_disk_sync_part_table): To sync the table in
disk with the kernel, we remove all partitions from the kernel table
and then add the ones that are in disk. For this to happen we need to
calculate the partition-table-type-specific maximum number of
supported partitions.
* libparted/labels/gpt.c (gpt_get_max_supported_partition_count):
Read the gpt header from disk and calculate the maximum number of
partitions it can accommodate.
* libparted/labels/aix.c (get_max_supported_partition_count):
New function.
* libparted/labels/bsd.c: Likewise.
* libparted/labels/dasd.c: Likewise.
* libparted/labels/dos.c: Likewise.
* libparted/labels/dvh.c: Likewise.
* libparted/labels/gpt.c: Likewise.
* libparted/labels/loop.c: Likewise.
* libparted/labels/mac.c: Likewise.
* libparted/labels/pc98.c: Likewise.
* libparted/labels/rdb.c: Likewise.
* libparted/labels/sun.c: Likewise.
Joel Granados Moreno [Thu, 19 Feb 2009 15:53:12 +0000 (16:53 +0100)]
dasd: emit a diagnostic upon probe failure
* libparted/labels/dasd.c (dasd_probe): Inform the user when no dasd
volumes are present in a device.
Petr Uzel [Fri, 20 Feb 2009 13:52:39 +0000 (14:52 +0100)]
gpt: avoid failed assertion on big-endian systems
* libparted/labels/gpt.c (_parse_header): Compute last_usable_if_grown
not as an LE64 value but as a CPU-format one, since we're about to
compare it to another.
Petr Uzel [Wed, 18 Feb 2009 13:43:36 +0000 (14:43 +0100)]
test for the gpt_read failed-assertion fix
* tests/t0201-gpt.sh: New file.
* tests/Makefile.am (TESTS): Add it.
Jim Meyering [Mon, 16 Feb 2009 18:02:58 +0000 (19:02 +0100)]
avoid failed assertion when creating a GPT partition table...
on top of an old one for a larger device
* libparted/labels/gpt.c (gpt_read): Don't assert that the location
of the alternate LBA is within the current device. It will be
beyond its end when the device it was created for was larger.
Instead, just return, treating this like any other non-match.
Here's the reproducer:
dev=file
dd of=$dev if=/dev/null seek=4001
parted -s $dev mklabel gpt
dd of=$dev if=/dev/null seek=4000
parted -s $dev mklabel gpt
Jim Meyering [Mon, 16 Feb 2009 16:54:57 +0000 (17:54 +0100)]
gpt: add a test: printing a partition table must not modify it
* tests/t0200-gpt.sh: New file.
* tests/Makefile.am (TESTS): Add the new test.
Petr Uzel [Fri, 13 Feb 2009 12:27:55 +0000 (13:27 +0100)]
gpt: do not automatically "correct" a suspicious GPT partition table
Previously, when parted was invoked on a disk with a GPT partition table
and the backup GPT was not in the last sector of the disk, and even if
the requested operation was just to print the partition table, parted
would "repair" this automatically. This behavior is undesirable in the
following situation:
dm-raid on top of block device. The dm-raid is partitioned with GPT. If
the dm-raid starts on the first block of underlying device (AFAIK this is
the case with FastTrack controllers) and the user runs parted on the
dm-raid, it will identify the physical device as being partitioned with
GPT and see the backup GPT table not to be in the last sector of the
physical device and thus move it to this location (which may lead to
destruction of dm-raid metadata in case they are located at the end of
physical device).
This patch modifies parted's behavior to ignore fixing of backup GPT
position by default.
Jim Meyering [Mon, 16 Feb 2009 16:58:50 +0000 (17:58 +0100)]
tests: use "compare", not "$compare"
* test-lib.sh (compare): Define "compare" as a function, not a variable.
* tests/t*.sh: use "compare", not "$compare"
Jim Meyering [Fri, 13 Feb 2009 11:08:13 +0000 (12:08 +0100)]
don't segfault on a device-mapper device with no target
* libparted/arch/linux.c (_dm_maptype): Don't dereference NULL
for a device-mapper device with no target. Use the string
"NO-TARGET" instead. Reported by Mike Hwang in
http://thread.gmane.org/gmane.comp.gnu.parted.devel/2432
Jim Meyering [Sun, 8 Feb 2009 09:53:01 +0000 (10:53 +0100)]
compile warning-free also with upcoming gcc-4.4
* libparted/fs/fat/fat.c (_gen_new_serial_number): Use a union
rather than a warning-provoking cast. Avoids this gcc warning:
"dereferencing type-punned pointer will break strict-aliasing rules"
Jim Meyering [Sat, 7 Feb 2009 16:17:54 +0000 (17:17 +0100)]
clearfat: diagnose an invalid device number
* debug/clearfat/clearfat.c: Include <limits.h> and "xstrtol.h".
(main): Diagnose an invalid minor device number argument.
* bootstrap.conf (gnulib_modules): Add xstrtol.
Jim Meyering [Sat, 7 Feb 2009 14:07:42 +0000 (15:07 +0100)]
maint.mk: sync from coreutils
Jim Meyering [Sat, 7 Feb 2009 13:59:32 +0000 (14:59 +0100)]
Revert "don't try to translate 'lib/xstrtol-error.c'"
This reverts commit
39adc77de255b7df33e1efb93853c7ccfd4c45f5.
Otherwise, "make syntax-check" fails the sc_po_check test.
Otavio Salvador [Sat, 31 Jan 2009 19:07:22 +0000 (17:07 -0200)]
don't try to translate 'lib/xstrtol-error.c'
Otavio Salvador [Tue, 6 Nov 2007 03:51:14 +0000 (01:51 -0200)]
remove ped_(register|unregister)_disk_type since they were deprecated
ped_(register|unregister)_disk_type were remove since they are
deprecated since 1.8 releases. The functions
ped_disk_type_(register|unregister) are the ones to be used.
Otavio Salvador [Tue, 6 Nov 2007 02:31:38 +0000 (00:31 -0200)]
move architecture specific code since they're used in a single place
All architecture headers (linux.h, gnu.h and beos.h) are now
removed. The required code has beem moved to the C file that required
it.
Jim Meyering [Tue, 27 Jan 2009 09:58:09 +0000 (10:58 +0100)]
avoid bootstrap failure
* bootstrap.conf: Ensure the gnulib-tests/ exists.
Reported by Matt Domsch.
Jim Meyering [Mon, 26 Jan 2009 16:24:10 +0000 (17:24 +0100)]
better m4 quoting
Jim Meyering [Mon, 26 Jan 2009 16:12:53 +0000 (17:12 +0100)]
* parted/ui.c: Include <config.h> before any other file.
Jim Meyering [Mon, 26 Jan 2009 16:12:01 +0000 (17:12 +0100)]
maint.mk: sync from coreutils
Jim Meyering [Mon, 26 Jan 2009 15:32:57 +0000 (16:32 +0100)]
* po/POTFILES.in: Add lib/xstrtol-error.c.
Jim Meyering [Mon, 26 Jan 2009 15:24:52 +0000 (16:24 +0100)]
_disk_sync_part_table: revise yet again
This fixes a bug whereby parted could leave the kernel with an
erroneous view of a partition table.
* libparted/arch/linux.c (_disk_sync_part_table): Per analysis in
http://thread.gmane.org/gmane.comp.gnu.parted.devel/2297/focus=2307.
Patch suggested by Petr Uzel.
Jim Meyering [Thu, 8 Jan 2009 13:18:14 +0000 (14:18 +0100)]
* bootstrap.conf: sync from coreutils
Debarshi Ray [Wed, 7 Jan 2009 07:05:10 +0000 (12:35 +0530)]
Differentiate between Ext4 and Ext3 file systems.
Fixes http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/188
* libparted/fs/ext2/ext2_fs.h (EXT4_FEATURE_RO_COMPAT_HUGE_FILE,
EXT4_FEATURE_RO_COMPAT_DIR_NLINK, EXT4_FEATURE_INCOMPAT_EXTENTS,
EXT4_FEATURE_INCOMPAT_64BIT): New constants.
* libparted/fs/ext2/interface.c (_ext2_generic_probe): Ext4 file systems
will have EXT4_FEATURE_* bits set, while Ext3 will not.
(_ext2_probe, _ext3_probe): Pass 2 and 3 respectively, instead of 0 and 1,
to _ext2_generic_probe.
(_ext4_probe): New function.
(_ext4_ops, _ext4_type): New structures.
(ped_file_system_ext2_init): Register Ext4 file system type.
(ped_file_system_ext2_done): Likewise.
* tests/Makefile.am (TESTS): Add t1700-ext-probe.sh.
* tests/t1700-ext-probe.sh: New file.
Jim Meyering [Thu, 8 Jan 2009 08:39:03 +0000 (09:39 +0100)]
fix a "make syntax-check" failure (update copyright date)
* doc/parted.texi: Update copyright dates for 2009.
Jim Meyering [Tue, 23 Dec 2008 09:20:20 +0000 (10:20 +0100)]
avoid "make install" failure with latest GNU make
* doc/C/Makefile.am (dist_man8_MANS): Use per-section variable
names, as recommended by automake.
(man_MANS): Remove redundant definition.
Tom "spot" Callaway [Mon, 22 Dec 2008 14:39:23 +0000 (09:39 -0500)]
sun partition tables: add support for RAID partition types
This patch enables RAID as a supported partition type on Sun disk
layouts, commonly found/used on SPARC hardware. It has been tested
on Aurora SPARC Linux (and Fedora SPARC). I have no idea if Solaris
supports Software RAID or not...
Along with the code change, I wrote a test case that checks if the
RAID partition type is supported on sun disk labels.
* libparted/labels/sun.c [_SunPartitionData] (is_raid): New member.
(sun_read): Initialize the ->is_raid member.
(sun_partition_new): Clear is_raid, like all the other members.
(sun_partition_duplicate): Propagate the is_raid member.
(sun_partition_set_system): Make sun_data->type reflect is_raid.
(sun_partition_set_flag): Also initialize ->is_raid.
(sun_partition_get_flag): Handle PED_PARTITION_RAID.
(sun_partition_is_flag_available): Likewise.
* tests/t4000-sun-raid-type.sh: New file.
* tests/Makefile.am (TESTS): Add t4000-sun-raid-type.sh.
Harald Welte [Sun, 5 Oct 2008 13:11:03 +0000 (15:11 +0200)]
Add support for SD/MMC storage cards on Linux
This patch adds a new SDMMC device type to represent SD/MMC
cards. There is nothing special about handling those devices,
they are just standard block devices with different names.
They use device major ID 179 and are usually called
/dev/mmcblkN (where N is the card number) and the individual partitions
/dev/mmcblkNpM (where M is the partition number).
This patch was developed as part of an effort to make debian-installer
support installation of Debian GNU/Linux on SD/MMC cards, as boot-from-SD
is becoming a feature seen in mobile x86 devices.
Petr Uzel [Tue, 19 Aug 2008 14:12:08 +0000 (16:12 +0200)]
Remove obsolete 'i' from parted optstring (--interactive/-i option is not supported anymore)
Petr Uzel [Tue, 19 Aug 2008 16:24:29 +0000 (18:24 +0200)]
doc: remove obsolete --interactive (-i) option descriptions
Jim Meyering [Thu, 7 Aug 2008 20:32:17 +0000 (22:32 +0200)]
update build/test infrastructure from coreutils
* bootstrap: Update from coreutils.
* maint.mk: Likewise.
Soren Hansen [Wed, 6 Aug 2008 18:15:00 +0000 (20:15 +0200)]
add a test for recently introduced loop-dev-based bug
This also checks for the current behavior when trying to partition
a device that may not be partitioned, like loop devices.
* tests/Makefile.am (TESTS): Add tests/t8000-loop.sh.
* tests/t8000-loop.sh: New file. Test for the above fix.