qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 01/10] cow: return errno instead of -1
Date: Tue, 09 Mar 2010 11:45:03 -0600	[thread overview]
Message-ID: <4B96891F.7070207@codemonkey.ws> (raw)
In-Reply-To: <001703bb3cac98fecb6d5003c8604d350931c3d3.1267692963.git.quintela@redhat.com>

On 03/04/2010 03:00 AM, Juan Quintela wrote:
> Remove not needed ret = 0 assignment.
>
> Signed-off-by: Juan Quintela<quintela@redhat.com>
>    

Applied all.  Thanks.

Regards,

Anthony Liguori

> ---
>   block/cow.c |    5 ++---
>   1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/block/cow.c b/block/cow.c
> index 3733385..97e9745 100644
> --- a/block/cow.c
> +++ b/block/cow.c
> @@ -224,7 +224,7 @@ static int cow_create(const char *filename, QEMUOptionParameter *options)
>       cow_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
>                 0644);
>       if (cow_fd<  0)
> -        return -1;
> +        return -errno;
>       memset(&cow_header, 0, sizeof(cow_header));
>       cow_header.magic = cpu_to_be32(COW_MAGIC);
>       cow_header.version = cpu_to_be32(COW_VERSION);
> @@ -251,7 +251,7 @@ static int cow_create(const char *filename, QEMUOptionParameter *options)
>       cow_header.size = cpu_to_be64(image_sectors * 512);
>       ret = qemu_write_full(cow_fd,&cow_header, sizeof(cow_header));
>       if (ret != sizeof(cow_header)) {
> -        ret = -1;
> +        ret = -errno;
>           goto exit;
>       }
>
> @@ -262,7 +262,6 @@ static int cow_create(const char *filename, QEMUOptionParameter *options)
>           goto exit;
>       }
>
> -    ret = 0;
>   exit:
>       close(cow_fd);
>       return ret;
>    

  reply	other threads:[~2010-03-09 17:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  9:00 [Qemu-devel] [PATCH v2 00/10] FORTIFY_SOURCE followup Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 01/10] cow: return errno instead of -1 Juan Quintela
2010-03-09 17:45   ` Anthony Liguori [this message]
2010-03-04  9:00 ` [Qemu-devel] [PATCH 02/10] slirp: check system() success Juan Quintela
2010-03-04  9:20   ` [Qemu-devel] " Michael S. Tsirkin
2010-03-04  9:00 ` [Qemu-devel] [PATCH 03/10] qcow2: return errno instead of -1 Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 04/10] qcow: " Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 05/10] vmdk: " Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 06/10] vmdk: make vmdk_snapshot_create return -errno Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 07/10] vmdk: fix double free Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 08/10] vmdk: share cleanup code Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 09/10] block: print errno on error Juan Quintela
2010-03-04  9:00 ` [Qemu-devel] [PATCH 10/10] documentation: qemu_write_full don't work with non-blocking fd's Juan Quintela
  -- strict thread matches above, loose matches on Subject: below --
2010-03-03 12:06 [Qemu-devel] [PATCH 00/10] FORTIFY_SOURCE followup Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 01/10] cow: return errno instead of -1 Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B96891F.7070207@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).