[gnome-disk-utility/new-ui] Add support for minix fs and Error.Filesystem{Driver, Tools}Missing
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/new-ui] Add support for minix fs and Error.Filesystem{Driver, Tools}Missing
- Date: Mon, 2 Nov 2009 17:32:06 +0000 (UTC)
commit 86538c45143e32e5e42abd20807826266fa22084
Author: David Zeuthen <davidz redhat com>
Date: Mon Nov 2 12:30:37 2009 -0500
Add support for minix fs and Error.Filesystem{Driver,Tools}Missing
See
https://bugs.freedesktop.org/show_bug.cgi?id=24679
https://bugs.freedesktop.org/show_bug.cgi?id=24718
for the DeviceKit-disks bits.
src/gdu-gtk/gdu-error-dialog.c | 6 ++++++
src/gdu/gdu-error.c | 4 ++++
src/gdu/gdu-error.h | 4 ++++
src/gdu/gdu-util.c | 15 +++++++++++++++
4 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/gdu-gtk/gdu-error-dialog.c b/src/gdu-gtk/gdu-error-dialog.c
index 4f4725f..9c76668 100644
--- a/src/gdu-gtk/gdu-error-dialog.c
+++ b/src/gdu-gtk/gdu-error-dialog.c
@@ -231,6 +231,12 @@ gdu_error_dialog_constructed (GObject *object)
case GDU_ERROR_PERMISSION_DENIED:
error_msg = _("Permission denied");
break;
+ case GDU_ERROR_FILESYSTEM_DRIVER_MISSING:
+ error_msg = _("Filesystem driver not installed");
+ break;
+ case GDU_ERROR_FILESYSTEM_TOOLS_MISSING:
+ error_msg = _("Filesystem tools not installed");
+ break;
}
}
if (error_msg == NULL)
diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c
index 6425a6b..665d8b3 100644
--- a/src/gdu/gdu-error.c
+++ b/src/gdu/gdu-error.c
@@ -85,6 +85,10 @@ _gdu_error_fixup (GError *error)
error->code = GDU_ERROR_ATA_SMART_WOULD_WAKEUP;
else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.PermissionDenied") == 0)
error->code = GDU_ERROR_PERMISSION_DENIED;
+ else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.FilesystemDriverMissing") == 0)
+ error->code = GDU_ERROR_FILESYSTEM_DRIVER_MISSING;
+ else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.FilesystemToolsMissing") == 0)
+ error->code = GDU_ERROR_FILESYSTEM_TOOLS_MISSING;
else
matched = FALSE;
diff --git a/src/gdu/gdu-error.h b/src/gdu/gdu-error.h
index ce1349b..53ac0d2 100644
--- a/src/gdu/gdu-error.h
+++ b/src/gdu/gdu-error.h
@@ -40,6 +40,8 @@ G_BEGIN_DECLS
* @GDU_ERROR_NOT_SUPPORTED: Operation not supported.
* @GDU_ERROR_ATA_SMART_WOULD_WAKEUP: Getting S.M.A.R.T. data for the device would require to spin it up.
* @GDU_ERROR_PERMISSION_DENIED: Permission denied.
+ * @GDU_ERROR_FILESYSTEM_DRIVER_MISSING: The filesystem driver for a filesystem is not installed.
+ * @GDU_ERROR_FILESYSTEM_TOOLS_MISSING: User-space tools to carry out the request action on a filesystem is not installed.
*
* Error codes in the #GDU_ERROR domain.
*/
@@ -53,6 +55,8 @@ typedef enum
GDU_ERROR_NOT_SUPPORTED,
GDU_ERROR_ATA_SMART_WOULD_WAKEUP,
GDU_ERROR_PERMISSION_DENIED,
+ GDU_ERROR_FILESYSTEM_DRIVER_MISSING,
+ GDU_ERROR_FILESYSTEM_TOOLS_MISSING
} GduError;
/**
diff --git a/src/gdu/gdu-util.c b/src/gdu/gdu-util.c
index 5f646e7..6e70b2b 100644
--- a/src/gdu/gdu-util.c
+++ b/src/gdu/gdu-util.c
@@ -330,6 +330,14 @@ gdu_util_get_fstype_for_display (const char *fstype, const char *fsversion, gboo
/* Translators: short name for 'RAID Component' */
s = g_strdup (_("raid"));
}
+ } else if (strcmp (fstype, "minix") == 0) {
+ if (long_string) {
+ /* Translators: long filesystem type for minix */
+ s = g_strdup (_("Minix"));
+ } else {
+ /* Translators: filesystem type for minix */
+ s = g_strdup (_("minix"));
+ }
} else {
s = g_strdup (fstype);
}
@@ -501,6 +509,7 @@ static struct {
{"mbr", "0x1c", N_("Hidden W95 FAT32 (LBA) (0x1c)")},
{"mbr", "0x1e", N_("Hidden W95 FAT16 (LBA) (0x1e)")},
{"mbr", "0x3c", N_("PartitionMagic (0x3c)")},
+ {"mbr", "0x81", N_("Minix (0x81)")}, /* cf. http://en.wikipedia.org/wiki/MINIX_file_system */
{"mbr", "0x82", N_("Linux swap (0x82)")},
{"mbr", "0x83", N_("Linux (0x83)")},
{"mbr", "0x84", N_("Hibernation (0x84)")},
@@ -574,6 +583,10 @@ gdu_util_fstype_get_description (char *fstype)
return g_strdup (_("The native Windows file system. Not widely compatible with other "
"operating systems than Windows."));
+ else if (strcmp (fstype, "minix") == 0)
+ return g_strdup (_("Simple filesystem with low overhead and UNIX permissions support. "
+ "Not widely compatible with other operating systems than Linux and Minix."));
+
else if (strcmp (fstype, "empty") == 0)
return g_strdup (_("No file system will be created."));
@@ -632,6 +645,8 @@ gdu_util_get_default_part_type_for_scheme_and_fstype (const char *scheme, const
type = "0x82";
} else if (g_strcmp0 (fstype, "ntfs") == 0) {
type = "0x07";
+ } else if (g_strcmp0 (fstype, "minix") == 0) {
+ type = "0x81";
} else {
type = "0x83";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]