mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] Add copy_file_range system call
Date: Wed, 21 Aug 2019 23:09:45 -0400	[thread overview]
Message-ID: <20190822030945.GI9017@brightrain.aerifal.cx> (raw)
In-Reply-To: <20190819234114.19848-1-arni@dagur.eu>

On Mon, Aug 19, 2019 at 11:41:14PM +0000, Árni Dagur wrote:
> This patch was based on commit 53147f9, which added splice and vmsplice.
> ---
>  The function signature in the glibc manpage specifies `loff_t` instead
>  of `off_t`, for both `copy_file_range` and `splice`. In musl, however, 
>  the function signature for `splice` specifies `off_t`, so I did the
>  same here. I'm not an experienced C programmer, so that may have been
>  wrong.
> 
>  include/unistd.h            | 1 +
>  src/linux/copy_file_range.c | 8 ++++++++
>  2 files changed, 9 insertions(+)
>  create mode 100644 src/linux/copy_file_range.c
> 
> diff --git a/include/unistd.h b/include/unistd.h
> index 9485da7a..00cc7042 100644
> --- a/include/unistd.h
> +++ b/include/unistd.h
> @@ -188,6 +188,7 @@ char *get_current_dir_name(void);
>  int syncfs(int);
>  int euidaccess(const char *, int);
>  int eaccess(const char *, int);
> +ssize_t copy_file_range(int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, unsigned flags);
>  #endif

Oh, one other detail I missed: the argument names here are not valid.
To be valid they'd need to be in the reserved namespace, but musl
policy is not to use them at all in prototypes. I can fix this when
applying, so no problem.

Rich


  parent reply	other threads:[~2019-08-22  3:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 23:41 Árni Dagur
2019-08-20  0:56 ` Rich Felker
2019-08-20  2:11   ` Rich Felker
2019-08-20 10:28   ` Ismael Luceno
2019-08-22  3:09 ` Rich Felker [this message]
2019-08-24  0:25 ` Rich Felker

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=20190822030945.GI9017@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).