diff --git a/Cargo.lock b/Cargo.lock index c0ae5e3796..fd63763246 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,8 +5,8 @@ name = "ahcid" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -14,19 +14,19 @@ name = "alxd" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)", + "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arg_parser" version = "0.1.0" -source = "git+https://gitlab.redox-os.org/redox-os/arg-parser.git#7503531821b0c111f9fac77a5d2536ea221105fe" +source = "git+https://gitlab.redox-os.org/redox-os/arg-parser.git#1c434b55f3e1a0375ebcca85b3e88db7378e82fa" [[package]] name = "arrayvec" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -34,7 +34,7 @@ dependencies = [ [[package]] name = "autocfg" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -42,16 +42,16 @@ name = "base64" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bgad" version = "0.1.0" dependencies = [ - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -61,7 +61,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -71,7 +71,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -79,18 +79,18 @@ name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.35" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -98,7 +98,7 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -106,29 +106,29 @@ name = "crossbeam-deque" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -137,9 +137,9 @@ name = "e1000d" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)", + "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -157,7 +157,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -168,25 +168,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.26" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "httparse" -version = "1.3.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.10.15" +version = "0.10.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -199,7 +199,7 @@ name = "hyper-rustls" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", "webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -221,7 +221,7 @@ version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -230,10 +230,20 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ixgbed" +version = "1.0.0" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)", + "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -248,11 +258,6 @@ name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.3.0" @@ -260,7 +265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" +version = "0.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -282,15 +287,15 @@ name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -300,8 +305,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memoffset" -version = "0.2.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "mime" @@ -314,28 +322,45 @@ dependencies = [ [[package]] name = "mio" version = "0.6.16" -source = "git+https://gitlab.redox-os.org/redox-os/mio#493d2b65c12b269c4481fd1dc2cd7d3670a880c9" +source = "git+https://gitlab.redox-os.org/redox-os/mio#439a559b2aa734e0970d37b3375889a57a465360" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio-uds" -version = "0.6.6" -source = "git+https://gitlab.redox-os.org/redox-os/mio-uds#2936ef82070ea0c4aa8a7360455b8c512d8c88c0" +version = "0.6.7" +source = "git+https://gitlab.redox-os.org/redox-os/mio-uds#22580ca398cdb5ed6f50fb61134e5579e2213999" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", ] @@ -355,8 +380,8 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -367,21 +392,39 @@ source = "git+https://gitlab.redox-os.org/redox-os/netutils.git#e28efbd6bbfabe42 dependencies = [ "arg_parser 0.1.0 (git+https://gitlab.redox-os.org/redox-os/arg-parser.git)", "extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)", - "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-rustls 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", "ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)", "pbr 1.0.1 (git+https://github.com/a8m/pb)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.13 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "netutils" +version = "0.1.0" +source = "git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix#649265429a25c80a7e30063c932367d625ff79c5" +dependencies = [ + "arg_parser 0.1.0 (git+https://gitlab.redox-os.org/redox-os/arg-parser.git)", + "extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)", + "pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "nodrop" version = "0.1.13" @@ -401,57 +444,67 @@ name = "num" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.39" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num_cpus" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "nvmed" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "orbclient" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -476,10 +529,10 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -488,21 +541,33 @@ name = "pbr" version = "1.0.1" source = "git+https://github.com/a8m/pb#b9792c9fe37343234316e23c263874cf383b208d" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pbr" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pcid" version = "0.1.0" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -525,7 +590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -536,38 +601,17 @@ name = "ps2d" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -575,13 +619,13 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -593,7 +637,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -602,12 +646,12 @@ name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -628,11 +672,11 @@ dependencies = [ [[package]] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -643,8 +687,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -654,8 +698,8 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -668,10 +712,10 @@ dependencies = [ [[package]] name = "ransid" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "vte 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -688,12 +732,12 @@ name = "redox_event" version = "0.1.0" source = "git+https://gitlab.redox-os.org/redox-os/event.git#c31e3d3d5f44d60ff9fec2b1ee58b982e72c0d77" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -701,7 +745,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -709,9 +753,9 @@ name = "ring" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -720,9 +764,9 @@ name = "rtl8168d" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)", + "netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -739,7 +783,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -751,14 +795,14 @@ name = "rusttype" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "safemem" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -766,6 +810,11 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "sct" version = "0.4.0" @@ -777,23 +826,24 @@ dependencies = [ [[package]] name = "sdl2" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sdl2-sys" -version = "0.31.0" +version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -811,17 +861,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.90" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.90" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -831,7 +881,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -849,26 +899,27 @@ name = "stb_truetype" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" -version = "0.15.30" +version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termion" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -877,8 +928,8 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -888,9 +939,9 @@ version = "0.1.13" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-current-thread 0.1.4 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", @@ -910,7 +961,7 @@ version = "0.1.1" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", ] @@ -919,7 +970,7 @@ name = "tokio-current-thread" version = "0.1.4" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", ] @@ -928,7 +979,7 @@ name = "tokio-executor" version = "0.1.5" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -936,7 +987,7 @@ name = "tokio-fs" version = "0.1.4" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-threadpool 0.1.9 (git+https://gitlab.redox-os.org/redox-os/tokio)", ] @@ -947,8 +998,8 @@ version = "0.1.10" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -956,12 +1007,12 @@ name = "tokio-reactor" version = "0.1.7" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", @@ -974,7 +1025,7 @@ version = "0.1.2" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", @@ -987,10 +1038,10 @@ version = "0.1.9" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", ] @@ -1000,8 +1051,8 @@ name = "tokio-timer" version = "0.2.8" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", ] @@ -1012,8 +1063,8 @@ version = "0.1.3" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", "tokio-codec 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", @@ -1026,12 +1077,12 @@ version = "0.2.4" source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", - "mio-uds 0.6.6 (git+https://gitlab.redox-os.org/redox-os/mio-uds)", + "mio-uds 0.6.7 (git+https://gitlab.redox-os.org/redox-os/mio-uds)", "tokio-codec 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", @@ -1042,7 +1093,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1076,7 +1127,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1108,9 +1159,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "vboxd" version = "0.1.0" dependencies = [ - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1122,9 +1173,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "vesad" version = "0.1.0" dependencies = [ - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", - "ransid 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", + "ransid 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "rusttype 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1199,106 +1250,108 @@ dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] "checksum arg_parser 0.1.0 (git+https://gitlab.redox-os.org/redox-os/arg-parser.git)" = "" -"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" -"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" +"checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" -"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46" +"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" -"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" -"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" +"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" +"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)" = "" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "62941eff9507c8177d448bd83a44d9b9760856e184081d8cd79ba9f03dd24981" -"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" +"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" "checksum hyper-rustls 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "71f7b2e5858ab9e19771dc361159f09ee5031734a6f7471fe0947db0238d92b7" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" +"checksum libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)" = "c665266eb592905e8503ba3403020f4b8794d26263f412ca33171600eca9a6fa" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)" = "" -"checksum mio-uds 0.6.6 (git+https://gitlab.redox-os.org/redox-os/mio-uds)" = "" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" +"checksum mio-uds 0.6.7 (git+https://gitlab.redox-os.org/redox-os/mio-uds)" = "" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)" = "" +"checksum netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix)" = "" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)" = "" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" -"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" -"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" -"checksum orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc3cb6a2e27e7635ffb7333ce0d32f1bb4f1735979ce6dacc647b1122c86e53" +"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" +"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" +"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" +"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" +"checksum orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b18f57ab94fbd058e30aa57f712ec423c0bb7403f8493a6c58eef0c36d9402" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum pbr 1.0.1 (git+https://github.com/a8m/pb)" = "" +"checksum pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deb73390ab68d81992bd994d145f697451bb0b54fd39738e72eef32458ad6907" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" -"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" -"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum ransid 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e02b6e263e6d8ab6a7a7637268785506f26860f0c4be83d8d940014d2b3e1601" +"checksum ransid 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "22b9af151b0590163dfa64e1c92c0831377d61942df4c19820c704390ebc3045" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)" = "" -"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "942b71057b31981152970d57399c25f72e27a6ee0d207a669d8304cabf44705b" "checksum rusttype 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "30047cc747a78ae042bf2cd65c79f83c3485d90107535b532d6e8f60e2c89cb1" -"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" +"checksum safemem 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e133ccc4f4d1cd4f89cc8a7ff618287d56dc7f638b8e38fc32c5fdcadc339dd5" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb8f61f9e6eadd062a71c380043d28036304a4706b3c4dd001ff3387ed00745a" -"checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" -"checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" +"checksum sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d051a07231e303f5f719da78cb6f7394f6d5b54f733aef5b0b447804a83edd7b" +"checksum sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)" = "34e71125077d297d57e4c1acfe8981b5bdfbf5a20e7b589abfdcb33bf1127f86" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" -"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5626ac617da2f2d9c48af5515a21d5a480dbd151e01bb1c355e26a3e68113" +"checksum serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "01e69e1b8a631f245467ee275b8c757b818653c6d704cdbcaeb56b56767b529c" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "69b7df505db8e81d54ff8be4693421e5b543e08214bd8d99eb761fcb4d5668ba" -"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +"checksum termion 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a8fb22f7cde82c8220e5aeacb3258ed7ce996142c77cba193f203515e26c330" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tokio 0.1.13 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" "checksum tokio-codec 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" diff --git a/ahcid/Cargo.toml b/ahcid/Cargo.toml index 0e9644e386..789f7e0b38 100644 --- a/ahcid/Cargo.toml +++ b/ahcid/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "ahcid" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/ahcid/src/ahci/mod.rs b/ahcid/src/ahci/mod.rs index 05792712fd..b72aa59ac5 100644 --- a/ahcid/src/ahci/mod.rs +++ b/ahcid/src/ahci/mod.rs @@ -18,18 +18,18 @@ pub trait Disk { fn block_length(&mut self) -> Result; } -pub fn disks(base: usize, name: &str) -> (&'static mut HbaMem, Vec>) { +pub fn disks(base: usize, name: &str) -> (&'static mut HbaMem, Vec>) { let hba_mem = unsafe { &mut *(base as *mut HbaMem) }; hba_mem.init(); let pi = hba_mem.pi.read(); - let disks: Vec> = (0..hba_mem.ports.len()) + let disks: Vec> = (0..hba_mem.ports.len()) .filter(|&i| pi & 1 << i as i32 == 1 << i as i32) .filter_map(|i| { let port = unsafe { &mut *hba_mem.ports.as_mut_ptr().add(i) }; let port_type = port.probe(); print!("{}", format!("{}-{}: {:?}\n", name, i, port_type)); - let disk: Option> = match port_type { + let disk: Option> = match port_type { HbaPortType::SATA => { match DiskATA::new(i, port) { Ok(disk) => Some(Box::new(disk)), diff --git a/ahcid/src/main.rs b/ahcid/src/main.rs index 2cc86f79fc..9522634593 100644 --- a/ahcid/src/main.rs +++ b/ahcid/src/main.rs @@ -5,11 +5,11 @@ extern crate byteorder; use std::{env, usize}; use std::fs::File; -use std::io::{Read, Write}; -use std::os::unix::io::FromRawFd; -use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, SchemeBlockMut}; +use std::io::{ErrorKind, Read, Write}; +use std::os::unix::io::{FromRawFd, RawFd}; +use syscall::{ENODEV, EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Error, Event, Packet, SchemeBlockMut}; -use scheme::DiskScheme; +use crate::scheme::DiskScheme; pub mod ahci; pub mod scheme; @@ -37,13 +37,13 @@ fn main() { &format!(":{}", scheme_name), syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK ).expect("ahcid: failed to create disk scheme"); - let mut socket = unsafe { File::from_raw_fd(socket_fd) }; + let mut socket = unsafe { File::from_raw_fd(socket_fd as RawFd) }; let irq_fd = syscall::open( &format!("irq:{}", irq), syscall::O_RDWR | syscall::O_NONBLOCK ).expect("ahcid: failed to open irq file"); - let mut irq_file = unsafe { File::from_raw_fd(irq_fd) }; + let mut irq_file = unsafe { File::from_raw_fd(irq_fd as RawFd) }; let mut event_file = File::open("event:").expect("ahcid: failed to open event file"); @@ -64,8 +64,9 @@ fn main() { let (hba_mem, disks) = ahci::disks(address, &name); let mut scheme = DiskScheme::new(scheme_name, hba_mem, disks); + let mut mounted = true; let mut todo = Vec::new(); - loop { + while mounted { let mut event = Event::default(); if event_file.read(&mut event).expect("ahcid: failed to read event file") == 0 { break; @@ -73,8 +74,17 @@ fn main() { if event.id == socket_fd { loop { let mut packet = Packet::default(); - if socket.read(&mut packet).expect("ahcid: failed to read disk scheme") == 0 { - break; + match socket.read(&mut packet) { + Ok(0) => { + mounted = false; + break; + }, + Ok(_) => (), + Err(err) => if err.kind() == ErrorKind::WouldBlock { + break; + } else { + panic!("ahcid: failed to read disk scheme: {}", err); + } } if let Some(a) = scheme.handle(&packet) { @@ -113,11 +123,18 @@ fn main() { if let Some(a) = scheme.handle(&todo[i]) { let mut packet = todo.remove(i); packet.a = a; - socket.write(&mut packet).expect("ahcid: failed to write disk scheme"); + socket.write(&packet).expect("ahcid: failed to write disk scheme"); } else { i += 1; } } + + if ! mounted { + for mut packet in todo.drain(..) { + packet.a = Error::mux(Err(Error::new(ENODEV))); + socket.write(&packet).expect("ahcid: failed to write disk scheme"); + } + } } } unsafe { let _ = syscall::physunmap(address); } diff --git a/ahcid/src/scheme.rs b/ahcid/src/scheme.rs index b8374f8ce8..28684b2cbc 100644 --- a/ahcid/src/scheme.rs +++ b/ahcid/src/scheme.rs @@ -7,8 +7,8 @@ use syscall::{ Io, SchemeBlockMut, Stat, MODE_DIR, MODE_FILE, O_DIRECTORY, O_STAT, SEEK_CUR, SEEK_END, SEEK_SET}; -use ahci::Disk; -use ahci::hba::HbaMem; +use crate::ahci::Disk; +use crate::ahci::hba::HbaMem; #[derive(Clone)] enum Handle { @@ -19,13 +19,13 @@ enum Handle { pub struct DiskScheme { scheme_name: String, hba_mem: &'static mut HbaMem, - disks: Box<[Box]>, + disks: Box<[Box]>, handles: BTreeMap, next_id: usize } impl DiskScheme { - pub fn new(scheme_name: String, hba_mem: &'static mut HbaMem, disks: Vec>) -> DiskScheme { + pub fn new(scheme_name: String, hba_mem: &'static mut HbaMem, disks: Vec>) -> DiskScheme { DiskScheme { scheme_name: scheme_name, hba_mem: hba_mem, @@ -117,7 +117,7 @@ impl SchemeBlockMut for DiskScheme { Ok(Some(0)) }, Handle::Disk(number, _) => { - let mut disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; + let disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; stat.st_mode = MODE_FILE; stat.st_size = disk.size(); Ok(Some(0)) @@ -168,7 +168,7 @@ impl SchemeBlockMut for DiskScheme { Ok(Some(count)) }, Handle::Disk(number, ref mut size) => { - let mut disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; + let disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; let blk_len = disk.block_length()?; if let Some(count) = disk.read((*size as u64)/(blk_len as u64), buf)? { *size += count; @@ -186,7 +186,7 @@ impl SchemeBlockMut for DiskScheme { Err(Error::new(EBADF)) }, Handle::Disk(number, ref mut size) => { - let mut disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; + let disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; let blk_len = disk.block_length()?; if let Some(count) = disk.write((*size as u64)/(blk_len as u64), buf)? { *size += count; @@ -212,7 +212,7 @@ impl SchemeBlockMut for DiskScheme { Ok(Some(*size)) }, Handle::Disk(number, ref mut size) => { - let mut disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; + let disk = self.disks.get_mut(number).ok_or(Error::new(EBADF))?; let len = disk.size() as usize; *size = match whence { SEEK_SET => cmp::min(len, pos), diff --git a/alxd/Cargo.toml b/alxd/Cargo.toml index 804a3de336..f4466be864 100644 --- a/alxd/Cargo.toml +++ b/alxd/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "alxd" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } +netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git", branch = "redox-unix" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.1" diff --git a/alxd/src/device/mod.rs b/alxd/src/device/mod.rs index 2afdbdaf8a..143f1e48a4 100644 --- a/alxd/src/device/mod.rs +++ b/alxd/src/device/mod.rs @@ -1721,7 +1721,7 @@ impl Alx { } unsafe fn open(&mut self) -> usize { - let mut err: usize = 0; + let _err: usize = 0; macro_rules! goto_out { () => {{ @@ -1805,7 +1805,7 @@ impl scheme::SchemeMut for Alx { Ok(id) } - fn read(&mut self, id: usize, buf: &mut [u8]) -> Result { + fn read(&mut self, id: usize, _buf: &mut [u8]) -> Result { /* let head = unsafe { self.read(RDH) }; let mut tail = unsafe { self.read(RDT) }; @@ -1842,7 +1842,7 @@ impl scheme::SchemeMut for Alx { } } - fn write(&mut self, _id: usize, buf: &[u8]) -> Result { + fn write(&mut self, _id: usize, _buf: &[u8]) -> Result { /* loop { let head = unsafe { self.read(TDH) }; diff --git a/alxd/src/main.rs b/alxd/src/main.rs index f98631e36d..4d0ac6c88b 100644 --- a/alxd/src/main.rs +++ b/alxd/src/main.rs @@ -12,7 +12,7 @@ use std::cell::RefCell; use std::env; use std::fs::File; use std::io::{Read, Write, Result}; -use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; use event::EventQueue; @@ -39,7 +39,7 @@ fn main() { if unsafe { syscall::clone(0).unwrap() } == 0 { let socket_fd = syscall::open(":network", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("alxd: failed to create network scheme"); - let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); + let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd as RawFd) })); let mut irq_file = File::open(format!("irq:{}", irq)).expect("alxd: failed to open IRQ file"); @@ -85,7 +85,7 @@ fn main() { }).expect("alxd: failed to catch events on IRQ file"); let socket_packet = socket.clone(); - event_queue.add(socket_fd, move |_event| -> Result> { + event_queue.add(socket_fd as RawFd, move |_event| -> Result> { loop { let mut packet = Packet::default(); if socket_packet.borrow_mut().read(&mut packet)? == 0 { diff --git a/bgad/Cargo.toml b/bgad/Cargo.toml index 289f65cd54..d7611f9d8a 100644 --- a/bgad/Cargo.toml +++ b/bgad/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "bgad" version = "0.1.0" +edition = "2018" [dependencies] -orbclient = "0.3" +orbclient = "0.3.27" redox_syscall = "0.1" diff --git a/bgad/src/main.rs b/bgad/src/main.rs index e326899aba..d2ff217f30 100644 --- a/bgad/src/main.rs +++ b/bgad/src/main.rs @@ -10,8 +10,8 @@ use syscall::iopl; use syscall::data::Packet; use syscall::scheme::SchemeMut; -use bga::Bga; -use scheme::BgaScheme; +use crate::bga::Bga; +use crate::scheme::BgaScheme; mod bga; mod scheme; @@ -45,7 +45,9 @@ fn main() { loop { let mut packet = Packet::default(); - socket.read(&mut packet).expect("bgad: failed to read events from bga scheme"); + if socket.read(&mut packet).expect("bgad: failed to read events from bga scheme") == 0 { + break; + } scheme.handle(&mut packet); socket.write(&packet).expect("bgad: failed to write responses to bga scheme"); } diff --git a/bgad/src/scheme.rs b/bgad/src/scheme.rs index e4ce64eced..bad949c717 100644 --- a/bgad/src/scheme.rs +++ b/bgad/src/scheme.rs @@ -5,7 +5,7 @@ use std::str; use syscall::{Error, Result, SchemeMut, EACCES, EINVAL, MODE_CHR}; use syscall::data::Stat; -use bga::Bga; +use crate::bga::Bga; pub struct BgaScheme { pub bga: Bga, diff --git a/e1000d/Cargo.toml b/e1000d/Cargo.toml index eaa8ae9d35..bdd4a8844a 100644 --- a/e1000d/Cargo.toml +++ b/e1000d/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "e1000d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } +netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git", branch = "redox-unix" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.1" diff --git a/e1000d/src/device.rs b/e1000d/src/device.rs index b4b675fd33..bded679c9e 100644 --- a/e1000d/src/device.rs +++ b/e1000d/src/device.rs @@ -1,8 +1,8 @@ -use std::{cmp, mem, ptr, slice, thread}; use std::collections::BTreeMap; +use std::{cmp, mem, ptr, slice, thread}; use netutils::setcfg; -use syscall::error::{Error, EACCES, EBADF, EINVAL, EWOULDBLOCK, Result}; +use syscall::error::{Error, Result, EACCES, EBADF, EINVAL, EWOULDBLOCK}; use syscall::flag::O_NONBLOCK; use syscall::io::Dma; use syscall::scheme::SchemeBlockMut; @@ -55,7 +55,7 @@ const RDT: u32 = 0x2818; const RAL0: u32 = 0x5400; const RAH0: u32 = 0x5404; -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] #[repr(packed)] struct Rd { buffer: u64, @@ -78,7 +78,7 @@ const TDLEN: u32 = 0x3808; const TDH: u32 = 0x3810; const TDT: u32 = 0x3818; -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] #[repr(packed)] struct Td { buffer: u64, @@ -98,12 +98,20 @@ pub struct Intel8254x { base: usize, receive_buffer: [Dma<[u8; 16384]>; 16], receive_ring: Dma<[Rd; 16]>, + receive_index: usize, transmit_buffer: [Dma<[u8; 16384]>; 16], transmit_ring: Dma<[Td; 16]>, + transmit_ring_free: usize, + transmit_index: usize, + transmit_clean_index: usize, next_id: usize, pub handles: BTreeMap, } +fn wrap_ring(index: usize, ring_size: usize) -> usize { + (index + 1) & (ring_size - 1) +} + impl SchemeBlockMut for Intel8254x { fn open(&mut self, _path: &[u8], flags: usize, uid: u32, _gid: u32) -> Result> { if uid == 0 { @@ -116,7 +124,7 @@ impl SchemeBlockMut for Intel8254x { } fn dup(&mut self, id: usize, buf: &[u8]) -> Result> { - if ! buf.is_empty() { + if !buf.is_empty() { return Err(Error::new(EINVAL)); } @@ -132,31 +140,20 @@ impl SchemeBlockMut for Intel8254x { fn read(&mut self, id: usize, buf: &mut [u8]) -> Result> { let flags = self.handles.get(&id).ok_or(Error::new(EBADF))?; - let head = unsafe { self.read_reg(RDH) }; - let mut tail = unsafe { self.read_reg(RDT) }; + let desc = unsafe { &mut *(self.receive_ring.as_ptr().add(self.receive_index) as *mut Rd) }; - tail += 1; - if tail >= self.receive_ring.len() as u32 { - tail = 0; - } + if desc.status & RD_DD == RD_DD { + desc.status = 0; - if tail != head { - let rd = unsafe { &mut * (self.receive_ring.as_ptr().offset(tail as isize) as *mut Rd) }; - if rd.status & RD_DD == RD_DD { - rd.status = 0; + let data = &self.receive_buffer[self.receive_index][..desc.length as usize]; - let data = &self.receive_buffer[tail as usize][.. rd.length as usize]; + let i = cmp::min(buf.len(), data.len()); + buf[..i].copy_from_slice(&data[..i]); - let mut i = 0; - while i < buf.len() && i < data.len() { - buf[i] = data[i]; - i += 1; - } + unsafe { self.write_reg(RDT, self.receive_index as u32) }; + self.receive_index = wrap_ring(self.receive_index, self.receive_ring.len()); - unsafe { self.write_reg(RDT, tail) }; - - return Ok(Some(i)); - } + return Ok(Some(i)); } if flags & O_NONBLOCK == O_NONBLOCK { @@ -169,44 +166,56 @@ impl SchemeBlockMut for Intel8254x { fn write(&mut self, id: usize, buf: &[u8]) -> Result> { let _flags = self.handles.get(&id).ok_or(Error::new(EBADF))?; - loop { - let head = unsafe { self.read_reg(TDH) }; - let mut tail = unsafe { self.read_reg(TDT) }; - let old_tail = tail; + if self.transmit_ring_free == 0 { + loop { + let desc = unsafe { + &*(self.transmit_ring.as_ptr().add(self.transmit_clean_index) as *const Td) + }; - tail += 1; - if tail >= self.transmit_ring.len() as u32 { - tail = 0; - } - - if tail != head { - let td = unsafe { &mut * (self.transmit_ring.as_ptr().offset(old_tail as isize) as *mut Td) }; - - td.cso = 0; - td.command = TD_CMD_EOP | TD_CMD_IFCS | TD_CMD_RS; - td.status = 0; - td.css = 0; - td.special = 0; - - td.length = (cmp::min(buf.len(), 0x3FFF)) as u16; - - let mut data = unsafe { slice::from_raw_parts_mut(self.transmit_buffer[old_tail as usize].as_ptr() as *mut u8, td.length as usize) }; - - let mut i = 0; - while i < buf.len() && i < data.len() { - data[i] = buf[i]; - i += 1; + if desc.status != 0 { + self.transmit_clean_index = + wrap_ring(self.transmit_clean_index, self.transmit_ring.len()); + self.transmit_ring_free += 1; + } else if self.transmit_ring_free > 0 { + break; } - unsafe { self.write_reg(TDT, tail) }; - - while td.status == 0 { - thread::yield_now(); + if self.transmit_ring_free >= self.transmit_ring.len() { + break; } - - return Ok(Some(i)); } } + + let desc = + unsafe { &mut *(self.transmit_ring.as_ptr().add(self.transmit_index) as *mut Td) }; + + let data = unsafe { + slice::from_raw_parts_mut( + self.transmit_buffer[self.transmit_index].as_ptr() as *mut u8, + cmp::min(buf.len(), self.transmit_buffer[self.transmit_index].len()) as usize, + ) + }; + + let i = cmp::min(buf.len(), data.len()); + data[..i].copy_from_slice(&buf[..i]); + + desc.cso = 0; + desc.command = TD_CMD_EOP | TD_CMD_IFCS | TD_CMD_RS; + desc.status = 0; + desc.css = 0; + desc.special = 0; + + desc.length = (cmp::min( + buf.len(), + self.transmit_buffer[self.transmit_index].len() - 1, + )) as u16; + + self.transmit_index = wrap_ring(self.transmit_index, self.transmit_ring.len()); + self.transmit_ring_free -= 1; + + unsafe { self.write_reg(TDT, self.transmit_index as u32) }; + + Ok(Some(i)) } fn fevent(&mut self, id: usize, _flags: usize) -> Result> { @@ -239,20 +248,29 @@ impl SchemeBlockMut for Intel8254x { impl Intel8254x { pub unsafe fn new(base: usize) -> Result { + #[rustfmt::skip] let mut module = Intel8254x { base: base, - receive_buffer: [Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?], + receive_buffer: [ + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + ], receive_ring: Dma::zeroed()?, - transmit_buffer: [Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, - Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?], + transmit_buffer: [ + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, Dma::zeroed()?, + ], + receive_index: 0, transmit_ring: Dma::zeroed()?, + transmit_ring_free: 16, + transmit_index: 0, + transmit_clean_index: 0, next_id: 0, - handles: BTreeMap::new() + handles: BTreeMap::new(), }; module.init(); @@ -266,19 +284,10 @@ impl Intel8254x { } pub fn next_read(&self) -> usize { - let head = unsafe { self.read_reg(RDH) }; - let mut tail = unsafe { self.read_reg(RDT) }; + let desc = unsafe { &*(self.receive_ring.as_ptr().add(self.receive_index) as *const Rd) }; - tail += 1; - if tail >= self.receive_ring.len() as u32 { - tail = 0; - } - - if tail != head { - let rd = unsafe { &* (self.receive_ring.as_ptr().offset(tail as isize) as *const Rd) }; - if rd.status & RD_DD == RD_DD { - return rd.length as usize; - } + if desc.status & RD_DD == RD_DD { + return desc.length as usize; } 0 @@ -324,14 +333,28 @@ impl Intel8254x { let mac_low = self.read_reg(RAL0); let mac_high = self.read_reg(RAH0); - let mac = [mac_low as u8, - (mac_low >> 8) as u8, - (mac_low >> 16) as u8, - (mac_low >> 24) as u8, - mac_high as u8, - (mac_high >> 8) as u8]; - print!("{}", format!(" - MAC: {:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])); - let _ = setcfg("mac", &format!("{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])); + let mac = [ + mac_low as u8, + (mac_low >> 8) as u8, + (mac_low >> 16) as u8, + (mac_low >> 24) as u8, + mac_high as u8, + (mac_high >> 8) as u8, + ]; + print!( + "{}", + format!( + " - MAC: {:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] + ) + ); + let _ = setcfg( + "mac", + &format!( + "{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] + ), + ); // // MTA => 0; @@ -344,7 +367,10 @@ impl Intel8254x { self.write_reg(RDBAH, (self.receive_ring.physical() >> 32) as u32); self.write_reg(RDBAL, self.receive_ring.physical() as u32); - self.write_reg(RDLEN, (self.receive_ring.len() * mem::size_of::()) as u32); + self.write_reg( + RDLEN, + (self.receive_ring.len() * mem::size_of::()) as u32, + ); self.write_reg(RDH, 0); self.write_reg(RDT, self.receive_ring.len() as u32 - 1); @@ -355,7 +381,10 @@ impl Intel8254x { self.write_reg(TDBAH, (self.transmit_ring.physical() >> 32) as u32); self.write_reg(TDBAL, self.transmit_ring.physical() as u32); - self.write_reg(TDLEN, (self.transmit_ring.len() * mem::size_of::()) as u32); + self.write_reg( + TDLEN, + (self.transmit_ring.len() * mem::size_of::()) as u32, + ); self.write_reg(TDH, 0); self.write_reg(TDT, 0); @@ -384,10 +413,13 @@ impl Intel8254x { while self.read_reg(STATUS) & 2 != 2 { print!(" - Waiting for link up: {:X}\n", self.read_reg(STATUS)); } - print!(" - Link is up with speed {}\n", match (self.read_reg(STATUS) >> 6) & 0b11 { - 0b00 => "10 Mb/s", - 0b01 => "100 Mb/s", - _ => "1000 Mb/s", - }); + print!( + " - Link is up with speed {}\n", + match (self.read_reg(STATUS) >> 6) & 0b11 { + 0b00 => "10 Mb/s", + 0b01 => "100 Mb/s", + _ => "1000 Mb/s", + } + ); } } diff --git a/e1000d/src/main.rs b/e1000d/src/main.rs index b420a0863b..fb87503ef4 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -7,17 +7,20 @@ extern crate syscall; use std::cell::RefCell; use std::env; use std::fs::File; -use std::io::{Read, Write, Result}; -use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::io::{ErrorKind, Read, Result, Write}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; use event::EventQueue; use syscall::{Packet, SchemeBlockMut, PHYSMAP_NO_CACHE, PHYSMAP_WRITE}; -use syscall::error::EWOULDBLOCK; pub mod device; -fn handle_update(socket: &mut File, device: &mut device::Intel8254x, todo: &mut Vec) -> Result<()> { +fn handle_update( + socket: &mut File, + device: &mut device::Intel8254x, + todo: &mut Vec, +) -> Result { // Handle any blocked packets let mut i = 0; while i < todo.len() { @@ -33,8 +36,16 @@ fn handle_update(socket: &mut File, device: &mut device::Intel8254x, todo: &mut // Check that the socket is empty loop { let mut packet = Packet::default(); - if socket.read(&mut packet)? == 0 { - break; + match socket.read(&mut packet) { + Ok(0) => return Ok(true), + Ok(_) => (), + Err(err) => { + if err.kind() == ErrorKind::WouldBlock { + break; + } else { + return Err(err); + } + } } if let Some(a) = device.handle(&packet) { @@ -45,7 +56,7 @@ fn handle_update(socket: &mut File, device: &mut device::Intel8254x, todo: &mut } } - Ok(()) + Ok(false) } fn main() { @@ -60,20 +71,36 @@ fn main() { let irq_str = args.next().expect("e1000d: no irq provided"); let irq = irq_str.parse::().expect("e1000d: failed to parse irq"); - print!("{}", format!(" + E1000 {} on: {:X} IRQ: {}\n", name, bar, irq)); + print!( + "{}", + format!(" + E1000 {} on: {:X} IRQ: {}\n", name, bar, irq) + ); // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { - let socket_fd = syscall::open(":network", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("e1000d: failed to create network scheme"); - let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); + let socket_fd = syscall::open( + ":network", + syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK, + ) + .expect("e1000d: failed to create network scheme"); + let socket = Arc::new(RefCell::new(unsafe { + File::from_raw_fd(socket_fd as RawFd) + })); - let mut irq_file = File::open(format!("irq:{}", irq)).expect("e1000d: failed to open IRQ file"); + let mut irq_file = + File::open(format!("irq:{}", irq)).expect("e1000d: failed to open IRQ file"); - let address = unsafe { syscall::physmap(bar, 128*1024, PHYSMAP_WRITE | PHYSMAP_NO_CACHE).expect("e1000d: failed to map address") }; + let address = unsafe { + syscall::physmap(bar, 128 * 1024, PHYSMAP_WRITE | PHYSMAP_NO_CACHE) + .expect("e1000d: failed to map address") + }; { - let device = Arc::new(RefCell::new(unsafe { device::Intel8254x::new(address).expect("e1000d: failed to allocate device") })); + let device = Arc::new(RefCell::new(unsafe { + device::Intel8254x::new(address).expect("e1000d: failed to allocate device") + })); - let mut event_queue = EventQueue::::new().expect("e1000d: failed to create event queue"); + let mut event_queue = + EventQueue::::new().expect("e1000d: failed to create event queue"); syscall::setrens(0, 0).expect("e1000d: failed to enter null namespace"); @@ -82,62 +109,90 @@ fn main() { let device_irq = device.clone(); let socket_irq = socket.clone(); let todo_irq = todo.clone(); - event_queue.add(irq_file.as_raw_fd(), move |_event| -> Result> { - let mut irq = [0; 8]; - irq_file.read(&mut irq)?; - if unsafe { device_irq.borrow().irq() } { - irq_file.write(&mut irq)?; + event_queue + .add( + irq_file.as_raw_fd(), + move |_event| -> Result> { + let mut irq = [0; 8]; + irq_file.read(&mut irq)?; + if unsafe { device_irq.borrow().irq() } { + irq_file.write(&mut irq)?; - handle_update(&mut socket_irq.borrow_mut(), &mut device_irq.borrow_mut(), &mut todo_irq.borrow_mut())?; + if handle_update( + &mut socket_irq.borrow_mut(), + &mut device_irq.borrow_mut(), + &mut todo_irq.borrow_mut(), + )? { + return Ok(Some(0)); + } - let next_read = device_irq.borrow().next_read(); - if next_read > 0 { - return Ok(Some(next_read)); - } - } - Ok(None) - }).expect("e1000d: failed to catch events on IRQ file"); + let next_read = device_irq.borrow().next_read(); + if next_read > 0 { + return Ok(Some(next_read)); + } + } + Ok(None) + }, + ) + .expect("e1000d: failed to catch events on IRQ file"); let device_packet = device.clone(); let socket_packet = socket.clone(); - event_queue.add(socket_fd, move |_event| -> Result> { - handle_update(&mut socket_packet.borrow_mut(), &mut device_packet.borrow_mut(), &mut todo.borrow_mut()); + event_queue + .add(socket_fd as RawFd, move |_event| -> Result> { + if handle_update( + &mut socket_packet.borrow_mut(), + &mut device_packet.borrow_mut(), + &mut todo.borrow_mut(), + )? { + return Ok(Some(0)); + } - let next_read = device_packet.borrow().next_read(); - if next_read > 0 { - return Ok(Some(next_read)); - } + let next_read = device_packet.borrow().next_read(); + if next_read > 0 { + return Ok(Some(next_read)); + } - Ok(None) - }).expect("e1000d: failed to catch events on scheme file"); + Ok(None) + }) + .expect("e1000d: failed to catch events on scheme file"); let send_events = |event_count| { for (handle_id, _handle) in device.borrow().handles.iter() { - socket.borrow_mut().write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *handle_id, - c: syscall::flag::EVENT_READ, - d: event_count - }).expect("e1000d: failed to write event"); + socket + .borrow_mut() + .write(&Packet { + id: 0, + pid: 0, + uid: 0, + gid: 0, + a: syscall::number::SYS_FEVENT, + b: *handle_id, + c: syscall::flag::EVENT_READ, + d: event_count, + }) + .expect("e1000d: failed to write event"); } }; - for event_count in event_queue.trigger_all(event::Event { - fd: 0, - flags: 0, - }).expect("e1000d: failed to trigger events") { + for event_count in event_queue + .trigger_all(event::Event { fd: 0, flags: 0 }) + .expect("e1000d: failed to trigger events") + { send_events(event_count); } loop { let event_count = event_queue.run().expect("e1000d: failed to handle events"); + if event_count == 0 { + //TODO: Handle todo + break; + } send_events(event_count); } } - unsafe { let _ = syscall::physunmap(address); } + unsafe { + let _ = syscall::physunmap(address); + } } } diff --git a/ihdad/Cargo.toml b/ihdad/Cargo.toml index 23e365aa01..ec6d85b871 100755 --- a/ihdad/Cargo.toml +++ b/ihdad/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "ihdad" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/ihdad/src/hda/device.rs b/ihdad/src/hda/device.rs index dd74824a97..ae77fe5b98 100755 --- a/ihdad/src/hda/device.rs +++ b/ihdad/src/hda/device.rs @@ -790,21 +790,21 @@ impl IntelHDA { for i in 0..iss { if ((sis >> i) & 1 ) == 1 { - let mut input = self.get_input_stream_descriptor(i).unwrap(); + let input = self.get_input_stream_descriptor(i).unwrap(); input.clear_interrupts(); } } for i in 0..oss { if ((sis >> (i + iss)) & 1 ) == 1 { - let mut output = self.get_output_stream_descriptor(i).unwrap(); + let output = self.get_output_stream_descriptor(i).unwrap(); output.clear_interrupts(); } } for i in 0..bss { if ((sis >> (i + iss + oss)) & 1 ) == 1 { - let mut bid = self.get_bidirectional_stream_descriptor(i).unwrap(); + let bid = self.get_bidirectional_stream_descriptor(i).unwrap(); bid.clear_interrupts(); } } @@ -897,7 +897,7 @@ impl SchemeBlockMut for IntelHDA { fn write(&mut self, id: usize, buf: &[u8]) -> Result> { let index = { let mut handles = self.handles.lock(); - let handle = handles.get_mut(&id).ok_or(Error::new(EBADF))?; + let _handle = handles.get_mut(&id).ok_or(Error::new(EBADF))?; 0 }; @@ -926,7 +926,7 @@ impl SchemeBlockMut for IntelHDA { fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result> { let mut handles = self.handles.lock(); - let handle = handles.get_mut(&id).ok_or(Error::new(EBADF))?; + let _handle = handles.get_mut(&id).ok_or(Error::new(EBADF))?; let mut i = 0; let scheme_path = b"hda:"; diff --git a/ihdad/src/hda/stream.rs b/ihdad/src/hda/stream.rs index ecb791aacc..0f46da305a 100644 --- a/ihdad/src/hda/stream.rs +++ b/ihdad/src/hda/stream.rs @@ -295,7 +295,7 @@ impl StreamBuffer { syscall::physalloc(block_length * block_count) } { Ok(phys) => phys, - Err(err) => { + Err(_err) => { return Err("Could not allocate physical memory for buffer."); } }; @@ -304,7 +304,7 @@ impl StreamBuffer { syscall::physmap(phys, block_length * block_count, PHYSMAP_WRITE | PHYSMAP_NO_CACHE) } { Ok(addr) => addr, - Err(err) => { + Err(_err) => { unsafe { syscall::physfree(phys, block_length * block_count); } diff --git a/ihdad/src/main.rs b/ihdad/src/main.rs index abff02312d..d1f37307be 100755 --- a/ihdad/src/main.rs +++ b/ihdad/src/main.rs @@ -8,8 +8,8 @@ extern crate event; use std::{env, usize}; use std::fs::File; -use std::io::{Read, Write, Result}; -use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::io::{ErrorKind, Read, Write, Result}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use syscall::{PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Packet, SchemeBlockMut}; use std::cell::RefCell; use std::sync::Arc; @@ -55,7 +55,7 @@ fn main() { let device = Arc::new(RefCell::new(unsafe { hda::IntelHDA::new(address, vend_prod).expect("ihdad: failed to allocate device") })); let socket_fd = syscall::open(":hda", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("IHDA: failed to create hda scheme"); - let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); + let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd as RawFd) })); let mut event_queue = EventQueue::::new().expect("IHDA: Could not create event queue."); @@ -100,8 +100,14 @@ fn main() { event_queue.add(socket_fd, move |_event| -> Result> { loop { let mut packet = Packet::default(); - if socket_packet.borrow_mut().read(&mut packet)? == 0 { - break; + match socket_packet.borrow_mut().read(&mut packet) { + Ok(0) => return Ok(Some(0)), + Ok(_) => (), + Err(err) => if err.kind() == ErrorKind::WouldBlock { + break; + } else { + return Err(err); + } } if let Some(a) = device.borrow_mut().handle(&mut packet) { @@ -143,6 +149,10 @@ fn main() { //device_loop.borrow_mut().handle_interrupts(); } let event_count = event_queue.run().expect("IHDA: failed to handle events"); + if event_count == 0 { + //TODO: Handle todo + break; + } socket.borrow_mut().write(&Packet { id: 0, diff --git a/initfs.toml b/initfs.toml index 4e68571eaa..15b49d522f 100644 --- a/initfs.toml +++ b/initfs.toml @@ -22,7 +22,7 @@ vendor = 33006 device = 48879 command = ["bgad", "$NAME", "$BAR0"] -# nvmed +#nvmed [[drivers]] name = "NVME storage" class = 1 diff --git a/ixgbed b/ixgbed index 26c0142179..97a1efdd22 160000 --- a/ixgbed +++ b/ixgbed @@ -1 +1 @@ -Subproject commit 26c0142179a8fbcae22d1d48979681fe029c04e3 +Subproject commit 97a1efdd22800be67b6781beecde956927e3975b diff --git a/nvmed/Cargo.toml b/nvmed/Cargo.toml index fbdc36977d..7bd235dc99 100644 --- a/nvmed/Cargo.toml +++ b/nvmed/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "nvmed" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/nvmed/src/main.rs b/nvmed/src/main.rs index 6035739dd3..daaa633fe7 100644 --- a/nvmed/src/main.rs +++ b/nvmed/src/main.rs @@ -1,4 +1,3 @@ -//#![deny(warnings)] #![feature(asm)] extern crate bitflags; @@ -7,24 +6,16 @@ extern crate syscall; use std::{env, usize}; use std::fs::File; -use std::io::{Read, Write}; -use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; -use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, Result, Scheme}; +use std::io::{ErrorKind, Read, Write}; +use std::os::unix::io::{RawFd, FromRawFd}; + +use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, Result, SchemeBlockMut}; use self::nvme::Nvme; +use self::scheme::DiskScheme; mod nvme; - -/* -fn create_scheme_fallback<'a>(name: &'a str, fallback: &'a str) -> Result<(&'a str, RawFd)> { - if let Ok(fd) = syscall::open(&format!(":{}", name), syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) { - Ok((name, fd)) - } else { - syscall::open(&format!(":{}", fallback), syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) - .map(|fd| (fallback, fd)) - } -} -*/ +mod scheme; fn main() { let mut args = env::args().skip(1); @@ -42,50 +33,87 @@ fn main() { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { - let address = unsafe { syscall::physmap(bar, 4096, PHYSMAP_WRITE | PHYSMAP_NO_CACHE).expect("nvmed: failed to map address") }; + //TODO: Figure out correct size of mapping, not just 256 * 1024 + let address = unsafe { syscall::physmap(bar, 256 * 1024, PHYSMAP_WRITE | PHYSMAP_NO_CACHE).expect("nvmed: failed to map address") }; { - let mut nvme = Nvme::new(address); - nvme.init(); - /* - let (_scheme_name, socket_fd) = create_scheme_fallback("disk", &name).expect("nvmed: failed to create disk scheme"); - let mut socket = unsafe { File::from_raw_fd(socket_fd) }; - syscall::fevent(socket_fd, EVENT_READ).expect("nvmed: failed to fevent disk scheme"); + let event_fd = syscall::open("event:", syscall::O_RDWR | syscall::O_CLOEXEC) + .expect("nvmed: failed to open event queue"); + let mut event_file = unsafe { File::from_raw_fd(event_fd as RawFd) }; - let mut irq_file = File::open(&format!("irq:{}", irq)).expect("nvmed: failed to open irq file"); - let irq_fd = irq_file.as_raw_fd(); - syscall::fevent(irq_fd, EVENT_READ).expect("nvmed: failed to fevent irq file"); + let irq_fd = syscall::open( + &format!("irq:{}", irq), + syscall::O_RDWR | syscall::O_NONBLOCK | syscall::O_CLOEXEC + ).expect("nvmed: failed to open irq file"); + syscall::write(event_fd, &syscall::Event { + id: irq_fd, + flags: syscall::EVENT_READ, + data: 0, + }).expect("nvmed: failed to watch irq file events"); + let mut irq_file = unsafe { File::from_raw_fd(irq_fd as RawFd) }; - let mut event_file = File::open("event:").expect("nvmed: failed to open event file"); - - let scheme = DiskScheme::new(nvme::disks(address, &name)); + let scheme_name = format!("disk/{}", name); + let socket_fd = syscall::open( + &format!(":{}", scheme_name), + syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK | syscall::O_CLOEXEC + ).expect("nvmed: failed to create disk scheme"); + syscall::write(event_fd, &syscall::Event { + id: socket_fd, + flags: syscall::EVENT_READ, + data: 1, + }).expect("nvmed: failed to watch disk scheme events"); + let mut socket_file = unsafe { File::from_raw_fd(socket_fd as RawFd) }; syscall::setrens(0, 0).expect("nvmed: failed to enter null namespace"); - loop { + let mut nvme = Nvme::new(address).expect("nvmed: failed to allocate driver data"); + let namespaces = unsafe { nvme.init() }; + let mut scheme = DiskScheme::new(scheme_name, nvme, namespaces); + let mut todo = Vec::new(); + 'events: loop { let mut event = Event::default(); - if event_file.read(&mut event).expect("nvmed: failed to read event file") == 0 { + if event_file.read(&mut event).expect("nvmed: failed to read event queue") == 0 { break; } - if event.id == socket_fd { - loop { - let mut packet = Packet::default(); - if socket.read(&mut packet).expect("nvmed: failed to read disk scheme") == 0 { - break; + + match event.data { + 0 => { + let mut irq = [0; 8]; + if irq_file.read(&mut irq).expect("nvmed: failed to read irq file") >= irq.len() { + if scheme.irq() { + irq_file.write(&irq).expect("nvmed: failed to write irq file"); + } } - scheme.handle(&mut packet); - socket.write(&mut packet).expect("nvmed: failed to write disk scheme"); + }, + 1 => loop { + let mut packet = Packet::default(); + match socket_file.read(&mut packet) { + Ok(0) => break 'events, + Ok(_) => (), + Err(err) => match err.kind() { + ErrorKind::WouldBlock => break, + _ => Err(err).expect("nvmed: failed to read disk scheme"), + } + } + todo.push(packet); + }, + unknown => { + panic!("nvmed: unknown event data {}", unknown); + }, + } + + let mut i = 0; + while i < todo.len() { + if let Some(a) = scheme.handle(&todo[i]) { + let mut packet = todo.remove(i); + packet.a = a; + socket_file.write(&packet).expect("nvmed: failed to write disk scheme"); + } else { + i += 1; } - } else if event.id == irq_fd { - let mut irq = [0; 8]; - if irq_file.read(&mut irq).expect("nvmed: failed to read irq file") >= irq.len() { - //TODO : Test for IRQ - //irq_file.write(&irq).expect("nvmed: failed to write irq file"); - } - } else { - println!("Unknown event {}", event.id); } } - */ + + //TODO: destroy NVMe stuff } unsafe { let _ = syscall::physunmap(address); } } diff --git a/nvmed/src/nvme.rs b/nvmed/src/nvme.rs index 63c6d78ec7..66590b3488 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -1,5 +1,9 @@ -use syscall::io::{Io, Mmio}; +use std::thread; +use std::collections::BTreeMap; +use syscall::io::{Dma, Io, Mmio}; +use syscall::error::{Error, Result, EINVAL}; +#[derive(Clone, Copy)] #[repr(packed)] pub struct NvmeCmd { /// Opcode @@ -31,41 +35,142 @@ pub struct NvmeCmd { } impl NvmeCmd { - pub fn read(cid: u16, lba: u64, count: u16, dst: u64) -> Self { - NvmeCmd { - opcode: 2, - flags: 1 << 6, + pub fn create_io_completion_queue(cid: u16, qid: u16, ptr: usize, size: u16) -> Self { + Self { + opcode: 5, + flags: 0, cid: cid, - nsid: 0xFFFFFFFF, + nsid: 0, _rsvd: 0, mptr: 0, - dptr: [dst, (count as u64) << 9], - cdw10: lba as u32, - cdw11: (lba >> 32) as u32, - cdw12: count as u32, + dptr: [ptr as u64, 0], + cdw10: ((size as u32) << 16) | (qid as u32), + cdw11: 1 /* Physically Contiguous */, //TODO: IV, IEN + cdw12: 0, cdw13: 0, cdw14: 0, cdw15: 0, } } - pub fn write(cid: u16, lba: u64, count: u16, src: u64) -> Self { - NvmeCmd { + pub fn create_io_submission_queue(cid: u16, qid: u16, ptr: usize, size: u16, cqid: u16) -> Self { + Self { opcode: 1, - flags: 1 << 6, + flags: 0, cid: cid, - nsid: 0xFFFFFFFF, + nsid: 0, _rsvd: 0, mptr: 0, - dptr: [src, (count as u64) << 9], - cdw10: lba as u32, - cdw11: (lba >> 32) as u32, - cdw12: count as u32, + dptr: [ptr as u64, 0], + cdw10: ((size as u32) << 16) | (qid as u32), + cdw11: ((cqid as u32) << 16) | 1 /* Physically Contiguous */, //TODO: QPRIO + cdw12: 0, //TODO: NVMSETID cdw13: 0, cdw14: 0, cdw15: 0, } } + + pub fn identify_namespace(cid: u16, ptr: usize, nsid: u32) -> Self { + Self { + opcode: 6, + flags: 0, + cid: cid, + nsid: nsid, + _rsvd: 0, + mptr: 0, + dptr: [ptr as u64, 0], + cdw10: 0, + cdw11: 0, + cdw12: 0, + cdw13: 0, + cdw14: 0, + cdw15: 0, + } + } + + pub fn identify_controller(cid: u16, ptr: usize) -> Self { + Self { + opcode: 6, + flags: 0, + cid: cid, + nsid: 0, + _rsvd: 0, + mptr: 0, + dptr: [ptr as u64, 0], + cdw10: 1, + cdw11: 0, + cdw12: 0, + cdw13: 0, + cdw14: 0, + cdw15: 0, + } + } + + pub fn identify_namespace_list(cid: u16, ptr: usize, base: u32) -> Self { + Self { + opcode: 6, + flags: 0, + cid: cid, + nsid: base, + _rsvd: 0, + mptr: 0, + dptr: [ptr as u64, 0], + cdw10: 2, + cdw11: 0, + cdw12: 0, + cdw13: 0, + cdw14: 0, + cdw15: 0, + } + } + + pub fn io_read(cid: u16, nsid: u32, lba: u64, blocks_1: u16, ptr0: u64, ptr1: u64) -> Self { + Self { + opcode: 2, + flags: 1 << 6, + cid: cid, + nsid: nsid, + _rsvd: 0, + mptr: 0, + dptr: [ptr0, ptr1], + cdw10: lba as u32, + cdw11: (lba >> 32) as u32, + cdw12: blocks_1 as u32, + cdw13: 0, + cdw14: 0, + cdw15: 0, + } + } + + pub fn io_write(cid: u16, nsid: u32, lba: u64, blocks_1: u16, ptr0: u64, ptr1: u64) -> Self { + Self { + opcode: 1, + flags: 1 << 6, + cid: cid, + nsid: nsid, + _rsvd: 0, + mptr: 0, + dptr: [ptr0, ptr1], + cdw10: lba as u32, + cdw11: (lba >> 32) as u32, + cdw12: blocks_1 as u32, + cdw13: 0, + cdw14: 0, + cdw15: 0, + } + } +} + +#[derive(Clone, Copy, Debug)] +#[repr(packed)] +pub struct NvmeComp { + command_specific: u32, + _rsvd: u32, + sq_head: u16, + sq_id: u16, + cid: u16, + status: u16, } #[repr(packed)] @@ -98,19 +203,424 @@ pub struct NvmeRegs { cmbsz: Mmio, } -pub struct Nvme { - regs: &'static mut NvmeRegs +pub struct NvmeCmdQueue { + data: Dma<[NvmeCmd; 64]>, + i: usize, } -impl Nvme { - pub fn new(address: usize) -> Self { - Nvme { - regs: unsafe { &mut *(address as *mut NvmeRegs) } +impl NvmeCmdQueue { + fn new() -> Result { + Ok(Self { + data: Dma::zeroed()?, + i: 0, + }) + } + + fn submit(&mut self, entry: NvmeCmd) -> usize { + self.data[self.i] = entry; + self.i = (self.i + 1) % self.data.len(); + self.i + } +} + +pub struct NvmeCompQueue { + data: Dma<[NvmeComp; 256]>, + i: usize, + phase: bool, +} + +impl NvmeCompQueue { + fn new() -> Result { + Ok(Self { + data: Dma::zeroed()?, + i: 0, + phase: true, + }) + } + + fn complete(&mut self) -> Option<(usize, NvmeComp)> { + let entry = self.data[self.i]; + if ((entry.status & 1) == 1) == self.phase { + self.i = (self.i + 1) % self.data.len(); + if self.i == 0 { + self.phase = ! self.phase; + } + Some((self.i, entry)) + } else { + None } } - pub fn init(&mut self) { - println!(" - CAPS: {:X}", self.regs.cap.read()); - println!(" - VS: {:X}", self.regs.vs.read()); + fn complete_spin(&mut self) -> (usize, NvmeComp) { + loop { + if let Some(some) = self.complete() { + return some; + } else { + thread::yield_now(); + } + } + } +} + +pub struct NvmeNamespace { + pub id: u32, + pub blocks: u64, + pub block_size: u64, +} + +pub struct Nvme { + regs: &'static mut NvmeRegs, + submission_queues: [NvmeCmdQueue; 2], + completion_queues: [NvmeCompQueue; 2], + buffer: Dma<[u8; 512 * 4096]>, // 2MB of buffer + buffer_prp: Dma<[u64; 512]>, // 4KB of PRP for the buffer +} + +impl Nvme { + pub fn new(address: usize) -> Result { + Ok(Nvme { + regs: unsafe { &mut *(address as *mut NvmeRegs) }, + submission_queues: [NvmeCmdQueue::new()?, NvmeCmdQueue::new()?], + completion_queues: [NvmeCompQueue::new()?, NvmeCompQueue::new()?], + buffer: Dma::zeroed()?, + buffer_prp: Dma::zeroed()?, + }) + } + + unsafe fn doorbell(&mut self, index: usize) -> &'static mut Mmio { + let dstrd = ((self.regs.cap.read() >> 32) & 0b1111) as usize; + let addr = (self.regs as *mut _ as usize) + + 0x1000 + + index * (4 << dstrd); + &mut *(addr as *mut Mmio) + } + + pub unsafe fn submission_queue_tail(&mut self, qid: u16, tail: u16) { + self.doorbell(2 * (qid as usize)).write(tail as u32); + } + + pub unsafe fn completion_queue_head(&mut self, qid: u16, head: u16) { + self.doorbell(2 * (qid as usize) + 1).write(head as u32) + } + + pub unsafe fn init(&mut self) -> BTreeMap { + for i in 0..self.buffer_prp.len() { + self.buffer_prp[i] = (self.buffer.physical() + i * 4096) as u64; + } + + println!(" - CAPS: {:X}", self.regs.cap.read()); + println!(" - VS: {:X}", self.regs.vs.read()); + println!(" - CC: {:X}", self.regs.cc.read()); + println!(" - CSTS: {:X}", self.regs.csts.read()); + + println!(" - Disable"); + self.regs.cc.writef(1, false); + + println!(" - Mask all interrupts"); + self.regs.intms.write(0xFFFFFFFF); + + for (qid, queue) in self.completion_queues.iter().enumerate() { + let data = &queue.data; + println!(" - completion queue {}: {:X}, {}", qid, data.physical(), data.len()); + } + + for (qid, queue) in self.submission_queues.iter().enumerate() { + let data = &queue.data; + println!(" - submission queue {}: {:X}, {}", qid, data.physical(), data.len()); + } + + { + let asq = &self.submission_queues[0]; + let acq = &self.completion_queues[0]; + self.regs.aqa.write(((acq.data.len() as u32 - 1) << 16) | (asq.data.len() as u32 - 1)); + self.regs.asq.write(asq.data.physical() as u64); + self.regs.acq.write(acq.data.physical() as u64); + + // Set IOCQES, IOSQES, AMS, MPS, and CSS + let mut cc = self.regs.cc.read(); + cc &= 0xFF00000F; + cc |= (4 << 20) | (6 << 16); + self.regs.cc.write(cc); + } + + println!(" - Enable"); + self.regs.cc.writef(1, true); + + println!(" - Waiting for ready"); + while ! self.regs.csts.readf(1) { + thread::yield_now(); + } + + { + //TODO: Use buffer + let data: Dma<[u8; 4096]> = Dma::zeroed().unwrap(); + + println!(" - Attempting to identify controller"); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + let entry = NvmeCmd::identify_controller( + cid, data.physical() + ); + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + println!(" - Waiting to identify controller"); + { + let qid = 0; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + self.completion_queue_head(qid as u16, head as u16); + } + + println!(" - Dumping identify controller"); + + let mut serial = String::new(); + for &b in &data[4..24] { + if b == 0 { + break; + } + serial.push(b as char); + } + println!(" - Serial: {}", serial); + + let mut model = String::new(); + for &b in &data[24..64] { + if b == 0 { + break; + } + model.push(b as char); + } + println!(" - Model: {}", model); + + let mut firmware = String::new(); + for &b in &data[64..72] { + if b == 0 { + break; + } + firmware.push(b as char); + } + println!(" - Firmware: {}", firmware); + } + + let mut nsids = Vec::new(); + { + //TODO: Use buffer + let data: Dma<[u32; 1024]> = Dma::zeroed().unwrap(); + + println!(" - Attempting to retrieve namespace ID list"); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + let entry = NvmeCmd::identify_namespace_list( + cid, data.physical(), 0 + ); + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + println!(" - Waiting to retrieve namespace ID list"); + { + let qid = 0; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + self.completion_queue_head(qid as u16, head as u16); + } + + println!(" - Dumping namespace ID list"); + for &nsid in data.iter() { + if nsid != 0 { + println!(" - {}", nsid); + nsids.push(nsid); + } + } + } + + let mut namespaces = BTreeMap::new(); + for &nsid in nsids.iter() { + //TODO: Use buffer + let data: Dma<[u8; 4096]> = Dma::zeroed().unwrap(); + + println!(" - Attempting to identify namespace {}", nsid); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + let entry = NvmeCmd::identify_namespace( + cid, data.physical(), nsid + ); + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + println!(" - Waiting to identify namespace {}", nsid); + { + let qid = 0; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + self.completion_queue_head(qid as u16, head as u16); + } + + println!(" - Dumping identify namespace"); + + let size = *(data.as_ptr().offset(0) as *const u64); + println!(" - Size: {}", size); + + let capacity = *(data.as_ptr().offset(8) as *const u64); + println!(" - Capacity: {}", capacity); + + //TODO: Read block size + + namespaces.insert(nsid, NvmeNamespace { + id: nsid, + blocks: size, + block_size: 512, // TODO + }); + } + + for io_qid in 1..self.completion_queues.len() { + let (ptr, len) = { + let queue = &self.completion_queues[io_qid]; + (queue.data.physical(), queue.data.len()) + }; + + println!(" - Attempting to create I/O completion queue {}", io_qid); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + let entry = NvmeCmd::create_io_completion_queue( + cid, io_qid as u16, ptr, (len - 1) as u16 + ); + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + println!(" - Waiting to create I/O completion queue {}", io_qid); + { + let qid = 0; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + self.completion_queue_head(qid as u16, head as u16); + } + } + + for io_qid in 1..self.submission_queues.len() { + let (ptr, len) = { + let queue = &self.submission_queues[io_qid]; + (queue.data.physical(), queue.data.len()) + }; + + println!(" - Attempting to create I/O submission queue {}", io_qid); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + //TODO: Get completion queue ID through smarter mechanism + let entry = NvmeCmd::create_io_submission_queue( + cid, io_qid as u16, ptr, (len - 1) as u16, io_qid as u16 + ); + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + println!(" - Waiting to create I/O submission queue {}", io_qid); + { + let qid = 0; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + self.completion_queue_head(qid as u16, head as u16); + } + } + + namespaces + } + + unsafe fn namespace_rw(&mut self, nsid: u32, lba: u64, blocks_1: u16, write: bool) -> Result<()> { + //TODO: Get real block size + let block_size = 512; + + let bytes = ((blocks_1 as u64) + 1) * block_size; + let (ptr0, ptr1) = if bytes <= 4096 { + (self.buffer_prp[0], 0) + } else if bytes <= 8192 { + (self.buffer_prp[0], self.buffer_prp[1]) + } else { + (self.buffer_prp[0], (self.buffer_prp.physical() + 8) as u64) + }; + + { + let qid = 1; + let queue = &mut self.submission_queues[qid]; + let cid = queue.i as u16; + let entry = if write { + NvmeCmd::io_write( + cid, nsid, lba, blocks_1, ptr0, ptr1 + ) + } else { + NvmeCmd::io_read( + cid, nsid, lba, blocks_1, ptr0, ptr1 + ) + }; + let tail = queue.submit(entry); + self.submission_queue_tail(qid as u16, tail as u16); + } + + { + let qid = 1; + let queue = &mut self.completion_queues[qid]; + let (head, entry) = queue.complete_spin(); + //TODO: Handle errors + self.completion_queue_head(qid as u16, head as u16); + } + + Ok(()) + } + + pub unsafe fn namespace_read(&mut self, nsid: u32, mut lba: u64, buf: &mut [u8]) -> Result> { + //TODO: Use interrupts + + //TODO: Get real block size + let block_size = 512; + + for chunk in buf.chunks_mut(self.buffer.len()) { + let blocks = (chunk.len() + block_size - 1) / block_size; + + assert!(blocks > 0); + assert!(blocks <= 0x1_0000); + + self.namespace_rw(nsid, lba, (blocks - 1) as u16, false)?; + + chunk.copy_from_slice(&self.buffer[..chunk.len()]); + + lba += blocks as u64; + } + + Ok(Some(buf.len())) + } + + pub unsafe fn namespace_write(&mut self, nsid: u32, mut lba: u64, buf: &[u8]) -> Result> { + //TODO: Use interrupts + + //TODO: Get real block size + let block_size = 512; + + for chunk in buf.chunks(self.buffer.len()) { + let blocks = (chunk.len() + block_size - 1) / block_size; + + assert!(blocks > 0); + assert!(blocks <= 0x1_0000); + + self.buffer[..chunk.len()].copy_from_slice(chunk); + + self.namespace_rw(nsid, lba, (blocks - 1) as u16, true)?; + + lba += blocks as u64; + } + + Ok(Some(buf.len())) } } diff --git a/nvmed/src/scheme.rs b/nvmed/src/scheme.rs new file mode 100644 index 0000000000..58edb0dae2 --- /dev/null +++ b/nvmed/src/scheme.rs @@ -0,0 +1,221 @@ +use std::collections::BTreeMap; +use std::{cmp, str}; +use std::fmt::Write; +use std::io::Read; +use syscall::{ + Error, EACCES, EBADF, EINVAL, EISDIR, ENOENT, Result, + Io, SchemeBlockMut, Stat, MODE_DIR, MODE_FILE, O_DIRECTORY, + O_STAT, SEEK_CUR, SEEK_END, SEEK_SET}; + +use crate::nvme::{Nvme, NvmeNamespace}; + +#[derive(Clone)] +enum Handle { + List(Vec, usize), + Disk(u32, usize) +} + +pub struct DiskScheme { + scheme_name: String, + nvme: Nvme, + disks: BTreeMap, + handles: BTreeMap, + next_id: usize +} + +impl DiskScheme { + pub fn new(scheme_name: String, nvme: Nvme, disks: BTreeMap) -> DiskScheme { + DiskScheme { + scheme_name, + nvme, + disks, + handles: BTreeMap::new(), + next_id: 0 + } + } +} + +impl DiskScheme { + pub fn irq(&mut self) -> bool { + // TODO: implement + false + } +} + +impl SchemeBlockMut for DiskScheme { + fn open(&mut self, path: &[u8], flags: usize, uid: u32, _gid: u32) -> Result> { + if uid == 0 { + let path_str = str::from_utf8(path).or(Err(Error::new(ENOENT)))?.trim_matches('/'); + if path_str.is_empty() { + if flags & O_DIRECTORY == O_DIRECTORY || flags & O_STAT == O_STAT { + let mut list = String::new(); + + for (nsid, _disk) in self.disks.iter() { + write!(list, "{}\n", nsid).unwrap(); + } + + let id = self.next_id; + self.next_id += 1; + self.handles.insert(id, Handle::List(list.into_bytes(), 0)); + Ok(Some(id)) + } else { + Err(Error::new(EISDIR)) + } + } else { + let nsid = path_str.parse::().or(Err(Error::new(ENOENT)))?; + + if self.disks.contains_key(&nsid) { + let id = self.next_id; + self.next_id += 1; + self.handles.insert(id, Handle::Disk(nsid, 0)); + Ok(Some(id)) + } else { + Err(Error::new(ENOENT)) + } + } + } else { + Err(Error::new(EACCES)) + } + } + + fn dup(&mut self, id: usize, buf: &[u8]) -> Result> { + if ! buf.is_empty() { + return Err(Error::new(EINVAL)); + } + + let new_handle = { + let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; + handle.clone() + }; + + let new_id = self.next_id; + self.next_id += 1; + self.handles.insert(new_id, new_handle); + Ok(Some(new_id)) + } + + fn fstat(&mut self, id: usize, stat: &mut Stat) -> Result> { + match *self.handles.get(&id).ok_or(Error::new(EBADF))? { + Handle::List(ref data, _) => { + stat.st_mode = MODE_DIR; + stat.st_size = data.len() as u64; + Ok(Some(0)) + }, + Handle::Disk(number, _) => { + let disk = self.disks.get_mut(&number).ok_or(Error::new(EBADF))?; + stat.st_mode = MODE_FILE; + stat.st_size = disk.blocks * disk.block_size; + Ok(Some(0)) + } + } + } + + fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result> { + let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; + + let mut i = 0; + + let scheme_name = self.scheme_name.as_bytes(); + let mut j = 0; + while i < buf.len() && j < scheme_name.len() { + buf[i] = scheme_name[j]; + i += 1; + j += 1; + } + + if i < buf.len() { + buf[i] = b':'; + i += 1; + } + + match *handle { + Handle::List(_, _) => (), + Handle::Disk(number, _) => { + let number_str = format!("{}", number); + let number_bytes = number_str.as_bytes(); + j = 0; + while i < buf.len() && j < number_bytes.len() { + buf[i] = number_bytes[j]; + i += 1; + j += 1; + } + } + } + + Ok(Some(i)) + } + + fn read(&mut self, id: usize, buf: &mut [u8]) -> Result> { + match *self.handles.get_mut(&id).ok_or(Error::new(EBADF))? { + Handle::List(ref mut handle, ref mut size) => { + let count = (&handle[*size..]).read(buf).unwrap(); + *size += count; + Ok(Some(count)) + }, + Handle::Disk(number, ref mut size) => { + let disk = self.disks.get_mut(&number).ok_or(Error::new(EBADF))?; + let block_size = disk.block_size; + if let Some(count) = unsafe { + self.nvme.namespace_read(disk.id, (*size as u64)/block_size, buf)? + } { + *size += count; + Ok(Some(count)) + } else { + Ok(None) + } + } + } + } + + fn write(&mut self, id: usize, buf: &[u8]) -> Result> { + match *self.handles.get_mut(&id).ok_or(Error::new(EBADF))? { + Handle::List(_, _) => { + Err(Error::new(EBADF)) + }, + Handle::Disk(number, ref mut size) => { + let disk = self.disks.get_mut(&number).ok_or(Error::new(EBADF))?; + let block_size = disk.block_size; + if let Some(count) = unsafe { + self.nvme.namespace_write(disk.id, (*size as u64)/block_size, buf)? + } { + *size += count; + Ok(Some(count)) + } else { + Ok(None) + } + } + } + } + + fn seek(&mut self, id: usize, pos: usize, whence: usize) -> Result> { + match *self.handles.get_mut(&id).ok_or(Error::new(EBADF))? { + Handle::List(ref mut handle, ref mut size) => { + let len = handle.len() as usize; + *size = match whence { + SEEK_SET => cmp::min(len, pos), + SEEK_CUR => cmp::max(0, cmp::min(len as isize, *size as isize + pos as isize)) as usize, + SEEK_END => cmp::max(0, cmp::min(len as isize, len as isize + pos as isize)) as usize, + _ => return Err(Error::new(EINVAL)) + }; + + Ok(Some(*size)) + }, + Handle::Disk(number, ref mut size) => { + let disk = self.disks.get_mut(&number).ok_or(Error::new(EBADF))?; + let len = (disk.blocks * disk.block_size) as usize; + *size = match whence { + SEEK_SET => cmp::min(len, pos), + SEEK_CUR => cmp::max(0, cmp::min(len as isize, *size as isize + pos as isize)) as usize, + SEEK_END => cmp::max(0, cmp::min(len as isize, len as isize + pos as isize)) as usize, + _ => return Err(Error::new(EINVAL)) + }; + + Ok(Some(*size)) + } + } + } + + fn close(&mut self, id: usize) -> Result> { + self.handles.remove(&id).ok_or(Error::new(EBADF)).and(Ok(Some(0))) + } +} diff --git a/pcid/Cargo.toml b/pcid/Cargo.toml index 56465ba9fd..e35303f094 100644 --- a/pcid/Cargo.toml +++ b/pcid/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "pcid" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "1.0" diff --git a/pcid/src/config.rs b/pcid/src/config.rs index ee7756c82e..74ba8b4eaa 100644 --- a/pcid/src/config.rs +++ b/pcid/src/config.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::ops::Range; #[derive(Debug, Default, Deserialize)] diff --git a/pcid/src/main.rs b/pcid/src/main.rs index bf5581fc0d..a977e0fcfb 100644 --- a/pcid/src/main.rs +++ b/pcid/src/main.rs @@ -1,5 +1,4 @@ #![feature(asm)] -#![feature(iterator_step_by)] #[macro_use] extern crate bitflags; extern crate byteorder; @@ -13,8 +12,8 @@ use std::io::Read; use std::process::Command; use syscall::iopl; -use config::Config; -use pci::{Pci, PciClass, PciHeader, PciHeaderError, PciHeaderType}; +use crate::config::Config; +use crate::pci::{Pci, PciClass, PciHeader, PciHeaderError, PciHeaderType}; mod config; mod pci; diff --git a/ps2d/Cargo.toml b/ps2d/Cargo.toml index 559e6340c8..34ef208a98 100644 --- a/ps2d/Cargo.toml +++ b/ps2d/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "ps2d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" -orbclient = "0.3" +orbclient = "0.3.27" redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.1" diff --git a/ps2d/src/main.rs b/ps2d/src/main.rs index 3249d4f750..3e896a9253 100644 --- a/ps2d/src/main.rs +++ b/ps2d/src/main.rs @@ -1,4 +1,3 @@ -#![deny(warnings)] #![feature(asm)] #[macro_use] @@ -17,7 +16,7 @@ use std::sync::Arc; use event::EventQueue; use syscall::iopl; -use state::Ps2d; +use crate::state::Ps2d; mod controller; mod keymap; diff --git a/ps2d/src/state.rs b/ps2d/src/state.rs index 11472767a0..13c71c0876 100644 --- a/ps2d/src/state.rs +++ b/ps2d/src/state.rs @@ -1,12 +1,12 @@ -use orbclient::{KeyEvent, MouseEvent, ButtonEvent, ScrollEvent}; -use std::cmp; +use orbclient::{KeyEvent, MouseEvent, MouseRelativeEvent, ButtonEvent, ScrollEvent}; use std::fs::File; use std::io::Write; use std::os::unix::io::AsRawFd; +use std::str; use syscall; -use controller::Ps2; -use vm; +use crate::controller::Ps2; +use crate::vm; bitflags! { flags MousePacketFlags: u8 { @@ -46,7 +46,7 @@ impl char> Ps2d { let mut ps2 = Ps2::new(); let extra_packet = ps2.init(); - let vmmouse = vm::enable(); + let vmmouse = false; //vm::enable(); let mut ps2d = Ps2d { ps2: ps2, @@ -75,7 +75,7 @@ impl char> Ps2d { pub fn resize(&mut self) { let mut buf: [u8; 4096] = [0; 4096]; if let Ok(count) = syscall::fpath(self.input.as_raw_fd() as usize, &mut buf) { - let path = unsafe { String::from_utf8_unchecked(Vec::from(&buf[..count])) }; + let path = unsafe { str::from_utf8_unchecked(&buf[..count]) }; let res = path.split(":").nth(1).unwrap_or(""); self.width = res.split("/").nth(1).unwrap_or("").parse::().unwrap_or(0); self.height = res.split("/").nth(2).unwrap_or("").parse::().unwrap_or(0); @@ -89,9 +89,6 @@ impl char> Ps2d { } pub fn handle(&mut self, keyboard: bool, data: u8) { - // TODO: Improve efficiency - self.resize(); - if keyboard { let (scancode, pressed) = if data >= 0x80 { (data - 0x80, false) @@ -127,26 +124,28 @@ impl char> Ps2d { let (status, dx, dy, dz, _, _) = unsafe { vm::cmd(vm::ABSPOINTER_DATA, 4) }; - let (x, y) = if status & vm::RELATIVE_PACKET == vm::RELATIVE_PACKET { - ( - cmp::max(0, cmp::min(self.width as i32, self.mouse_x + dx as i32)), - cmp::max(0, cmp::min(self.height as i32, self.mouse_y - dy as i32)) - ) + if status & vm::RELATIVE_PACKET == vm::RELATIVE_PACKET { + if dx != 0 || dy != 0 { + self.input.write(&MouseRelativeEvent { + dx: dx as i32, + dy: -(dy as i32), + }.to_event()).expect("ps2d: failed to write mouse event"); + } } else { - ( - dx as i32 * self.width as i32 / 0xFFFF, - dy as i32 * self.height as i32 / 0xFFFF - ) - }; + // TODO: Improve efficiency + self.resize(); - if x != self.mouse_x || y != self.mouse_y { - self.mouse_x = x; - self.mouse_y = y; - self.input.write(&MouseEvent { - x: x, - y: y, - }.to_event()).expect("ps2d: failed to write mouse event"); - } + let x = dx as i32 * self.width as i32 / 0xFFFF; + let y = dy as i32 * self.height as i32 / 0xFFFF; + if x != self.mouse_x || y != self.mouse_y { + self.mouse_x = x; + self.mouse_y = y; + self.input.write(&MouseEvent { + x: x, + y: y, + }.to_event()).expect("ps2d: failed to write mouse event"); + } + }; if dz != 0 { self.input.write(&ScrollEvent { @@ -200,14 +199,10 @@ impl char> Ps2d { dz = -scroll as i32; } - let x = cmp::max(0, cmp::min(self.width as i32, self.mouse_x + dx)); - let y = cmp::max(0, cmp::min(self.height as i32, self.mouse_y + dy)); - if x != self.mouse_x || y != self.mouse_y { - self.mouse_x = x; - self.mouse_y = y; - self.input.write(&MouseEvent { - x: x, - y: y, + if dx != 0 || dy != 0 { + self.input.write(&MouseRelativeEvent { + dx: dx, + dy: dy, }.to_event()).expect("ps2d: failed to write mouse event"); } diff --git a/rtl8168d/Cargo.toml b/rtl8168d/Cargo.toml index 661cda88f4..0ad6373cb3 100644 --- a/rtl8168d/Cargo.toml +++ b/rtl8168d/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "rtl8168d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } +netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git", branch = "redox-unix" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.1" diff --git a/rtl8168d/src/main.rs b/rtl8168d/src/main.rs index 03eb75be10..19908dba1b 100644 --- a/rtl8168d/src/main.rs +++ b/rtl8168d/src/main.rs @@ -7,8 +7,8 @@ extern crate syscall; use std::cell::RefCell; use std::env; use std::fs::File; -use std::io::{Read, Write, Result}; -use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::io::{self, Read, Write, Result}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; use event::EventQueue; @@ -34,7 +34,7 @@ fn main() { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { let socket_fd = syscall::open(":network", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("rtl8168d: failed to create network scheme"); - let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); + let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd as RawFd) })); let mut irq_file = File::open(format!("irq:{}", irq)).expect("rtl8168d: failed to open IRQ file"); @@ -83,11 +83,17 @@ fn main() { let device_packet = device.clone(); let socket_packet = socket.clone(); - event_queue.add(socket_fd, move |_event| -> Result> { + event_queue.add(socket_fd as RawFd, move |_event| -> Result> { loop { let mut packet = Packet::default(); - if socket_packet.borrow_mut().read(&mut packet)? == 0 { - break; + match socket_packet.borrow_mut().read(&mut packet) { + Ok(0) => return Ok(Some(0)), + Ok(_) => (), + Err(err) => if err.kind() == io::ErrorKind::WouldBlock { + break; + } else { + return Err(err); + } } let a = packet.a; @@ -132,6 +138,9 @@ fn main() { loop { let event_count = event_queue.run().expect("rtl8168d: failed to handle events"); + if event_count == 0 { + break; + } send_events(event_count); } } diff --git a/vboxd/Cargo.toml b/vboxd/Cargo.toml index 99d1448cf9..bab0ee130a 100644 --- a/vboxd/Cargo.toml +++ b/vboxd/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "vboxd" version = "0.1.0" +edition = "2018" [dependencies] -orbclient = "0.3" +orbclient = "0.3.27" redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.1" diff --git a/vboxd/src/main.rs b/vboxd/src/main.rs index 6d30b4763e..74ee1612b4 100644 --- a/vboxd/src/main.rs +++ b/vboxd/src/main.rs @@ -13,7 +13,7 @@ use syscall::flag::{PHYSMAP_NO_CACHE, PHYSMAP_WRITE}; use syscall::io::{Dma, Io, Mmio, Pio}; use syscall::iopl; -use bga::Bga; +use crate::bga::Bga; mod bga; diff --git a/vesad/Cargo.toml b/vesad/Cargo.toml index 76a4553d3f..6223c0672e 100644 --- a/vesad/Cargo.toml +++ b/vesad/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "vesad" version = "0.1.0" +edition = "2018" [dependencies] -orbclient = "0.3" +orbclient = "0.3.27" ransid = "0.4" rusttype = { version = "0.2", optional = true } redox_syscall = "0.1" diff --git a/vesad/src/display.rs b/vesad/src/display.rs index bb25dcb841..1b4f2cb8bb 100644 --- a/vesad/src/display.rs +++ b/vesad/src/display.rs @@ -5,7 +5,7 @@ use std::alloc::{Alloc, Global, Layout}; use std::{cmp, slice}; use std::ptr::NonNull; -use primitive::{fast_set32, fast_set64, fast_copy}; +use crate::primitive::{fast_set32, fast_set64, fast_copy}; #[cfg(feature="rusttype")] use self::rusttype::{Font, FontCollection, Scale, point}; diff --git a/vesad/src/main.rs b/vesad/src/main.rs index b5ec9cd7b8..9bcb62d251 100644 --- a/vesad/src/main.rs +++ b/vesad/src/main.rs @@ -10,9 +10,9 @@ use std::fs::File; use std::io::{Read, Write}; use syscall::{physmap, physunmap, Packet, SchemeMut, EVENT_READ, PHYSMAP_WRITE, PHYSMAP_WRITE_COMBINE}; -use mode_info::VBEModeInfo; -use primitive::fast_set64; -use scheme::{DisplayScheme, HandleKind}; +use crate::mode_info::VBEModeInfo; +use crate::primitive::fast_set64; +use crate::scheme::{DisplayScheme, HandleKind}; pub mod display; pub mod mode_info; @@ -65,7 +65,10 @@ fn main() { let mut blocked = Vec::new(); loop { let mut packet = Packet::default(); - socket.read(&mut packet).expect("vesad: failed to read display scheme"); + if socket.read(&mut packet).expect("vesad: failed to read display scheme") == 0 { + //TODO: Handle blocked + break; + } // If it is a read packet, and there is no data, block it. Otherwise, handle packet if packet.a == syscall::number::SYS_READ && packet.d > 0 && scheme.can_read(packet.b).is_none() { diff --git a/vesad/src/scheme.rs b/vesad/src/scheme.rs index 65fec1585b..46eff7639a 100644 --- a/vesad/src/scheme.rs +++ b/vesad/src/scheme.rs @@ -4,8 +4,8 @@ use std::{mem, slice, str}; use orbclient::{Event, EventOption}; use syscall::{Result, Error, EACCES, EBADF, EINVAL, ENOENT, O_NONBLOCK, Map, SchemeMut}; -use display::Display; -use screen::{Screen, GraphicScreen, TextScreen}; +use crate::display::Display; +use crate::screen::{Screen, GraphicScreen, TextScreen}; #[derive(Clone)] pub enum HandleKind { @@ -25,14 +25,14 @@ pub struct DisplayScheme { width: usize, height: usize, active: usize, - pub screens: BTreeMap>, + pub screens: BTreeMap>, next_id: usize, pub handles: BTreeMap, } impl DisplayScheme { pub fn new(width: usize, height: usize, onscreen: usize, spec: &[bool]) -> DisplayScheme { - let mut screens: BTreeMap> = BTreeMap::new(); + let mut screens: BTreeMap> = BTreeMap::new(); let mut screen_i = 1; for &screen_type in spec.iter() { @@ -227,7 +227,7 @@ impl SchemeMut for DisplayScheme { let mut new_active_opt = None; match event.to_option() { EventOption::Key(key_event) => match key_event.scancode { - f @ 0x3B ... 0x44 => { // F1 through F10 + f @ 0x3B ..= 0x44 => { // F1 through F10 new_active_opt = Some((f - 0x3A) as usize); }, 0x57 => { // F11 diff --git a/vesad/src/screen/graphic.rs b/vesad/src/screen/graphic.rs index f428099c7a..0cb6739594 100644 --- a/vesad/src/screen/graphic.rs +++ b/vesad/src/screen/graphic.rs @@ -5,9 +5,9 @@ use orbclient::{Event, ResizeEvent}; use syscall::error::*; use syscall::flag::{SEEK_SET, SEEK_CUR, SEEK_END}; -use display::Display; -use primitive::fast_copy; -use screen::Screen; +use crate::display::Display; +use crate::primitive::fast_copy; +use crate::screen::Screen; pub struct GraphicScreen { pub display: Display, diff --git a/vesad/src/screen/text.rs b/vesad/src/screen/text.rs index 34e794ff17..38b7a2976f 100644 --- a/vesad/src/screen/text.rs +++ b/vesad/src/screen/text.rs @@ -6,8 +6,8 @@ use std::ptr; use orbclient::{Event, EventOption}; use syscall::error::*; -use display::Display; -use screen::Screen; +use crate::display::Display; +use crate::screen::Screen; pub struct TextScreen { pub console: ransid::Console, @@ -92,8 +92,8 @@ impl Screen for TextScreen { }, _ => { let c = match key_event.character { - c @ 'A' ... 'Z' if self.ctrl => ((c as u8 - b'A') + b'\x01') as char, - c @ 'a' ... 'z' if self.ctrl => ((c as u8 - b'a') + b'\x01') as char, + c @ 'A' ..= 'Z' if self.ctrl => ((c as u8 - b'A') + b'\x01') as char, + c @ 'a' ..= 'z' if self.ctrl => ((c as u8 - b'a') + b'\x01') as char, c => c }; diff --git a/xhcid/Cargo.toml b/xhcid/Cargo.toml index f7eca3c226..9d8b2e7bd1 100644 --- a/xhcid/Cargo.toml +++ b/xhcid/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "xhcid" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/xhcid/src/main.rs b/xhcid/src/main.rs index a5c1d82725..4fa3e5ea3a 100644 --- a/xhcid/src/main.rs +++ b/xhcid/src/main.rs @@ -9,14 +9,14 @@ use std::cell::RefCell; use std::env; use std::fs::File; use std::io::{Result, Read, Write}; -use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; use syscall::data::Packet; use syscall::flag::{PHYSMAP_NO_CACHE, PHYSMAP_WRITE}; use syscall::error::EWOULDBLOCK; use syscall::scheme::SchemeMut; -use xhci::Xhci; +use crate::xhci::Xhci; mod usb; mod xhci; @@ -38,7 +38,7 @@ fn main() { // Daemonize if unsafe { syscall::clone(0).unwrap() } == 0 { let socket_fd = syscall::open(":usb", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("xhcid: failed to create usb scheme"); - let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); + let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd as RawFd) })); let mut irq_file = File::open(format!("irq:{}", irq)).expect("xhcid: failed to open IRQ file"); diff --git a/xhcid/src/xhci/command.rs b/xhcid/src/xhci/command.rs index 76ba0e6b4e..56449a66e3 100644 --- a/xhcid/src/xhci/command.rs +++ b/xhcid/src/xhci/command.rs @@ -1,5 +1,5 @@ use syscall::error::Result; -use syscall::io::Dma; + use super::event::EventRing; use super::ring::Ring; diff --git a/xhcid/src/xhci/mod.rs b/xhcid/src/xhci/mod.rs index 795d9a7169..64bd94e539 100644 --- a/xhcid/src/xhci/mod.rs +++ b/xhcid/src/xhci/mod.rs @@ -2,7 +2,7 @@ use plain::Plain; use std::{mem, slice}; use syscall::error::Result; use syscall::io::{Dma, Io}; -use usb; +use crate::usb; mod capability; mod command; diff --git a/xhcid/src/xhci/trb.rs b/xhcid/src/xhci/trb.rs index c4193422ae..459fdc6b4a 100644 --- a/xhcid/src/xhci/trb.rs +++ b/xhcid/src/xhci/trb.rs @@ -1,6 +1,6 @@ use std::{fmt, mem}; use syscall::io::{Io, Mmio}; -use usb; +use crate::usb; #[repr(u8)] pub enum TrbType {