Skip to content

Commit 86a091c

Browse files
committed
Auto merge of #1200 - alecmocatta:master, r=alexcrichton
add FIO* for FreeBSD and NetBSD Calculated [here](https://repl.it/repls/PaltryTroubledMonitors) from FreeBSD [source](https://github.com/freebsd/freebsd/blob/9867e6d8fe1cac34121e5f2df9357363f5659617/sys/sys/filio.h). Calculated [here](https://repl.it/repls/ProfitableImpracticalComputeranimation) from NetBSD [source](https://github.com/NetBSD/src/blob/64b8a48e1288eb3902ed73113d157af50b2ec596/sys/sys/filio.h). Some of these are likely identical across all BSDs – if this can be confirmed they could be elevated to `unix/bsd/mod.rs` alongside `FIOCLEX` and `FIONBIO`.
2 parents c3c5e9c + f97d3c4 commit 86a091c

File tree

2 files changed

+26
-0
lines changed
  • src/unix/bsd

2 files changed

+26
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,19 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
447447
pub const TIOCM_DCD: ::c_int = 0x40;
448448
pub const H4DISC: ::c_int = 0x7;
449449

450+
pub const FIONCLEX: ::c_ulong = 0x20006602;
451+
pub const FIONREAD: ::c_ulong = 0x4004667f;
452+
pub const FIOASYNC: ::c_ulong = 0x8004667d;
453+
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
454+
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
455+
pub const FIODTYPE: ::c_ulong = 0x4004667a;
456+
pub const FIOGETLBA: ::c_ulong = 0x40046679;
457+
pub const FIODGNAME: ::c_ulong = 0x80106678;
458+
pub const FIONWRITE: ::c_ulong = 0x40046677;
459+
pub const FIONSPACE: ::c_ulong = 0x40046676;
460+
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
461+
pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
462+
450463
pub const JAIL_API_VERSION: u32 = 2;
451464
pub const JAIL_CREATE: ::c_int = 0x01;
452465
pub const JAIL_UPDATE: ::c_int = 0x02;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,19 @@ pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
987987
pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
988988
pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
989989

990+
pub const FIONCLEX: ::c_ulong = 0x20006602;
991+
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
992+
pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
993+
pub const FIONREAD: ::c_ulong = 0x4004667f;
994+
pub const FIOASYNC: ::c_ulong = 0x8004667d;
995+
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
996+
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
997+
pub const OFIOGETBMAP: ::c_ulong = 0xc004667a;
998+
pub const FIOGETBMAP: ::c_ulong = 0xc008667a;
999+
pub const FIONWRITE: ::c_ulong = 0x40046679;
1000+
pub const FIONSPACE: ::c_ulong = 0x40046678;
1001+
pub const FIBMAP: ::c_ulong = 0xc008667a;
1002+
9901003
pub const SIGSTKSZ : ::size_t = 40960;
9911004

9921005
pub const PT_DUMPCORE: ::c_int = 12;

0 commit comments

Comments
 (0)