FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 03-03-2009, 10:22 PM
Joel Granados Moreno
 
Default A different approach to disks that do not support names.

---
src/pydisk.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/pydisk.c b/src/pydisk.c
index 5fac23f..1c70f63 100644
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -1013,6 +1013,11 @@ PyObject *py_ped_partition_get_name(_ped_Partition *s, PyObject *args) {
return NULL;
}

+ if (!ped_disk_type_check_feature (part->disk->type, PED_DISK_TYPE_PARTITION_NAME)) {
+ /* This means that names are not supported. Lets return None. */
+ return Py_None;
+ }
+
if (part) {
ret = (char *) ped_partition_get_name(part);
if (ret == NULL) {
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org