if accessing sectors outside of partition boundary. Returning false
causes ped_geometry_check() to shift correctly anyway. This occurs
on current Mac disklabels, among other systems.
git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@845
2d424fd7-7fe2-0310-af74-
8bc65edeb173
* Prevent SIGFPE when FAT sector size is 0
* Add virtual DASD (VIODASD) on iSeries support
* Use O_DIRECT I/O to prevent first partition corruption on GPT disks
+ * Prevent sector reading exceptions from ped_geometry_check() on Mac
+ disklabels.
Peter Jones <pjones@redhat.com>
* Add ped_exception_get_handler()
== NULL and the given type is not in the list of registered disk types
(from Debarshi Ray).
+ * cs/geom.c (ped_geometry_read): Do not throw PED_EXCEPTION_ERROR here
+ if accessing sectors outside of partition boundary. Returning false
+ causes ped_geometry_check() to shift correctly anyway. This occurs
+ on current Mac disklabels, among other systems.
+
2006-10-06 David Cantrell <dcantrell@redhat.com>
* arch/linux.c: Change __GNU_SOURCE define to _GNU_SOURCE (only one
underscore at the beginning). Fixes problem with certain systems
real_start = geom->start + start;
- if (real_start + count - 1 > geom->end) {
- exception_status = ped_exception_throw (
- PED_EXCEPTION_ERROR, PED_EXCEPTION_IGNORE_CANCEL,
- _("Attempt to read sectors %ld-%ld outside of "
- "partition on %s."),
- (long) start, (long) (start + count - 1),
- geom->dev->path);
- return exception_status == PED_EXCEPTION_IGNORE;
- }
+ if (real_start + count - 1 > geom->end)
+ return 0;
if (!ped_device_read (geom->dev, buffer, real_start, count))
return 0;