[parted-devel] [PATCH] Handle partial reads correctly

Jim Meyering jim at meyering.net
Fri Jul 6 11:52:43 UTC 2007


Michael Brennan <brennan.brisad at gmail.com> wrote:
> I found a little bug in the linux_read function and now want to
> try to send a minimal patch to fix it.  But I have never done
> it before and I'm not sure on how this works.  Here I have just
> taken the output from git-diff and sent it in the mail, is that
> the correct way to do it?  Also does it matter if the patch is
> sent as an attachment or in the message body?
> Is there any more info I need to send in order to send patches?
>
> Thanks
>
> The patch fixes a problem where a partial read would not be
> handled correctly, I also changed the status variable to ssize_t.

Thank you.
The patch is fine.
I've applied it (I wrote the log entry and manually attributed it to you).
I also added a cast-to-ssize_t on the RHS, so that this comparison compares
like-signed quantities:

+                if (status == read_length) break;

Next time, please do an actual commit (probably on a scratch branch
created with "git-checkout -b scratch") where you'd also write a log
entry with a one-line summary on the first line, and then do this:

  git-format-patch --stdout --signoff HEAD~1 > patch

Then, if you mail the file "patch" to the list, someone here can
easily apply it with "git-am patch".



More information about the parted-devel mailing list