Skip to content

Commit

Permalink
Auto merge of #2899 - devnexen:linux_fileclone, r=JohnTitor
Browse files Browse the repository at this point in the history
linux add FICLONE* ioctl.
  • Loading branch information
bors committed Sep 5, 2022
2 parents aec8514 + 76577ea commit 628a321
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -588,6 +588,8 @@ FF1
FFDLY
FF_CNT
FF_MAX
FICLONE
FICLONERANGE
FILENAME_MAX
FIONCLEX
FIONREAD
Expand Down Expand Up @@ -2770,6 +2772,7 @@ ff_rumble_effect
ff_trigger
fgetpos64
fgetxattr
file_clone_range
flistxattr
fmemopen
fopen64
Expand Down
12 changes: 12 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -596,6 +596,13 @@ s! {
pub nla_len: u16,
pub nla_type: u16,
}

pub struct file_clone_range {
pub src_fd: ::__s64,
pub src_offset: ::__u64,
pub src_length: ::__u64,
pub dest_offset: ::__u64,
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -2225,6 +2232,11 @@ pub const NFQA_SKB_CSUMNOTREADY: ::c_int = 0x0001;
pub const NFQA_SKB_GSO: ::c_int = 0x0002;
pub const NFQA_SKB_CSUM_NOTVERIFIED: ::c_int = 0x0004;

// linux/fs.h

pub const FICLONE: ::c_ulong = 0x40049409;
pub const FICLONERANGE: ::c_ulong = 0x4020940D;

// linux/genetlink.h

pub const GENL_NAMSIZ: ::c_int = 16;
Expand Down

0 comments on commit 628a321

Please sign in to comment.