[gnome-disk-utility] sync GduError to DevkitDisksError
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-disk-utility] sync GduError to DevkitDisksError
- Date: Sat, 28 Mar 2009 13:18:59 -0400 (EDT)
commit bc56c4ab346148123eb86f6d7b48f6474df7f4d5
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 26 16:30:31 2009 -0400
sync GduError to DevkitDisksError
Make sure we have a matching code in GduError for each error that
we can get from DevKitDisksError.
http://bugzilla.gnome.org/show_bug.cgi?id=576894
Signed-off-by: David Zeuthen <davidz redhat com>
---
src/gdu/gdu-error.c | 8 ++++++--
src/gdu/gdu-error.h | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c
index b1035f6..f0388fc 100644
--- a/src/gdu/gdu-error.c
+++ b/src/gdu/gdu-error.c
@@ -91,6 +91,8 @@ _gdu_error_fixup (GError *error)
error->code = GDU_ERROR_NOT_PARTITION;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotPartitionTable") == 0)
error->code = GDU_ERROR_NOT_PARTITION_TABLE;
+ else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotLabeled") == 0)
+ error->code = GDU_ERROR_NOT_LABELED;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotFilesystem") == 0)
error->code = GDU_ERROR_NOT_FILESYSTEM;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotLuks") == 0)
@@ -105,12 +107,14 @@ _gdu_error_fixup (GError *error)
error->code = GDU_ERROR_NOT_LINUX_MD_COMPONENT;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotDrive") == 0)
error->code = GDU_ERROR_NOT_DRIVE;
- else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotSmartCapable") == 0)
- error->code = GDU_ERROR_NOT_SMART_CAPABLE;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotSupported") == 0)
error->code = GDU_ERROR_NOT_SUPPORTED;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotFound") == 0)
error->code = GDU_ERROR_NOT_FOUND;
+ else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.AtaSmartNotAvailable") == 0)
+ error->code = GDU_ERROR_ATA_SMART_NOT_AVAILABLE;
+ else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.AtaSmartWouldWakeup") == 0)
+ error->code = GDU_ERROR_ATA_SMART_WOULD_WAKEUP;
else
matched = FALSE;
diff --git a/src/gdu/gdu-error.h b/src/gdu/gdu-error.h
index 26d0aaf..40acc9a 100644
--- a/src/gdu/gdu-error.h
+++ b/src/gdu/gdu-error.h
@@ -43,6 +43,7 @@ G_BEGIN_DECLS
* @GDU_ERROR_NOT_CANCELLABLE: Operation is not cancellable.
* @GDU_ERROR_NOT_PARTITION: Device is not a partition.
* @GDU_ERROR_NOT_PARTITION_TABLE: Device is not a partition table.
+ * @GDU_ERROR_NOT_LABELED: Device is not labeled.
* @GDU_ERROR_NOT_FILESYSTEM: Device is not a file system.
* @GDU_ERROR_NOT_LUKS: Device is not a LUKS encrypted device.
* @GDU_ERROR_NOT_LOCKED: Device is not locked.
@@ -50,9 +51,10 @@ G_BEGIN_DECLS
* @GDU_ERROR_NOT_LINUX_MD: Device is not a Linux md Software RAID device.
* @GDU_ERROR_NOT_LINUX_MD_COMPONENT: Device is not a Linux md Software RAID component.
* @GDU_ERROR_NOT_DRIVE: Device is not a drive.
- * @GDU_ERROR_NOT_SMART_CAPABLE: Device is not S.M.A.R.T. capable.
* @GDU_ERROR_NOT_SUPPORTED: Operation not supported.
* @GDU_ERROR_NOT_FOUND: Given device does not exist.
+ * @GDU_ERROR_ATA_SMART_NOT_AVAILABLE: Device does not support S.M.A.R.T.
+ * @GDU_ERROR_ATA_SMART_WOULD_WAKEUP: Getting S.M.A.R.T. data for the device would require to spin it up.
*
* Error codes in the #GDU_ERROR domain.
*/
@@ -68,6 +70,7 @@ typedef enum
GDU_ERROR_NOT_CANCELLABLE,
GDU_ERROR_NOT_PARTITION,
GDU_ERROR_NOT_PARTITION_TABLE,
+ GDU_ERROR_NOT_LABELED,
GDU_ERROR_NOT_FILESYSTEM,
GDU_ERROR_NOT_LUKS,
GDU_ERROR_NOT_LOCKED,
@@ -75,9 +78,10 @@ typedef enum
GDU_ERROR_NOT_LINUX_MD,
GDU_ERROR_NOT_LINUX_MD_COMPONENT,
GDU_ERROR_NOT_DRIVE,
- GDU_ERROR_NOT_SMART_CAPABLE,
GDU_ERROR_NOT_SUPPORTED,
GDU_ERROR_NOT_FOUND,
+ GDU_ERROR_ATA_SMART_NOT_AVAILABLE,
+ GDU_ERROR_ATA_SMART_WOULD_WAKEUP
} GduError;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]