Skip to content

Commit 40e0d54

Browse files
committed
Auto merge of #1939 - DarcInc:add_freebsd_nmount, r=JohnTitor
Add freebsd nmount Adding FreeBSD's nmount call to mount devices on filesystems. nmount is preferred over mount.
2 parents 70b227b + 16e0a0b commit 40e0d54

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ extern "C" {
214214
msgtyp: ::c_long,
215215
msgflg: ::c_int,
216216
) -> ::c_int;
217+
218+
pub fn fdatasync(fd: ::c_int) -> ::c_int;
217219
}
218220

219221
cfg_if! {

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ extern "C" {
227227
rqtp: *const ::timespec,
228228
rmtp: *mut ::timespec,
229229
) -> ::c_int;
230+
231+
pub fn fdatasync(fd: ::c_int) -> ::c_int;
230232
}
231233

232234
cfg_if! {

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,6 @@ extern "C" {
12991299
flags: ::c_int,
13001300
) -> ::c_int;
13011301

1302-
pub fn fdatasync(fd: ::c_int) -> ::c_int;
13031302
pub fn posix_fallocate(
13041303
fd: ::c_int,
13051304
offset: ::off_t,
@@ -1499,6 +1498,12 @@ extern "C" {
14991498
needle: *const ::c_void,
15001499
needlelen: ::size_t,
15011500
) -> *mut ::c_void;
1501+
1502+
pub fn nmount(
1503+
iov: *mut ::iovec,
1504+
niov: ::c_uint,
1505+
flags: ::c_int
1506+
) -> ::c_int;
15021507
}
15031508

15041509
#[link(name = "util")]

0 commit comments

Comments
 (0)