| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The assert message includes sector values, which are long long int, so
use the proper formatting of %lld.
The snprintf warning complained about trying to write 258 bytes so I
bumped the buffer size up to 259. The return value is already being
checked for truncation so this is just to keep the compiler happy
without having to suppress the warning.
|
|
|
|
|
|
| |
The fail and fail_if functions from libcheck are deprecated, replace
them with ck_abort_msg and ck_assert_msg. Note that the logic of assert
is the opposite of fail_if.
|
|
Sometimes, libparted operates on device mapper files with a path of
/dev/mapper/foo. With newer lvm versions /dev/mapper/foo is a symlink
to /dev/dm-#. However some storage administration programs (anaconda,
for example) may do the following:
1) Create a ped_device for /dev/mapper/foo
2) ped_get_device resolves the symlink to /dev/dm-#, and the path
in the PedDevice struct points to /dev/dm-#
3) The program does some things to lvm, causing the symlink to
point to a different /dev/dm-# node
4) The program does something with the PedDevice, which results
in an operation on the wrong device
Newer libparted versions do not suffer from this problem, as they
do not canonicalize device names under /dev/mapper. This test checks
for this bug.
* libparted/tests/symlink.c: New test which tests for this issue.
* libparted/tests/t3000-symlink.sh: New file.
* libparted/tests/Makefile.am: Include the new files. Run the new test.
|