2019-10-10  Brian C. Lane  <bcl@redhat.com>

	version 3.3
	* NEWS: Record release date.

	NEWS: Note the fix for the s390 bug

2019-09-30  Viktor Mihajlovski  <mihajlov@linux.ibm.com>

	libparted/s390: Re-enabled virtio-attached DASD heuristics
	DASDs attached to KVM guest as virtio-blk devices are only handled
	properly, if the unique DASD geometry is detected. Commit id
	61dd3d4c5eb782eb43caa95342e63727db3f8281 has prevented proper geometry
	detection. Fixed by making sure that HDIO_GETGEO takes precedence
	on s390[x].

2019-08-21  Brian C. Lane  <bcl@redhat.com>

	README-release: Add link to upload registration page
	Without this you cannot use gnupload to send the new release tarball to
	the ftp servers.

2019-08-12  Brian C. Lane  <bcl@redhat.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 3.2.153
	* NEWS: Record release date.

	maint: Move NEWS template to line 3

	maint: Update copyright statements to 2019
	By running make update-copyright

	maint: Bump library REVISION number for release

	maint: Update bootstrap script from latest gnulib

	maint: Update to latest gnulib

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix bug in bsd.c alpha_bootblock_checksum
	I flubbed this in e35af6cbc43f5b279e6f0d65ccc904b1ac6c63d2 by trying to
	switch to using a pointer and ended up writing off the end. Switch the
	loop in alpha_bootblock_checksum back to use [i] index. It's easier
	to read anyway.

	doc: Create po directory if missing
	When running 'make distcheck' the directory tree it uses is created
	without the po directory. Create it if it is missing.

	dist-check.mk: Remove empty .deps directories
	Borrowed from coreutils commits 373ba16f332d and 40434e566e52

	Turn off c_prohibit_gnu_make_extensions

	po: Add argmatch.h

	bsd.c: Rewrite disklabel code to prevent gcc warnings
	Constructing a pointer into a char array results in warnings about casting
	changing alignment. This changes how the boot sector is handled by adding the
	label to BSDDiskData with the correct offset (64 bytes).

	Add gcc malloc attribute to ped_alloc and ped_calloc

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	libparted: Replace abs() with llabs()
	GCC 9 fails to compile a few C source files which call abs() function.
	An example of the error messages was as follows:

	  CC       dos.lo
	dos.c: In function '_best_solution':
	dos.c:1773:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value]
	 1773 |   a_delta = abs (part->geom.start - a->start);
	      |             ^~~
	dos.c:1774:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value]
	 1774 |   b_delta = abs (part->geom.start - b->start);
	      |             ^~~
	cc1: all warnings being treated as errors

	To avoid the errors, replace abs() function calls with llabs().

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	sun.c: Aligned _SunRawLabel to 16bit boundary

	gpt.c: Drop cast of efi_guid_t to unsigned char *
	This confuses gcc, making it think the uuid_t is unaligned when it really comes
	from a efi_guid_t entry in _GPTDiskData.

	gpt.c: Align _GPTDiskData to 8 byte boundary

	dvh.c: Use memcpy instead of strncpy
	The strings are short, so using memcpy isn't much slower (if at all).  This
	fixes gcc complaining about strncpy possibly copying a non-terminated string.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	include/parted/unit.in.h: Specify const attribute to ped_unit_get_name()
	GCC 8 fails to compile libparted/unit.c with an error:

	  CC       unit.lo
	unit.c:155:1: error: function might be candidate for attribute 'const' [-Werror=suggest-attribute=const]
	 ped_unit_get_name (PedUnit unit)
	 ^~~~~~~~~~~~~~~~~
	  CC       disk.lo
	cc1: all warnings being treated as errors

	Const attribute is required for the function ped_unit_get_name() because
	its return value is not affected by program status. To avoid the build
	failure, change attribute of the function from pure to const.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	libparted/labels/pt-tools.c: Fix gperf generated function attribute
	GCC 8 fails to compile libparted/labels/pt-tools.c with an error:

	  CC       pt-tools.lo
	In file included from pt-tools.c:114:
	pt-tools.c: In function 'pt_limit_lookup':
	pt-limit.gperf:78:1: error: function might be candidate for attribute 'pure' [-Werror=suggest-attribute=pure]
	cc1: all warnings being treated as errors

	"Pure" attribute is required for the function pt_limit_lookup() because
	it does not change program status other than its return value.

	To avoid the build failure, add _GL_ATTRIBUTE_PURE to the function.
	The attribute cannot be added in libparted/gperf/pt-limit.c because it
	is generated by gperf during the build process. Instead, add the
	attribute in libparted/gperf/pt-tools.c which includes the generated
	function.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	configure.ac: Check ABI against ABI version 2
	GCC 8 fails to compile libparted/labels/aix.c with an error:

	  CC       aix.lo
	cc1: error: -Wabi won't warn about anything [-Werror=abi]
	cc1: note: -Wabi warns about differences from the most up-to-date ABI, which is
	also used by default
	cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
	cc1: all warnings being treated as errors
	make[4]: *** [Makefile:1250: aix.lo] Error 1

	To avoid the build failure, specify ABI version 2 to check ABI change
	from GCC 4.9.

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	Adjust the gcc warnings to recognize FALLTHROUGH

	dos.c: Fix cast alignment error in maybe_FAT

	atari.c: Align the AtariRawTable on a 16bit boundary
	The casts to uint16_t need to know that this will be aligned. The struct is
	actually 512 bytes, so it normally does end up aligned. This just makes sure
	the compiler knows it and stops warning about the casts.

	Change 'time stamp' to 'timestamp'
	Caught by make syntax-check

	Fix double semi-colons
	Caught by make syntax-check

	Update syntax-check NEWS hash to cover 3.2 release notes.

	Fix syntax-check complaints about tests

	Remove trailing whitespace
	Caught by make syntax-check

	Remove unnecessary if before free checks
	Caught by make syntax-check

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	configure.ac: Remove default -Werror flag
	Warnings as errors does not make sense with the current state of the
	codebase and it is making it difficult to do new releases.

	We should *show* the warnings, and handle them as time permits, but they
	should not block building a new release.

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	README-release: Updating the release instructions

2019-08-05  A. Wilcox  <AWilcox@Wilcox-Tech.com>

	libparted: Fix endian bug in bsd.c
	You have to add 1 *before* doing the endian conversion, not after.

2019-07-15  Max Staudt  <max@enpas.org>

	libparted/fs/amiga/affs.c: Remove printf() to avoid confusion
	Currently, the affs code in libparted prints a debug line to stdout when
	an Amiga FFS partition is probed. This confuses tools that parse stdout.

	A prominent example is the partitioner (partman) in Debian's installer,
	which parses stdout from a tool (parted_devices) that uses libparted to
	scan the system's block devices. As of now, Debian cannot be installed
	on a typical Amiga:

	  https://lists.debian.org/debian-68k/2019/07/msg00015.html

	This patch removes this unexpected printf().

	Cc: glaubitz@debian.org

2019-04-09  Michael Small  <smallm@sdf.org>

	Tests case for sigsegv when false nilfs2 superblock detected.

2019-04-09  Michael Small  <smallm@sdf.org>

	Avoid sigsegv in case 2nd nilfs2 superblock magic accidently found.
	1. is_valid_nilfs_sb: make sure the subtraction bytes - sumoff - 4
	won't give a negative number. That as the len argument to
	__efi_crc32() would give a very large number for the latter's for
	loop limit, since len is unsigned long.

	2. nilfs2_probe: Read and allocate enough sectors to hold a
	struct nilfs2_super_block.  is_valid_nilfs_sb() will be passing
	up to 1024 bytes to __efi_crc32(). If only one 512 byte sector
	had been allocated with alloca and read from disk that would cause
	reads off the the end of the stack even if bytes were more than
	sumoff - 4.

2019-02-11  Brian C. Lane  <bcl@redhat.com>

	Fix align-check help output

2019-01-31  Hans-Joachim Baader  <baader@gmx.net>

	Added support for Windows recovery partition (WINRE) on MBR
	Windows 10 uses a recovery partition which is sometimes marked with
	partition type 0x27 on MBR systems. It wasn't possible to handle such
	a partition with parted. Therefore the partition type PARTITION_MSFT_RECOVERY
	is now used properly also on MBR when the flag msftres is set.

2019-01-31  Brian C. Lane  <bcl@redhat.com>

	parted: Remove PED_ASSERT from ped_partition_set_name
	Asserts should only check logic, not wrap functions with side-effects.
	When compiled with --disable-debug this causes the name field of mkpart
	to be ignored.

2019-01-30  Brian C. Lane  <bcl@redhat.com>

	docs: Update GNU License version in parted .text files

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	Read NVMe model names from sysfs
	parted currently shows the same generic model name for all NVMe devices:

	  # parted /dev/nvme0n1 -s print | grep Model
	  Model: NVMe Device (nvme)

	If the model information is available in sysfs, display that instead:

	  # parted /dev/nvme0n1 -s print | grep Model
	  Model: THNSN5512GPU7 NVMe TOSHIBA 512GB (nvme)

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	Fix warnings from GCC 7's -Wimplicit-fallthrough
	All of these locations appear to have intentional fallthroughs. Add
	comments that GCC will detect to mute warnings w/ -Wimplicit-fallthrough.

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	ped_unit_get_name: Resolve conflicting attributes 'const' and 'pure'
	The const and pure attributes conflict:

	  error: ignoring attribute 'const' because it conflicts with attribute 'pure' [-Werror=attributes]

	pure functions may access global memory, const functions may not.
	ped_unit_get_name() accesses non-local variable unit_names, so drop const.

2018-10-16  Brian C. Lane  <bcl@redhat.com>

	Add udf to t1700-probe-fs and to the manpage
	If mkfs.udf is installed this will test to make sure that the filesystem
	is detected.

2018-10-16  Pali Rohár  <pali.rohar@gmail.com>

	libparted: Add support for MBR id, GPT GUID and detection of UDF filesystem
	This is needed for libparted based applications (like Gparted) to correctly
	choose MBR id and GPT GUID for UDF filesystem. MBR id for UDF is 0x07 and
	GPT GUID is Microsoft Basic Data, see why: https://serverfault.com/a/829172

	Without registering a new libparted fs code it is not possible to assign
	MBR id or GPT GUID.

	Detection of UDF filesystem is done by checking presence of UDF VSD (NSR02
	or NSR03 identifier) and UDF AVDP at expected locations (blocks 256, -257,
	-1, 512).

2018-10-16  Simon Xu  <xu.simon@oracle.com>

	Fix potential command line buffer overflow
	parted terminates with 'stack smashing detected' when fed with a long command
	line argument, and segfaults when the argument is long enough:

	root # /sbin/parted /dev/sda $(perl -e 'print "a"x265')
	*** stack smashing detected ***: /sbin/parted terminated
	...
	Aborted

	root # /sbin/parted /dev/sda $(perl -e 'print "a"x328')
	*** stack smashing detected ***: /sbin/parted terminated
	...
	Command History:
	Segmentation fault

	parted should be able to detect it and exit with error and usage messages.
	This also makes command line buffer overflow exploit more possible.  Fix it by
	adding length check in the condition of the for loop where command line
	arguments are copied.

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	t6100-mdraid-partitions: Use v0.90 metadata for the test
	Newer metadata types use more disk space, causing the test to fail.

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	parted.c: Make sure dev_name is freed
	If there was a problem with ped_device_get or ped_device_open it would not be freed.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	parted.c: Always free peek_word
	If command_line_get_fs_type failed it would never free it, so put a free
	in both branches of the if.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	Fix the length of several strncpy calls
	These need to be 1 less than the allocated size of the buffer, strncpy
	will fill shorter strings with zeros, but there needs to be room for at
	least one 0x00 at the end if the string is the same length as the buffer
	and has no terminating 0x00.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	Modify gpt-header-move and msdos-overlap to work with py2 or py3
	Distributions are starting to remove python2 and only use python3.
	Modify these test scripts so that they will work with either python 2.7
	or python 3.X

2018-08-22  Ulrich Müller  <ulm@gentoo.org>

	libparted: Fix ending CHS address in PMBR.
	According to the UEFI specification version 2.7, Section 5.2.3,
	Table 16, the ending CHS address in the protective MBR should be set
	to 0xFFFFFF. This also agrees with the behaviour of fdisk from
	util-linux-2.32.

2018-06-12  Phillip Susi  <psusi@ubuntu.com>

	Fix atari label false positives
	The atari label gets false positives easily, so probe it after
	all other labels have said no.

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Lift 512 byte restriction on fat resize
	As Colin Watson pointed out way back in 2014, when I removed the
	512 byte sector size restriction from the fs recognition code,
	I missed the same from the fat resize code.

2018-06-05  Colin Watson  <cjwatson@ubuntu.com>

	build: Remove unused traces of dynamic loading
	Now that file system operations have been removed from libparted,
	libreiserfs is no longer used.  Remove references to it, along with the
	dynamic loading build infrastructure which was only used for
	libreiserfs.

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Fix resizepart iec unit end sector
	Fix resizepart to adjust the end to be -1 sector when using iec
	power of 2 units so that the next partition can start immediately
	following the new end, just like mkpart does.

2018-06-05  Niklas Hambüchen  <mail@nh2.me>

	mkpart: Allow negative start value when FS-TYPE is not given
	The manual had long documented that negative values are
	allowed for both start and end values, but until now negative
	start values were rejected if FS-TYPE was not given.

	Example:

	  # parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary ext4 -5MiB 100%
	  (succeeds)

	  # parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary -5MiB 100%
	  parted: invalid token: -5MiB
	  Error: Expecting a file system type.

	This commit fixes the latter error.
	The issue was an insufficient lookahead in command line parsing,
	looking only for digits when skipping over FS-TYPE.
	The fix is including the minus '-' in the lookahead.

	Originally reported as Debian bug #880035:

	  "parted: fails to use negative start value for 'mkpart' command without specyfying FS-TYPE"
	  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880035

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Fix set and disk_set to not crash when no flags are supported
	Loop labels and file images support no flags.  set and disk_set
	would prompt for a flag and accept any string since the list of
	flags was empty, then fail to look up an actual flag value, then
	throw an exception with a null string for the name of the flag,
	which would bug.

2018-05-07  Phillip Susi  <psusi@ubuntu.com>

	tests: fix t6100-mdraid-partitions
	The test was failing because it didn't wait for the md device
	to appear after creating it.

	Fix make check
	Make check failed due to some warnings treated as errors.  One was
	caused by a warning that a function could have the noreturn attribute.
	It seems that this had previously been disabled but gcc has changed
	the flag from -Wmissing-noreturn to -Wsuggest-attribute=noreturn.  The
	recently added volser.c test also caused a few warnings when not
	compiled on s390x because most of the functions were no used, so #if
	those out as well.

2018-04-04  Richard W.M. Jones  <rjones@redhat.com>

	linux: Include <sys/sysmacros.h> for major() macro.
	Since glibc 2.27 this header is required.

2017-12-19  Sebastian Parschauer  <sparschauer@suse.de>

	Add support for NVDIMM devices
	Recognize NVDIMM devices, so that "parted -s /dev/pmem7 p" now
	prints "Model: NVDIMM Device (pmem)" instead of
	"Model: Unknown (unknown)".

	In order for a device to be recognized as NVDIMM, it has to
	have a 'blkext' major number. But since this major can be
	used also by other device types, we also check that the device
	path contains 'pmem' as a substring.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_PMEM
	* libparted/arch/linux.c(_device_probe_type): Recognize NVDIMM devices.
	* libparted/arch/linux.c(linux_new): Handle NVDIMM devices.
	* parted/parted.c(do_print): Add "pmem" to list of transports.

2017-12-19  Arnout Vandecappelle (Essensium/Mind)  <arnout@mind.be>

	libparted/labels: link with libiconv if needed
	gpt.c uses iconv so it should link with it. Otherwise, on platforms
	where libiconv is a separate library, we get a link failure of parted:

	    CCLD     parted
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv'
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv_open'
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv_close'

	Since iconv functionality is needed unconditionally (not only when
	gettext is enabled), AM_ICONV needs to be added to configure.ac.

2017-07-31  Brian C. Lane  <bcl@redhat.com>

	atari.c: Drop xlocale.h (#1476934)
	glibc no longer includes this header. locale.h should work just fine.

2017-06-06  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix udev cookie leak in _dm_resize_partition
	Add a NEWS entry.

2017-05-25  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix udev cookie leak in _dm_resize_partition
	The function is setting udev cookies, but not using them when waiting
	for the task. This results in leaked cookies, which can eventually
	exhaust the available number of semaphores.

	'dmsetup udevcookies' will show a cookie remaining afterwards, and 'ipcs -s'
	will show the semaphores in use.

	Also simplified the exit so that the task is always destroyed and memory
	is all freed in the same path.

	Resolves: rhbz#1455564

2017-05-02  Brian C. Lane  <bcl@redhat.com>

	tests/t1701-rescue-fs wait for the device to appear.
	After mkpart it needs to wait for the new partition to appear.

2017-05-02  Brian C. Lane  <bcl@redhat.com>

	Increase timeout for rmmod scsi_debug and make it a framework failure
	On some hardware scsi_debug can take longer to remove. If this fails it
	inevitably results in the next test failing since it cannot load
	scsi_debug.

	Increse the timeout to 40 loops (8 seconds), and if it hits the limit
	without succeeding call framework_failure_

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add test cases for the new fdasd functions
	The test case uses a temporary file in libparted/tests under
	Check framwork.It can be issued by "make check" in the test dir.

	libparted/dasd: add an exception for changing DASD-LDL partition table
	The partition table of DASD-LDL device with the dasd disk label
	should not be changed according to its character in Linux.
	When the user tries to modify the partition table, an exception
	will be raised to inform user of this character.

	libpartd/dasd: improve flag processing for DASD-LDL
	DASD-LDL does not support flag now, so all the flags are
	unavailable to it.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted/ui: remove unneccesary information of command line
	When some command fails, the information still exists in
	command_line buffer. When in command mode or interactive mode,
	if an interactive exception prompts, the remained information
	will be processed as option from user. This will raise some other
	information or even unexpected results. So before getting option
	input from user, clean the command line buffer.

	Example: When the disk label is invalid and user tries to make
		 new partition on the device with command like,
		 mkpart 0 50%. Then parted will raise an exception
		 telling an invalid disk label found and whether to correct it.
		 But at this time 0 as the input of mkpart will be
		 considered as the option input for the exception(yes/no).
		 So one more exception will raised with error information.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: check the name of partition first when to name a partition
	The previous function works well for the labels supporting naming
	partition, but not for these which don't. If the disk label does not
	support partition naming, two exceptions will be raised. Even after the first
	error indicates it does not support name, parted yet asks user for
	name in iteractive mode.

	First check if the disk label supports partition naming and if it
	does, it will continue; otherwise, it will stop and raise an
	exception.

2017-05-01  Sebastian Parschauer  <sparschauer@suse.de>

	Add support for RAM drives
	Recognize RAM drives, so "parted -s /dev/ram0 p" now prints
	"RAM Drive (brd)" instead of "Model: Unknown (unknown)".

	In order for a device to be recognized as RAM drive, it has to
	have major number 1. Also the BLKFLSBUF ioctl shouldn't be used
	on RAM drives as it is used to zero the device.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_RAM.
	* libparted/arch/linux.c(RAM_MAJOR): New define.
	* libparted/arch/linux.c(_device_probe_type): Recognize RAM drives.
	* libparted/arch/linux.c(linux_new): Handle RAM drives.
	* libparted/arch/linux.c(_flush_cache): Skip RAM drives.
	* parted/parted.c(do_print): Add "brd" to list of transports.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	clean the disk information when commands fail in interactive mode.
	parted always reads disk information to memory before any
	operations. The disk that user operates is actually
	a copy of real one in memory. When the information in memory
	is changed, it will commit the memory to device to update the
	disk information.

	Once the disk information is read, parted will never re-read it
	again unless another device is loaded or the device is re-read.
	Above work has been done in commit 7eac058 (parted: don't reload
	partition table on every command)

	Each command of parted always commits the memory when it succeeds.
	Then the disk information on device and in memory are the same.
	But when it fails, they might be different. User will be confused
	by this, and sometimes get undesired result with the contaminated
	memory. This memory should be cleaned if some command fails.
	Then the command followed will re-read the disk.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: fix wrong error label jump in mkpart
	When the user makes a new partition, if parted fails to add the
	partition to disk, it jumps to wrong error label. In this
	situation, this new partition actually is not a node in disk
	data structure. But in the wrong error label, it pretends this
	is a node and removes it as a list node, leading to other
	partition in this disk deleted. This might lead to a memory leak.
	Because if there are other partitions, it just removes them from
	list without releasing the resource. And this also leads to different
	disk information between memory and device. This is confusing.

	But when the new partition is added to disk successfully and if
	any operations followed fail, this partition should be removed from
	disk and destroyed.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: fix crash due to improper partition number input
	When the user makes a new partition, if parted fails to add the
	partition to disk, it jumps to wrong error label. In this
	situation, this new partition actually is not a node in disk
	data structure. But in the wrong error label, it pretends this
	is a node and removes it as a list node, leading to other
	partition in this disk deleted. This might lead to a memory leak.
	Because if there are other partitions, it just removes them from
	list without releasing the resource. And this also leads to different
	disk information between memory and device. This is confusing.

	But when the new partition is added to disk successfully and if
	any operations followed fail, this partition should be removed from
	disk and destroyed.

2017-04-17  Phillip Susi  <psusi@ubuntu.com>

	Fix crash when localized
	The _() macro is only for translating string literals.  It was
	incorrectly applied to a runtime string representing the name
	of a partition and this sometimes caused a gettext crash.

2017-01-19  Sebastian Rasmussen  <sebras@gmail.com>

	libparted: Fix typo in hfs error message

2016-12-22  Laurent Vivier  <laurent@vivier.eu>

	libparted: Fix MacOS boot support
	boot_region_length (or BootSize in the MacOS dialect) is the length
	of the driver code in the driver partition. This length is used
	to compute the checksum of the driver.

	libparted updates this value by setting the whole size of the partition
	without computing the checksum of the driver using this size.

	As the checksum is wrong, the driver is broken and cannot be loaded
	by the MacOS ROM, and thus the disk is not bootable anymore.

	Moreover, parted try to update the driver list and makes it disappear.

	As parted is not able to insert a driver in a partition,
	the driver is generally inserted by the Apple HD Tool,
	this patch removes the line updating the driver size.

	We also simplify the driver list scan and fix endianess use.

	This has been tested... and it works, now.

	I have updated a bootable disk with parted on x86_64 and
	then been able to boot it (again) on a Mac LC III.

2016-12-22  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>

	libparted: Add support for atari partition tables

	libparted:tests: Move get_sector_size() to common.c
	Moving get_sector_size() from disk.c to common.c allows
	us to use it in _implemented_disk_label() to test for
	512-byte sectors. This change is required to be able to
	enable this test for atari partition tables for which
	support is added in a follow-up patch.

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Update t0220 and t0280 for the swap flag.

2016-12-22  Arvin Schnell  <aschnell@suse.com>

	libparted: set swap flag on GPT partitions
	The filesystem type is still detected as befor, but now setting the
	'swap' flag will set the partition GUID to PARTITION_SWAP_GUID.

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add test cases for the new fdasd functions
	The test case uses a temporary file in libparted/tests under
	Check framwork. It can be issued by "make check" in the test dir.

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add new fdasd functions
	Introduce a set of new functions from the fdasd utility of the s390-tools
	to keep the code base in parted and s390-tools in sync.

	These new functions are:
	  fdasd_check_volser():  validate the volser input
	  fdasd_get_volser():    get volume serial (volser)
	  fdasd_change_volser(): change volser with string
	  fdasd_reuse_vtoc():    re-create vtoc labels based on the existing vtoc

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: update and improve fdasd functions
	Update the fdasd_anchor_t data structure and the fdasd_cleanup()
	function. Also correct vtoc_changed and vlabel_changed accounting
	because they are important to rewrite vtoc to save the changes.

	Wang Dong <dongdwdw@linux.vnet.ibm.com>
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: unify vtoc handling for cdl/ldl
	Merge volume label cdl and ldl. It is convenient to manipulate
	the same structure. Also remove unused arguments in the functions.

2016-12-22  Sebastian Parschauer  <sparschauer@suse.de>

	libparted: Don't warn if no HDIO_GET_IDENTITY ioctl
	Fully virtualized Xen VMs (HVM) use Linux IDE devices which don't
	support the HDIO_GET_IDENTITY ioctl. EINVAL is returned, a warning
	is printed and the device model is set to "Generic IDE" in that
	case. The problem is seeing the warning all the time. So drop it
	for this case.

2016-12-22  Petr Uzel  <petr.uzel@suse.cz>

	libparted: Fix starting CHS in protective MBR
	The CHS address for protective partition start in protective MBR
	should be 0/0/2, according to UEFI spec (v2.6, section 5.2.1).

	* libparted/labels/gpt.c (_write_pmbr): Fix starting CHS address

	Reported by Steffen Winterfeldt in https://bugzilla.suse.com/969165

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Stop timing t9040 (#1172675)
	parted doesn't have any control over how long this takes, there is no
	reason to consider this a parted bug if it takes longer than expected.

	Resolves: rhbz#1172675

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	partprobe: Open the device once for probing
	Previously there were 3 open/close pairs for the device, which may
	result in triggering extra udev actions. Instead, open it once at the
	start of process_dev and close it at the end.

	tests: Set optimal blocks to 64 for scsi_debug devices
	The Linux kernel 4.5 changed the optimal blocks count from 64 to 1024
	This causes tests using scsi_debug devices to fail because of alignment
	issues. Set the opt_blks to 64 so that we have consistent behavior
	across kernels.

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	doc: Add information about quoting
	Some shells (bash) will strip off the " so it needs to be
	wrapped in '' to prevent it. eg.

	parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	doc: Cleanup mkpart manpage entry (#1183077)

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Fix t1700 failing on a host with a 4k xfs filesystem (#1260664)
	The problem is that mkfs.xfs won't work if the file it is trying to
	create is on a filesystem with a sector size larger than the passed
	-ssize value. So a host with 4k disks (eg. s390) and the xfs filesystem
	will fail with the error message:
	    illegal sector size 512; hw sector is 4096

	Failures setting up the environment for the test aren't parted bugs.
	This stops treating mkfs and dd errors as test failures, skipping the fs
	and logging a warning.

	Related: rhbz#1260664

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Add wait to t9042 (#1257415)
	Also make the new disklabel and first partition all in one step to
	prevent udev problems.

	Resolves: rhbz#1257415

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Add udevadm settle to wait_for_ loop (#1260664)
	Sometimes the device will vanish after the wait_for_dev_to_appear exits.
	Add udevadm settle in an attempt to make sure the udev system is done
	flapping around and the device will stay in place.

	Related: rhbz#1260664

2016-10-04  Brian C. Lane  <bcl@redhat.com>

	tests: t3310-flags.sh skip pc98 when sector size != 512

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add tests for remaining table types
	Add test of flags for remaining table types: aix, amiga, pc98, sun and
	loop.  Note that support of writing AIX tables is not yet implemented in
	parted and LOOP tables don't support partitions nor flags.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for dvh table flags
	DVH table reserves the first 4 MiB for the volume header information so
	move the created test partition to immediately after that.

	Exclude testing the boot flag as that can only be set on logical
	partitions and this test script only uses primary partitions so far.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for mac table flags
	MAC partition table reserves partition 1 for the partition map
	partition, so the created test partition will be number 2.  Adapt
	accordingly.

	Setting flags 'root' and 'swap' also sets the partition name to 'root'
	and 'swap' respectively, so no longer match the partition name in
	extract_flags().

	Don't test lvm and raid flags as they fail to be cleared with a single
	set off command.  See FIXME comment in the test for more details.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	libparted: Remove commented local variable from bsd_partition_set_flag()

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	libparted: Fix to report success when setting lvm flag on bsd table
	bsd_partition_set_flag() was falling through in the lvm flag case and
	returning failure.  Fix this by adding missing return 1 (success) like
	for the other flags.

	Found as a result of this bug reported by Timo Riikonen:
	https://bugzilla.gnome.org/show_bug.cgi?id=769831

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for bsd table flags

	tests: t3310-flags.sh: Stop excluding certain flags from being tested
	Also grep for whole words, grep -w, to avoid flag 'boot' being matched
	as a substring of flag 'legacy_boot'.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Query libparted for all flags to be tested
	Replace scanning the documentation for an incomplete list of flags with
	querying libparted for the complete list of supported flags via the
	added helper print-flags.

	Correct $ME -> $ME_ in the warning messages.  Improve the warning
	messages by including the table type and flag name not correctly set or
	cleared.

	Plus minor changes:
	(1) use slightly longer variable name primary_or_name;
	(2) use longer test partition name PTNNAME; and
	(3) stop shortening parted unit command to u.

2016-09-30  Petr Uzel  <petr.uzel@suse.cz>

	libparted: only IEC units are treated as exact
	If the user specifies start/end of the partition as a unit,
	whose size happens to be power of two, we treat that as
	exact address with exact placement.

	Recently, commit 01900e056ec25083 added an exception for
	percent units.

	This logic however can fail also for cylinders, e.g. on DASD FBA disks,
	which report CHS=(*, 128, 16) geometry, hence once cylinder is 1 MiB.
	With cylinders as units, exact placement is not what the user wants.

	Instead of adding cylinders to the blacklist, let's instead
	whitelist units which should trigger exact placement.

	* libparted/unit.c (is_power_of_2): Remove now unused function.
	(ped_unit_parse_custom): Specify which units trigger exact placement.
	* NEWS (Bug Fixes): Mention this.

2016-09-30  Gareth Randall  <gareth.randall@virgin.net>

	docs: Improve partition description in parted.texi

2016-06-23  Petr Uzel  <petr.uzel@suse.cz>

	Add support for NVMe devices
	Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints
	"NVMe Device (nvme)" instead of "Model: Unknown (unknown)".

	In order for a device to be recognized as NVMe, it has to
	have a 'blkext' major number. But since this major can be
	used also by other device types, we also check the device
	path contains 'nvme' as a substring.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME
	* libparted/arch/linux.c(BLKEXT_MAJOR): New define.
	* libparted/arch/linux.c(_is_blkext_major): New function.
	* libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices.
	* libparted/arch/linux.c(linux_new): Handle NVMe devices.
	* parted/parted.c(do_print): Add "nvme" to list of transports.

2016-06-23  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: correct the offset where the first partition begins
	The start point of first partition must start at least from the third
	track of DASD, due to the existence of metadata in the first two track.
	The previous constraint just sets all the device to be partitioned.
	So when the start point of the first partition start before the third
	track, (For example if it starts from.0) parted will exit abruptly.
	And this kind of job must be done with constraint explicitly.

	Then the constraint is modified to exclude the first two tracks and
	to make the first partition start from the third track by default.

	Reviewed-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>

2016-05-06  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix probing AIX disks on other arches
	Not a likely scenario, but make sure the magic check works everywhere.

2016-04-15  Brian C. Lane  <bcl@redhat.com>

	libparted: Remove fdasd geometry code from alloc_metadata (#1244833)
	commit db20944f changed how the trailing_metadata_end is calculated in
	dasd_alloc_metadata, removing the need for setting up the anchor struct.
	But dasd_alloc_metadata can be called in various contexts, and the
	arch_specific->fd may or may not be valid during these calls. This can
	result in unpredictable crashes when it uses a stale fd and tries to run
	the file image code in fdasd_get_geometry instead of the device code.

	The solution is to just drop the unneeded code, and to remember that
	arch_specific->fd should only be used when ped_device_open has first
	been called.

	Resolves: rhbz#1244833

2016-04-14  Phillip Susi  <psusi@ubuntu.com>

	Add NEWS entry for fat resize fix

2016-04-14  Gustavo Zacarias  <gustavo@zacarias.com.ar>

	bug#17883: [PATCH] configure.ac: uclinux is also linux
	uclinux is used in the tuple for some noMMU linux builds like Blackfin
	FLAT output, so accept it as linux too.

2016-04-14  Curtis Gedak  <gedakc@gmail.com>

	lib-fs-resize: Fix recognition of FAT file system after resizing
	When resizing a FAT partition, an extra boot_sector memory allocation
	was causing the original boot_sector information to be lost.  The
	resulting FAT file system was still recognized by GNU/Linux, but not
	recognized by the proprietary Windows operating system.

	The problem with Windows FAT32 recognition was introduced with:

	  Fix filesystem detection on non 512 byte sectors
	  80678bdd957cf49a9ccfc8b88ba3fb8b4c63fc12

	Fix by removing the extra boot_sector memory allocation.
