util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Peter Cordes <peter@cordes.ca>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] fallocate: create mode 0666, that's what umask is for
Date: Wed, 7 Jan 2015 10:03:54 +0100	[thread overview]
Message-ID: <20150107090354.GA15715@x2.net.home> (raw)
In-Reply-To: <1419915737-27310-1-git-send-email-peter@cordes.ca>

On Tue, Dec 30, 2014 at 01:02:17AM -0400, Peter Cordes wrote:
> diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
> index 0e06524b8c5837a63230dc047233c657c50c1d7c..9af3bb8ce1492defda57cc17764197790bb34c8e 100644
> --- a/sys-utils/fallocate.c
> +++ b/sys-utils/fallocate.c
> @@ -365,7 +365,7 @@ int main(int argc, char **argv)
>  
>  	/* O_CREAT makes sense only for the default fallocate(2) behavior
>  	 * when mode is no specified and new space is allocated */
> -	fd = open(filename, O_RDWR | (!dig && !mode ? O_CREAT : 0), 0644);
> +	fd = open(filename, O_RDWR | (!dig && !mode ? O_CREAT : 0), 0666);

 Applied, but I have replaced the number with 

    S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH

 macros to keep the code more readable.

 Thanks
     Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2015-01-07  9:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30  5:02 [PATCH] fallocate: create mode 0666, that's what umask is for Peter Cordes
2015-01-07  9:03 ` Karel Zak [this message]
2015-01-07 22:46   ` Peter Cordes
2015-01-08  9:13     ` Karel Zak
2015-01-08 18:26       ` Peter Cordes

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=20150107090354.GA15715@x2.net.home \
    --to=kzak@redhat.com \
    --cc=peter@cordes.ca \
    --cc=util-linux@vger.kernel.org \
    /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).