summaryrefslogtreecommitdiff
path: root/libparted/cs
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-10-09 18:33:48 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-10-09 18:33:48 +0000
commitdf9247c1425e23daaaf51e15d2afe5d3939b58a4 (patch)
tree91129b9aea5b210bb40381c9d1eff680b53a7677 /libparted/cs
parent743a57354cbb7fe0c0cfb38cca5d69a35d0f0f3d (diff)
downloadparted-df9247c1425e23daaaf51e15d2afe5d3939b58a4.tar.gz
* 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. git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@845 2d424fd7-7fe2-0310-af74-8bc65edeb173
Diffstat (limited to 'libparted/cs')
-rw-r--r--libparted/cs/geom.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libparted/cs/geom.c b/libparted/cs/geom.c
index 29c89e7..4d2f5e7 100644
--- a/libparted/cs/geom.c
+++ b/libparted/cs/geom.c
@@ -298,15 +298,8 @@ ped_geometry_read (const PedGeometry* geom, void* buffer, PedSector start,
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;