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 User

 
 
LinkBack Thread Tools
 
Old 02-16-2009, 08:55 PM
Hans de Goede
 
Default PATCH: pyblock: stop calling get_group with non NULL terminated argv list

Hi All,

Untested, but this should fix the dmraid errors and the hang we've been seeing
on nvidia


Regards,

Hans

diff -up pyblock-0.34/dmraid.c~ pyblock-0.34/dmraid.c
--- pyblock-0.34/dmraid.c~ 2009-02-02 16:28:48.000000000 +0100
+++ pyblock-0.34/dmraid.c 2009-02-16 22:52:56.000000000 +0100
@@ -1269,18 +1269,11 @@ pydmraid_ctx_discover_raidsets(PyObject
}

Py_DECREF(name);
- if (!group_set(ctx->lc, &rd->name)) {
- /*
- * This means that whatever was in name did not
- * play well with current context. lest try
- * a NULL list.
- */
- char *temp[] = {NULL};
- if (!group_set(ctx->lc, temp)){
- pyblock_PyErr_Format(GroupingError, "%s", rd->name);
- Py_DECREF(dict);
- return NULL;
- }
+ char *argv[] = { rd->name, NULL };
+ if (!group_set(ctx->lc, argv)) {
+ pyblock_PyErr_Format(GroupingError, "%s", rd->name);
+ Py_DECREF(dict);
+ return NULL;
}
Py_DECREF(dict);
}

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-16-2009, 10:09 PM
David Cantrell
 
Default PATCH: pyblock: stop calling get_group with non NULL terminated argv list

Hans de Goede wrote:

Hi All,

Untested, but this should fix the dmraid errors and the hang we've been
seeing on nvidia


Regards,

Hans

diff -up pyblock-0.34/dmraid.c~ pyblock-0.34/dmraid.c
--- pyblock-0.34/dmraid.c~ 2009-02-02 16:28:48.000000000 +0100
+++ pyblock-0.34/dmraid.c 2009-02-16 22:52:56.000000000 +0100
@@ -1269,18 +1269,11 @@ pydmraid_ctx_discover_raidsets(PyObject
}

Py_DECREF(name);
- if (!group_set(ctx->lc, &rd->name)) {
- /*
- * This means that whatever was in name did not
- * play well with current context. lest try
- * a NULL list.
- */
- char *temp[] = {NULL};
- if (!group_set(ctx->lc, temp)){
- pyblock_PyErr_Format(GroupingError, "%s", rd->name);
- Py_DECREF(dict);
- return NULL;
- }
+ char *argv[] = { rd->name, NULL };
+ if (!group_set(ctx->lc, argv)) {
+ pyblock_PyErr_Format(GroupingError, "%s", rd->name);
+ Py_DECREF(dict);
+ return NULL;
}
Py_DECREF(dict);
}



Code looks ok to me.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
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 01:39 PM.

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