Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   PATCH: pyblock: stop calling get_group with non NULL terminated argv list (http://www.linux-archive.org/ubuntu-user/247191-patch-pyblock-stop-calling-get_group-non-null-terminated-argv-list.html)

Joel Granados 02-17-2009 02:01 PM

PATCH: pyblock: stop calling get_group with non NULL terminated argv list
 
This is a little different from what you sent me. Is there a reason to
not just use {NULL}? Moreover, I would like to see everything working
before commiting to anything.

regards.
On Mon, Feb 16, 2009 at 10:55:00PM +0100, 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);
> }
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Brno, Czech Republic, Red Hat.

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


All times are GMT. The time now is 02:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.