From: Eric Wong <e@80x24.org>
To: sleepy-penguin@bogomips.org
Subject: [PATCH] copy_file_range: add documentation
Date: Wed, 22 Mar 2017 02:10:12 +0000 [thread overview]
Message-ID: <20170322021012.18993-1-e@80x24.org> (raw)
The public API should be documented, after all.
---
lib/sleepy_penguin/cfr.rb | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/lib/sleepy_penguin/cfr.rb b/lib/sleepy_penguin/cfr.rb
index af94499..01cc4a0 100644
--- a/lib/sleepy_penguin/cfr.rb
+++ b/lib/sleepy_penguin/cfr.rb
@@ -1,4 +1,24 @@
module SleepyPenguin
+
+ # call-seq:
+ # SleepyPenguin.copy_file_range(src, dst, len[, keywords]) => # Integer
+ #
+ # Performs and in-kernel copy of +len+ bytes from +src+ to +dst+,
+ # where +src+ and +dst+ are regular files on the same filesystem.
+ # Returns the number of bytes copied, which may be less than
+ # requested.
+ #
+ # +flags+ is currently unused, but may be specified in the future.
+ #
+ # Keywords:
+ #
+ # :off_in and :off_out if non-nil may be used to specify an Integer
+ # offset for each respective descriptor. If specified, the file
+ # offsets of each file description will not be moved, providing
+ # pread(2)/pwrite(2)-like semantics.
+ #
+ # See copy_file_range(2) manpage for full documentation:
+ # http://man7.org/linux/man-pages/man2/copy_file_range.2.html
def self.copy_file_range(io_in, io_out, len, flags = 0,
off_in: nil, off_out: nil)
__cfr(io_in, off_in, io_out, off_out, len, flags)
--
EW
reply other threads:[~2017-03-22 2:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://yhbt.net/sleepy_penguin/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170322021012.18993-1-e@80x24.org \
--to=e@80x24.org \
--cc=sleepy-penguin@bogomips.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.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/sleepy_penguin.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).