Skip to content

Commit 5e95cbb

Browse files
committed
Auto merge of #2602 - devnexen:apple_fcntl_update, r=JohnTitor
apple fcntl fn update.
2 parents 6eff28d + 7e06980 commit 5e95cbb

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,16 @@ FLUSHO
289289
FOPEN_MAX
290290
F_ALLOCATEALL
291291
F_ALLOCATECONTIG
292+
F_BARRIERFSYNC
292293
F_FREEZE_FS
293294
F_FULLFSYNC
294295
F_GETOWN
295296
F_GETPATH
297+
F_GETPATH_NOFIRMLINK
296298
F_GLOBAL_NOCACHE
297299
F_LOCK
300+
F_LOG2PHYS
301+
F_LOG2PHYS_EXT
298302
F_NOCACHE
299303
F_NODIRECT
300304
F_PEOFPOSMODE
@@ -1729,6 +1733,7 @@ listxattr
17291733
load_command
17301734
localeconv_l
17311735
lockf
1736+
log2phys
17321737
login_tty
17331738
lutimes
17341739
mach_absolute_time

src/unix/bsd/apple/mod.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,13 @@ s_no_extra_traits! {
12171217
pub policy: ::policy_t,
12181218
pub suspend_count: integer_t,
12191219
}
1220+
1221+
#[cfg_attr(libc_packedN, repr(packed(4)))]
1222+
pub struct log2phys {
1223+
pub l2p_flags: ::c_uint,
1224+
pub l2p_contigbytes: ::off_t,
1225+
pub l2p_devoffset: ::off_t,
1226+
}
12201227
}
12211228

12221229
impl siginfo_t {
@@ -2467,6 +2474,37 @@ cfg_if! {
24672474
suspend_count.hash(state);
24682475
}
24692476
}
2477+
2478+
impl PartialEq for log2phys {
2479+
fn eq(&self, other: &log2phys) -> bool {
2480+
self.l2p_flags == other.l2p_flags
2481+
&& self.l2p_contigbytes == other.l2p_contigbytes
2482+
&& self.l2p_devoffset == other.l2p_devoffset
2483+
}
2484+
}
2485+
impl Eq for log2phys {}
2486+
impl ::fmt::Debug for log2phys {
2487+
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
2488+
let l2p_flags = self.l2p_flags;
2489+
let l2p_contigbytes = self.l2p_contigbytes;
2490+
let l2p_devoffset = self.l2p_devoffset;
2491+
f.debug_struct("log2phys")
2492+
.field("l2p_flags", &l2p_flags)
2493+
.field("l2p_contigbytes", &l2p_contigbytes)
2494+
.field("l2p_devoffset", &l2p_devoffset)
2495+
.finish()
2496+
}
2497+
}
2498+
impl ::hash::Hash for log2phys {
2499+
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
2500+
let l2p_flags = self.l2p_flags;
2501+
let l2p_contigbytes = self.l2p_contigbytes;
2502+
let l2p_devoffset = self.l2p_devoffset;
2503+
l2p_flags.hash(state);
2504+
l2p_contigbytes.hash(state);
2505+
l2p_devoffset.hash(state);
2506+
}
2507+
}
24702508
}
24712509
}
24722510

@@ -2943,12 +2981,16 @@ pub const F_PREALLOCATE: ::c_int = 42;
29432981
pub const F_RDADVISE: ::c_int = 44;
29442982
pub const F_RDAHEAD: ::c_int = 45;
29452983
pub const F_NOCACHE: ::c_int = 48;
2984+
pub const F_LOG2PHYS: ::c_int = 49;
29462985
pub const F_GETPATH: ::c_int = 50;
29472986
pub const F_FULLFSYNC: ::c_int = 51;
29482987
pub const F_FREEZE_FS: ::c_int = 53;
29492988
pub const F_THAW_FS: ::c_int = 54;
29502989
pub const F_GLOBAL_NOCACHE: ::c_int = 55;
29512990
pub const F_NODIRECT: ::c_int = 62;
2991+
pub const F_LOG2PHYS_EXT: ::c_int = 65;
2992+
pub const F_BARRIERFSYNC: ::c_int = 85;
2993+
pub const F_GETPATH_NOFIRMLINK: ::c_int = 102;
29522994

29532995
pub const F_ALLOCATECONTIG: ::c_uint = 0x02;
29542996
pub const F_ALLOCATEALL: ::c_uint = 0x04;

0 commit comments

Comments
 (0)