All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Wengang Wang <wen.gang.wang@oracle.com>
Cc: Chris Mason <chris.mason@oracle.com>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs-progs: add mounted-checking for btrfs-vol
Date: Wed, 03 Feb 2010 10:11:21 +0800	[thread overview]
Message-ID: <4B68DB49.4070905@cn.fujitsu.com> (raw)
In-Reply-To: <20100202090813.GC4080@laptop.oracle.com>

Hi,

on 2010-2-2 17:08, Wengang Wang wrote:
[snip]
>>  		devfd = open(device, O_RDWR);
>>  		if (!devfd) {
> I think open() returning -1 means an error. So it should be
> 		if (devfd < 0)
> instead of 
> 		if (!devfd)

Yes, you are right. 
Thanks for your comment. I'll remake a patch.

Regards
Miao

> 
> regards,
> wengang.
>>  			fprintf(stderr, "Unable to open device %s\n", device);
>> +			exit(1);
>>  		}
>>  		ret = fstat(devfd, &st);
>>  		if (ret) {
> 
> 
> 



      reply	other threads:[~2010-02-03  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02  8:45 [PATCH] btrfs-progs: add mounted-checking for btrfs-vol Miao Xie
2010-02-02  9:08 ` Wengang Wang
2010-02-03  2:11   ` Miao Xie [this message]

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=4B68DB49.4070905@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wen.gang.wang@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.