Re: [PATCH] 9p bug fix: return non-zero error value in p9_put_data

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Van Hensbergen
Date: Tuesday, September 23, 2008 - 1:33 pm

Hey - first of all, sorry for the long delay on responding to this,
I've just gotten back to my patch queue.

On Tue, Sep 2, 2008 at 2:04 PM, Abhishek Kulkarni <kulkarni@lanl.gov> wrote:

Please include the original description when resubmitting patches --
this will allow me to suck it into my tree more effectively.


What happens if buf_alloc returns NULL?

Isn't the right behavior something more along the lines of:

static int
p9_put_data(struct cbuf *bufp, const char *data, int count,
                   unsigned char **pdata)
{
        *pdata = buf_alloc(bufp, count);'
        if(*pdata)
            memmove(*pdata, data, count);
            return 0;
        else
            return ENOMEM;
}

                  -eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] 9p bug fix: return non-zero error value in p9_put_data, Abhishek Kulkarni, (Tue Aug 26, 10:30 am)
Re: [V9fs-developer] [PATCH] 9p bug fix: return non-zero e ..., Latchesar Ionkov, (Tue Aug 26, 11:53 am)
Re: [PATCH] 9p bug fix: return non-zero error value in p9_ ..., Eric Van Hensbergen, (Thu Aug 28, 11:10 am)
Re: [PATCH] 9p bug fix: return non-zero error value in p9_ ..., Abhishek Kulkarni, (Thu Aug 28, 11:35 am)
Re: [PATCH] 9p bug fix: return non-zero error value in p9_ ..., Abhishek Kulkarni, (Tue Sep 2, 12:04 pm)
Re: [PATCH] 9p bug fix: return non-zero error value in p9_ ..., Eric Van Hensbergen, (Tue Sep 23, 1:33 pm)