[parted-devel] [PATCH] maint: constify ped_device_get_constraint interface
Colin Watson
cjwatson at ubuntu.com
Mon Apr 12 09:16:21 UTC 2010
* include/parted/device.h (ped_device_get_constraint): Constify "dev"
parameter.
* libparted/device.c (ped_device_get_constraint): Likewise.
---
include/parted/device.h | 2 +-
libparted/device.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/parted/device.h b/include/parted/device.h
index 764c246..bfeafed 100644
--- a/include/parted/device.h
+++ b/include/parted/device.h
@@ -145,7 +145,7 @@ extern int ped_device_sync (PedDevice* dev);
extern int ped_device_sync_fast (PedDevice* dev);
extern PedSector ped_device_check (PedDevice* dev, void* buffer,
PedSector start, PedSector count);
-extern PedConstraint* ped_device_get_constraint (PedDevice* dev);
+extern PedConstraint* ped_device_get_constraint (const PedDevice* dev);
extern PedConstraint *ped_device_get_minimal_aligned_constraint(
const PedDevice *dev);
diff --git a/libparted/device.c b/libparted/device.c
index 64da978..f20121b 100644
--- a/libparted/device.c
+++ b/libparted/device.c
@@ -403,7 +403,7 @@ ped_device_sync_fast (PedDevice* dev)
* constraint.
*/
PedConstraint*
-ped_device_get_constraint (PedDevice* dev)
+ped_device_get_constraint (const PedDevice* dev)
{
PedGeometry *s, *e;
PedConstraint* c = ped_constraint_new (
--
1.7.0
More information about the parted-devel
mailing list