summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parttype.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parttype.c b/parttype.c
index cbdae82..be8c966 100644
--- a/parttype.c
+++ b/parttype.c
@@ -25,6 +25,11 @@ static PyMethodDef PartType_methods[] = {
{NULL}
};
+static PyObject *PartType_get_string(PartTypeObject *self)
+{
+ return PyObjectResultStr(fdisk_parttype_get_string(self->type));
+}
+
static PyObject *PartType_get_name(PartTypeObject *self)
{
return PyObjectResultStr(fdisk_parttype_get_name(self->type));
@@ -36,6 +41,7 @@ static PyObject *PartType_get_code(PartTypeObject *self)
}
static PyGetSetDef PartType_getseters[] = {
+ {"string", (getter)PartType_get_string, NULL, "partition type string (GUID for GPT)", NULL},
{"name", (getter)PartType_get_name, NULL, "parttype human readable name", NULL},
{"code", (getter)PartType_get_code, NULL, "parttype DOS code", NULL},
{NULL}