From 4d6bf893973fec64b123690ea80be251dfe7a1ac Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 21 Aug 2017 19:00:54 -0600 Subject: [PATCH] Add debug messages, update lock file --- Cargo.lock | 21 +++++---------------- src/ethernetd/main.rs | 2 ++ src/icmpd/main.rs | 2 ++ src/ipd/main.rs | 2 ++ src/tcpd/main.rs | 2 ++ src/udpd/main.rs | 2 ++ 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b19915a09..1c9ca4a0da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gcc" -version = "0.3.52" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "netutils" version = "0.1.0" -source = "git+https://github.com/redox-os/netutils.git#a09e97dbe67e1e8d194da7c9900e1e5b2111cded" +source = "git+https://github.com/redox-os/netutils.git#849b72c5b9e77a654a51521276dc6f2223a67aec" dependencies = [ "arg_parser 0.1.0 (git+https://github.com/redox-os/arg-parser.git)", "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", @@ -203,7 +203,7 @@ dependencies = [ "pbr 1.0.0 (git+https://github.com/a8m/pb)", "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", "redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.0 (git+https://github.com/redox-os/termion.git?branch=redox_termios)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -296,7 +296,7 @@ name = "ring" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.52 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -326,16 +326,6 @@ name = "scopeguard" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "termion" -version = "1.5.0" -source = "git+https://github.com/redox-os/termion.git?branch=redox_termios#18e589b9d92e8f93ae75475389e234bbe5deb109" -dependencies = [ - "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "termion" version = "1.5.1" @@ -450,7 +440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a" "checksum extra 0.1.0 (git+https://github.com/redox-os/libextra.git)" = "" "checksum futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4b63a4792d4f8f686defe3b39b92127fea6344de5d38202b2ee5a11bbbf29d6a" -"checksum gcc 0.3.52 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7d19683108136d21d32723077e69cd5df2bfd6d102c74a01d743cf2b65cf97" +"checksum gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)" = "e8310f7e9c890398b0e80e301c4f474e9918d2b27fca8f48486ca775fa9ffc5a" "checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07" "checksum hyper 0.10.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0f01e4a20f5dfa5278d7762b7bdb7cab96e24378b9eca3889fbd4b5e94dc7063" "checksum hyper-rustls 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04535774f79684c99528944ebdb89756c945c027e55ce52faa245879d836c8fb" @@ -479,7 +469,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17727f4b991294da2c84d75a43c003151ff58072212768800f66c56ee46dca43" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918" -"checksum termion 1.5.0 (git+https://github.com/redox-os/termion.git?branch=redox_termios)" = "" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" diff --git a/src/ethernetd/main.rs b/src/ethernetd/main.rs index 7185435937..f29f21b197 100644 --- a/src/ethernetd/main.rs +++ b/src/ethernetd/main.rs @@ -87,10 +87,12 @@ fn daemon(network_fd: usize, socket_fd: usize) { } fn main() { + println!("ethernetd: opening network:"); match syscall::open("network:", syscall::O_RDWR | syscall::O_NONBLOCK) { Ok(network_fd) => { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { + println!("ethernetd: providing ethernet:"); match syscall::open(":ethernet", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) { Ok(socket_fd) => { daemon(network_fd, socket_fd); diff --git a/src/icmpd/main.rs b/src/icmpd/main.rs index 4284ae5d87..25026b656c 100644 --- a/src/icmpd/main.rs +++ b/src/icmpd/main.rs @@ -22,10 +22,12 @@ fn run() -> Result<()> { return Ok(()); } + println!("icmpd: opening ip:1:"); let icmp_fd = syscall::open("ip:1", O_RDWR | O_NONBLOCK) .map_err(|e| Error::from_syscall_error(e, "failed to open ip:1"))? as RawFd; + println!("icmpd: prividing icmp:"); let scheme_fd = syscall::open(":icmp", O_RDWR | O_CREAT | O_NONBLOCK) .map_err(|e| Error::from_syscall_error(e, "failed to open :icmp"))? as RawFd; diff --git a/src/ipd/main.rs b/src/ipd/main.rs index c5ce140634..3c5693feb6 100644 --- a/src/ipd/main.rs +++ b/src/ipd/main.rs @@ -316,11 +316,13 @@ fn daemon(arp_fd: usize, ip_fd: usize, scheme_fd: usize) { } fn main() { + println!("ipd: opening ethernet:806"); match syscall::open("ethernet:806", syscall::O_RDWR | syscall::O_NONBLOCK) { Ok(arp_fd) => match syscall::open("ethernet:800", syscall::O_RDWR | syscall::O_NONBLOCK) { Ok(ip_fd) => { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { + println!("ipd: providing ip:"); match syscall::open(":ip", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) { Ok(scheme_fd) => { daemon(arp_fd, ip_fd, scheme_fd); diff --git a/src/tcpd/main.rs b/src/tcpd/main.rs index 1c3a881ccc..ae1c56d593 100644 --- a/src/tcpd/main.rs +++ b/src/tcpd/main.rs @@ -910,10 +910,12 @@ fn main() { let time_path = format!("time:{}", CLOCK_MONOTONIC); match syscall::open(&time_path, O_RDWR) { Ok(time_fd) => { + println!("tcpd: opening ip:6"); match syscall::open("ip:6", O_RDWR | O_NONBLOCK) { Ok(tcp_fd) => { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { + println!("tcpd: providing tcp:"); match syscall::open(":tcp", O_RDWR | O_CREAT | O_NONBLOCK) { Ok(scheme_fd) => { daemon(scheme_fd, tcp_fd, time_fd); diff --git a/src/udpd/main.rs b/src/udpd/main.rs index 23d6479af7..43d511d625 100644 --- a/src/udpd/main.rs +++ b/src/udpd/main.rs @@ -557,10 +557,12 @@ fn main() { let time_path = format!("time:{}", CLOCK_MONOTONIC); match syscall::open(&time_path, O_RDWR) { Ok(time_fd) => { + println!("udpd: opening ip:11"); match syscall::open("ip:11", O_RDWR | O_NONBLOCK) { Ok(udp_fd) => { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { + println!("udpd: providing udp:"); match syscall::open(":udp", O_RDWR | O_CREAT | O_NONBLOCK) { Ok(scheme_fd) => { daemon(scheme_fd, udp_fd, time_fd);