From 50652ceb9370c533b6d8801290a0602b49837878 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 23 Apr 2019 13:25:41 -0600 Subject: [PATCH 01/23] Temporary patches for Redox with unix target family --- Cargo.lock | 717 ++++--------------------------------------- Cargo.toml | 9 + ahcid/src/main.rs | 6 +- alxd/Cargo.toml | 2 +- alxd/src/main.rs | 6 +- e1000d/Cargo.toml | 2 +- e1000d/src/main.rs | 6 +- ihdad/src/main.rs | 4 +- rtl8168d/Cargo.toml | 2 +- rtl8168d/src/main.rs | 6 +- xhcid/src/main.rs | 4 +- 11 files changed, 87 insertions(+), 677 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 662d046acd..4712e5aeda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,7 +14,7 @@ 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)", ] @@ -32,25 +32,11 @@ dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "autocfg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -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)", -] - [[package]] name = "bgad" version = "0.1.0" dependencies = [ - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -74,70 +60,17 @@ name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -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)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cc" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "cfg-if" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -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)", -] - -[[package]] -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)", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.7.1" -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)", - "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)", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.5" -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)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] 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)", ] @@ -166,45 +99,6 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "futures" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "httparse" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.10.15" -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)", - "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)", - "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)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -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)", - "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)", -] - [[package]] name = "idna" version = "0.1.5" @@ -230,7 +124,7 @@ 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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -243,48 +137,21 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -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" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "libc" version = "0.2.51" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix#5c5373d530b61d9fdd7e2dee0dff55003e9268a8" [[package]] name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -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)", -] - [[package]] name = "log" version = "0.4.6" @@ -298,54 +165,31 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "memoffset" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[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)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "log 0.4.6 (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)", + "net2 0.2.33 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)", "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" -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)", - "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", -] - [[package]] name = "miow" version = "0.2.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)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -353,32 +197,28 @@ dependencies = [ [[package]] name = "net2" version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix#b2c7c1e7773f13eebd9b4421172d9e4b5b806ce6" 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)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "winapi 0.3.7 (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#e28efbd6bbfabe42290e7ef84bca5e4c7f0d4aa2" +source = "git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix#482c8285faa70c592d235336faaf7223f195b5d7" 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-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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "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)", + "pbr 1.0.1 (git+https://gitlab.redox-os.org/redox-os/pb.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_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)", - "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)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -393,7 +233,7 @@ version = "0.0.1" source = "git+https://github.com/willem66745/ntpclient-rust#7e3bdf60eb940825789a8da5181025320e3050b0" dependencies = [ "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)", ] [[package]] @@ -429,12 +269,9 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "num_cpus" -version = "1.10.0" +name = "numtoa" +version = "0.1.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)", -] [[package]] name = "nvmed" @@ -447,50 +284,20 @@ dependencies = [ [[package]] name = "orbclient" -version = "0.3.21" +version = "0.3.22" 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)", ] -[[package]] -name = "owning_ref" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -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)", - "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)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pbr" version = "1.0.1" -source = "git+https://github.com/a8m/pb#b9792c9fe37343234316e23c263874cf383b208d" +source = "git+https://gitlab.redox-os.org/redox-os/pb.git?branch=redox-unix#743300cf9566f77962a5b550db1ba27cc922b6a5" 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)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -518,7 +325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.27" +version = "0.4.28" 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)", @@ -529,17 +336,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.22 (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)", ] [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" 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)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -547,7 +354,7 @@ 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)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -557,39 +364,12 @@ 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)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "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)", ] -[[package]] -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)", - "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_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_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)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -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)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_core" version = "0.3.1" @@ -603,62 +383,6 @@ name = "rand_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.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)", - "rand_core 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)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -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)", - "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)", -] - -[[package]] -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)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ransid" version = "0.4.7" @@ -697,48 +421,16 @@ dependencies = [ "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -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)", - "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)", - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] 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)", ] -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustls" -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)", - "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)", - "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rusttype" version = "0.2.3" @@ -749,25 +441,6 @@ dependencies = [ "stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "safemem" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sct" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sdl2" version = "0.31.0" @@ -775,7 +448,7 @@ 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)", + "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "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)", @@ -789,19 +462,6 @@ dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "1.0.90" @@ -812,9 +472,9 @@ name = "serde_derive" version = "1.0.90" 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.28 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -832,11 +492,6 @@ name = "spin" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "stable_deref_trait" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "stb_truetype" version = "0.2.6" @@ -847,20 +502,21 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.30" +version = "0.15.32" 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.28 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (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.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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "numtoa 0.1.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_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -868,168 +524,12 @@ dependencies = [ [[package]] name = "time" version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix#fc118e5752aaac833808a25f0850606b675b32ec" 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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tokio" -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)", - "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)", - "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)", - "tokio-fs 0.1.4 (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)", - "tokio-tcp 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)", - "tokio-threadpool 0.1.9 (git+https://gitlab.redox-os.org/redox-os/tokio)", - "tokio-timer 0.2.8 (git+https://gitlab.redox-os.org/redox-os/tokio)", - "tokio-udp 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)", - "tokio-uds 0.2.4 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -name = "tokio-codec" -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)", - "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -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)", - "tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -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)", -] - -[[package]] -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)", - "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)", -] - -[[package]] -name = "tokio-io" -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)", -] - -[[package]] -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)", - "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)", - "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)", - "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)", - "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -name = "tokio-tcp" -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)", - "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)", - "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -name = "tokio-threadpool" -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)", - "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)", -] - -[[package]] -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)", - "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)", -] - -[[package]] -name = "tokio-udp" -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)", - "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)", - "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", -] - -[[package]] -name = "tokio-uds" -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)", - "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)", - "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)", - "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)", -] - [[package]] name = "toml" version = "0.4.10" @@ -1038,24 +538,6 @@ dependencies = [ "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unicode-bidi" version = "0.3.4" @@ -1077,11 +559,6 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "untrusted" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "url" version = "1.7.2" @@ -1101,21 +578,16 @@ 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.22 (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)", ] -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "vesad" version = "0.1.0" dependencies = [ - "orbclient 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "orbclient 0.3.22 (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)", "rusttype 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1129,24 +601,6 @@ dependencies = [ "utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "webpki" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "webpki-roots" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "winapi" version = "0.2.8" @@ -1196,129 +650,76 @@ dependencies = [ "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[patch.unused]] +name = "ring" +version = "0.14.6" +source = "git+https://gitlab.redox-os.org/redox-os/ring.git?branch=redox-unix#1e177479981854cb7d06bea12e0a6514d26e09a6" + [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 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 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 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 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 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 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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)" = "" "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 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 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 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 net2 0.2.33 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)" = "" +"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 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 numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" +"checksum orbclient 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0e398a001ca5f52b252d1cf5679d52ddd347d3130ac9ded98549f16537c546" +"checksum pbr 1.0.1 (git+https://gitlab.redox-os.org/redox-os/pb.git?branch=redox-unix)" = "" "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 proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)" = "ba92c84f814b3f9a44c5cfca7d2ad77fa10710867d2bbb1b3d175ab5f47daa12" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "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 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_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_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 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_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 scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"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 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 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 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 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)" = "" -"checksum tokio-current-thread 0.1.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-fs 0.1.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-tcp 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-threadpool 0.1.9 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-timer 0.2.8 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-udp 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" -"checksum tokio-uds 0.2.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"checksum time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)" = "" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum vte 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f42f536e22f7fcbb407639765c8fd78707a33109301f834a594758bedd6e8cf" -"checksum webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "17d7967316d8411ca3b01821ee6c332bde138ba4363becdb492f12e514daa17f" -"checksum webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85d1f408918fd590908a70d36b7ac388db2edc221470333e4d6e5b598e44cabf" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Cargo.toml b/Cargo.toml index 143e3a8b44..664b08e23b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,12 @@ members = [ "vesad", "xhcid" ] + +[patch.crates-io] +libc = { git = "https://gitlab.redox-os.org/redox-os/liblibc.git", branch = "redox-unix" } +mio = { git = "https://gitlab.redox-os.org/redox-os/mio" } +net2 = { git = "https://gitlab.redox-os.org/redox-os/net2-rs.git", branch = "redox-unix" } +pbr = { git = "https://gitlab.redox-os.org/redox-os/pb.git", branch = "redox-unix" } +ring = { git = "https://gitlab.redox-os.org/redox-os/ring.git", branch = "redox-unix" } +time = { git = "https://gitlab.redox-os.org/redox-os/time.git", branch = "redox-unix" } +#untrusted = { git = "https://github.com/briansmith/untrusted", tag = "ring-master" } diff --git a/ahcid/src/main.rs b/ahcid/src/main.rs index 2cc86f79fc..43ac054e43 100644 --- a/ahcid/src/main.rs +++ b/ahcid/src/main.rs @@ -6,7 +6,7 @@ extern crate byteorder; use std::{env, usize}; use std::fs::File; use std::io::{Read, Write}; -use std::os::unix::io::FromRawFd; +use std::os::unix::io::{FromRawFd, RawFd}; use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, SchemeBlockMut}; use scheme::DiskScheme; @@ -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"); diff --git a/alxd/Cargo.toml b/alxd/Cargo.toml index 804a3de336..764df5c39d 100644 --- a/alxd/Cargo.toml +++ b/alxd/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" [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/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/e1000d/Cargo.toml b/e1000d/Cargo.toml index eaa8ae9d35..fd1f0a48dd 100644 --- a/e1000d/Cargo.toml +++ b/e1000d/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" [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/main.rs b/e1000d/src/main.rs index b420a0863b..719685c9e4 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -8,7 +8,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; @@ -65,7 +65,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("e1000d: 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("e1000d: failed to open IRQ file"); @@ -100,7 +100,7 @@ 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> { handle_update(&mut socket_packet.borrow_mut(), &mut device_packet.borrow_mut(), &mut todo.borrow_mut()); let next_read = device_packet.borrow().next_read(); diff --git a/ihdad/src/main.rs b/ihdad/src/main.rs index abff02312d..feba8a3680 100755 --- a/ihdad/src/main.rs +++ b/ihdad/src/main.rs @@ -9,7 +9,7 @@ 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::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."); diff --git a/rtl8168d/Cargo.toml b/rtl8168d/Cargo.toml index 661cda88f4..9f5859c1e8 100644 --- a/rtl8168d/Cargo.toml +++ b/rtl8168d/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" [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..b3b0dd7255 100644 --- a/rtl8168d/src/main.rs +++ b/rtl8168d/src/main.rs @@ -8,7 +8,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; @@ -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,7 +83,7 @@ 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 { diff --git a/xhcid/src/main.rs b/xhcid/src/main.rs index a5c1d82725..41ec4b6118 100644 --- a/xhcid/src/main.rs +++ b/xhcid/src/main.rs @@ -9,7 +9,7 @@ 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}; @@ -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"); From d1a50d0fd05637b665b285c59998a13e2d4db23c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 15 Jun 2019 10:54:29 -0600 Subject: [PATCH 02/23] Remove libc patch --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 664b08e23b..8225d57d8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ members = [ ] [patch.crates-io] -libc = { git = "https://gitlab.redox-os.org/redox-os/liblibc.git", branch = "redox-unix" } mio = { git = "https://gitlab.redox-os.org/redox-os/mio" } net2 = { git = "https://gitlab.redox-os.org/redox-os/net2-rs.git", branch = "redox-unix" } pbr = { git = "https://gitlab.redox-os.org/redox-os/pb.git", branch = "redox-unix" } From c55307073c11feeb75bf690ba5b52b009093d081 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 16 Jun 2019 11:08:49 -0600 Subject: [PATCH 03/23] Remove patches which are now done in the cookbook --- Cargo.toml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8225d57d8c..143e3a8b44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,3 @@ members = [ "vesad", "xhcid" ] - -[patch.crates-io] -mio = { git = "https://gitlab.redox-os.org/redox-os/mio" } -net2 = { git = "https://gitlab.redox-os.org/redox-os/net2-rs.git", branch = "redox-unix" } -pbr = { git = "https://gitlab.redox-os.org/redox-os/pb.git", branch = "redox-unix" } -ring = { git = "https://gitlab.redox-os.org/redox-os/ring.git", branch = "redox-unix" } -time = { git = "https://gitlab.redox-os.org/redox-os/time.git", branch = "redox-unix" } -#untrusted = { git = "https://github.com/briansmith/untrusted", tag = "ring-master" } From b50437af8ae6a56156c65ba549d61e2a0fac5abc Mon Sep 17 00:00:00 2001 From: Roland Ruckerbauer Date: Sat, 29 Jun 2019 20:20:28 +0200 Subject: [PATCH 04/23] Fixed deprecated syntax in vesad 2018 edition upgrade & fixes for a bunch of 'future error warnings' Actually upgrading all crates to 2018 edition --- Cargo.lock | 67 ++++++++++++++++++------------------- ahcid/Cargo.toml | 1 + ahcid/src/ahci/mod.rs | 6 ++-- ahcid/src/main.rs | 2 +- ahcid/src/scheme.rs | 16 ++++----- alxd/Cargo.toml | 1 + alxd/src/device/mod.rs | 6 ++-- bgad/Cargo.toml | 1 + bgad/src/main.rs | 4 +-- bgad/src/scheme.rs | 2 +- e1000d/Cargo.toml | 1 + e1000d/src/device.rs | 6 ++-- e1000d/src/main.rs | 2 +- ihdad/Cargo.toml | 1 + ihdad/src/hda/device.rs | 10 +++--- ihdad/src/hda/stream.rs | 4 +-- nvmed/Cargo.toml | 1 + nvmed/src/main.rs | 6 ++-- pcid/Cargo.toml | 1 + pcid/src/main.rs | 5 ++- ps2d/Cargo.toml | 1 + ps2d/src/main.rs | 2 +- ps2d/src/state.rs | 4 +-- rtl8168d/Cargo.toml | 1 + vboxd/Cargo.toml | 1 + vboxd/src/main.rs | 2 +- vesad/Cargo.toml | 1 + vesad/src/display.rs | 2 +- vesad/src/main.rs | 6 ++-- vesad/src/scheme.rs | 10 +++--- vesad/src/screen/graphic.rs | 6 ++-- vesad/src/screen/text.rs | 8 ++--- xhcid/Cargo.toml | 1 + xhcid/src/main.rs | 2 +- xhcid/src/xhci/command.rs | 2 +- xhcid/src/xhci/mod.rs | 2 +- xhcid/src/xhci/trb.rs | 2 +- 37 files changed, 102 insertions(+), 94 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4712e5aeda..e8f68a1aea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -144,8 +144,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" -source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix#5c5373d530b61d9fdd7e2dee0dff55003e9268a8" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "linked-hash-map" @@ -167,18 +167,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mio" -version = "0.6.16" -source = "git+https://gitlab.redox-os.org/redox-os/mio#439a559b2aa734e0970d37b3375889a57a465360" +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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (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 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (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)", ] @@ -189,7 +188,7 @@ version = "0.2.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)", - "net2 0.2.33 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -197,10 +196,10 @@ dependencies = [ [[package]] name = "net2" version = "0.2.33" -source = "git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix#b2c7c1e7773f13eebd9b4421172d9e4b5b806ce6" +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 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -211,10 +210,10 @@ source = "git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-uni 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.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", - "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", + "libc 0.2.58 (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 (git+https://gitlab.redox-os.org/redox-os/pb.git?branch=redox-unix)", + "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.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -233,7 +232,7 @@ version = "0.0.1" source = "git+https://github.com/willem66745/ntpclient-rust#7e3bdf60eb940825789a8da5181025320e3050b0" dependencies = [ "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -294,11 +293,13 @@ dependencies = [ [[package]] name = "pbr" version = "1.0.1" -source = "git+https://gitlab.redox-os.org/redox-os/pb.git?branch=redox-unix#743300cf9566f77962a5b550db1ba27cc922b6a5" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", - "time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)", - "winapi 0.3.7 (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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (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]] @@ -354,7 +355,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -364,7 +365,7 @@ 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 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (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)", @@ -448,7 +449,7 @@ 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 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (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)", @@ -515,7 +516,7 @@ name = "termion" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (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.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -524,9 +525,10 @@ dependencies = [ [[package]] name = "time" version = "0.1.42" -source = "git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix#fc118e5752aaac833808a25f0850606b675b32ec" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)", + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -650,11 +652,6 @@ dependencies = [ "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[patch.unused]] -name = "ring" -version = "0.14.6" -source = "git+https://gitlab.redox-os.org/redox-os/ring.git?branch=redox-unix#1e177479981854cb7d06bea12e0a6514d26e09a6" - [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" @@ -671,13 +668,13 @@ source = "git+https://gitlab.redox-os.org/redox-os/ring.git?branch=redox-unix#1e "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 lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum libc 0.2.51 (git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox-unix)" = "" +"checksum libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)" = "" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum net2 0.2.33 (git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=redox-unix)" = "" +"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?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)" = "" @@ -687,7 +684,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/ring.git?branch=redox-unix#1e "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum orbclient 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0e398a001ca5f52b252d1cf5679d52ddd347d3130ac9ded98549f16537c546" -"checksum pbr 1.0.1 (git+https://gitlab.redox-os.org/redox-os/pb.git?branch=redox-unix)" = "" +"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.28 (registry+https://github.com/rust-lang/crates.io-index)" = "ba92c84f814b3f9a44c5cfca7d2ad77fa10710867d2bbb1b3d175ab5f47daa12" @@ -712,7 +709,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/ring.git?branch=redox-unix#1e "checksum stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "69b7df505db8e81d54ff8be4693421e5b543e08214bd8d99eb761fcb4d5668ba" "checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" "checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" -"checksum time 0.1.42 (git+https://gitlab.redox-os.org/redox-os/time.git?branch=redox-unix)" = "" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 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 43ac054e43..370b593723 100644 --- a/ahcid/src/main.rs +++ b/ahcid/src/main.rs @@ -9,7 +9,7 @@ use std::io::{Read, Write}; use std::os::unix::io::{FromRawFd, RawFd}; use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, SchemeBlockMut}; -use scheme::DiskScheme; +use crate::scheme::DiskScheme; pub mod ahci; pub mod scheme; 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 764df5c39d..f4466be864 100644 --- a/alxd/Cargo.toml +++ b/alxd/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "alxd" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" 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/bgad/Cargo.toml b/bgad/Cargo.toml index 289f65cd54..f240b720fc 100644 --- a/bgad/Cargo.toml +++ b/bgad/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "bgad" version = "0.1.0" +edition = "2018" [dependencies] orbclient = "0.3" diff --git a/bgad/src/main.rs b/bgad/src/main.rs index e326899aba..0c8f2835e5 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; 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 fd1f0a48dd..bdd4a8844a 100644 --- a/e1000d/Cargo.toml +++ b/e1000d/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "e1000d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/e1000d/src/device.rs b/e1000d/src/device.rs index b4b675fd33..72e066b063 100644 --- a/e1000d/src/device.rs +++ b/e1000d/src/device.rs @@ -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, @@ -190,7 +190,7 @@ impl SchemeBlockMut for Intel8254x { 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 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() { diff --git a/e1000d/src/main.rs b/e1000d/src/main.rs index 719685c9e4..755bff8d89 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -13,7 +13,7 @@ use std::sync::Arc; use event::EventQueue; use syscall::{Packet, SchemeBlockMut, PHYSMAP_NO_CACHE, PHYSMAP_WRITE}; -use syscall::error::EWOULDBLOCK; + pub mod device; 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/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..bacc3878e6 100644 --- a/nvmed/src/main.rs +++ b/nvmed/src/main.rs @@ -6,9 +6,9 @@ extern crate spin; 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 self::nvme::Nvme; 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/main.rs b/pcid/src/main.rs index 259664612a..dbad37c1c2 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..f8ac54ebb9 100644 --- a/ps2d/Cargo.toml +++ b/ps2d/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "ps2d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/ps2d/src/main.rs b/ps2d/src/main.rs index 0dc1c9bd4c..9fd7922d62 100644 --- a/ps2d/src/main.rs +++ b/ps2d/src/main.rs @@ -17,7 +17,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..eb428dc309 100644 --- a/ps2d/src/state.rs +++ b/ps2d/src/state.rs @@ -5,8 +5,8 @@ use std::io::Write; use std::os::unix::io::AsRawFd; use syscall; -use controller::Ps2; -use vm; +use crate::controller::Ps2; +use crate::vm; bitflags! { flags MousePacketFlags: u8 { diff --git a/rtl8168d/Cargo.toml b/rtl8168d/Cargo.toml index 9f5859c1e8..0ad6373cb3 100644 --- a/rtl8168d/Cargo.toml +++ b/rtl8168d/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "rtl8168d" version = "0.1.0" +edition = "2018" [dependencies] bitflags = "0.7" diff --git a/vboxd/Cargo.toml b/vboxd/Cargo.toml index 99d1448cf9..dfb5bbe505 100644 --- a/vboxd/Cargo.toml +++ b/vboxd/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "vboxd" version = "0.1.0" +edition = "2018" [dependencies] orbclient = "0.3" 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..4e12f77657 100644 --- a/vesad/Cargo.toml +++ b/vesad/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "vesad" version = "0.1.0" +edition = "2018" [dependencies] orbclient = "0.3" 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..b8aaceabb6 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; 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 41ec4b6118..4fa3e5ea3a 100644 --- a/xhcid/src/main.rs +++ b/xhcid/src/main.rs @@ -16,7 +16,7 @@ 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; 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 { From 1e3413acaa90849877fd1ccc23c2d57e1fb0cda0 Mon Sep 17 00:00:00 2001 From: Simon Ellmann Date: Wed, 3 Jul 2019 20:20:54 +0200 Subject: [PATCH 05/23] Add ixgbe driver and split filesystem.toml into separate driver config files --- .gitmodules | 3 +++ e1000d/config.toml | 6 +++++ filesystem.toml | 44 ---------------------------------- ihdad/config.toml | 6 +++++ ixgbed | 1 + pcid/src/config.rs | 1 + pcid/src/main.rs | 57 +++++++++++++++++++++++++++++++++++--------- rtl8168d/config.toml | 6 +++++ 8 files changed, 69 insertions(+), 55 deletions(-) create mode 100644 .gitmodules create mode 100644 e1000d/config.toml create mode 100644 ihdad/config.toml create mode 160000 ixgbed create mode 100644 rtl8168d/config.toml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..73ccf1a62a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ixgbed"] + path = ixgbed + url = https://github.com/ackxolotl/ixgbed.git diff --git a/e1000d/config.toml b/e1000d/config.toml new file mode 100644 index 0000000000..0f5f3339b3 --- /dev/null +++ b/e1000d/config.toml @@ -0,0 +1,6 @@ +[[drivers]] +name = "E1000 NIC" +class = 2 +ids = { 0x8086 = [0x1004, 0x100e, 0x100f, 0x1503] } +command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] + diff --git a/filesystem.toml b/filesystem.toml index ff38fb336a..20871a0272 100644 --- a/filesystem.toml +++ b/filesystem.toml @@ -1,49 +1,5 @@ ## Drivers for FS ## -# e1000d -[[drivers]] -name = "82543GC NIC" -class = 2 -vendor = 32902 -device = 4100 -command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82540EM NIC" -class = 2 -vendor = 32902 -device = 4110 -command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82545EM NIC" -class = 2 -vendor = 32902 -device = 4111 -command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82579V NIC" -class = 2 -vendor = 32902 -device = 5379 -command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] - -# ihdad -[[drivers]] -name = "Intel HD Audio" -class = 4 -subclass = 3 -command = ["ihdad", "$NAME", "$BAR0", "$IRQ", "$VENID", "$DEVID"] - -# rtl8168d -[[drivers]] -name = "RTL8168 NIC" -class = 2 -vendor = 4332 -device = 33128 -command = ["rtl8168d", "$NAME", "$BAR2", "$IRQ"] - # xhcid # [[drivers]] # name = "XHCI" diff --git a/ihdad/config.toml b/ihdad/config.toml new file mode 100644 index 0000000000..2bee08c1f4 --- /dev/null +++ b/ihdad/config.toml @@ -0,0 +1,6 @@ +[[drivers]] +name = "Intel HD Audio" +class = 4 +subclass = 3 +command = ["ihdad", "$NAME", "$BAR0", "$IRQ", "$VENID", "$DEVID"] + diff --git a/ixgbed b/ixgbed new file mode 160000 index 0000000000..26c0142179 --- /dev/null +++ b/ixgbed @@ -0,0 +1 @@ +Subproject commit 26c0142179a8fbcae22d1d48979681fe029c04e3 diff --git a/pcid/src/config.rs b/pcid/src/config.rs index 8a36d8df1d..ee7756c82e 100644 --- a/pcid/src/config.rs +++ b/pcid/src/config.rs @@ -11,6 +11,7 @@ pub struct DriverConfig { pub class: Option, pub subclass: Option, pub interface: Option, + pub ids: Option>>, pub vendor: Option, pub device: Option, pub device_id_range: Option>, diff --git a/pcid/src/main.rs b/pcid/src/main.rs index 259664612a..bf5581fc0d 100644 --- a/pcid/src/main.rs +++ b/pcid/src/main.rs @@ -7,8 +7,8 @@ extern crate byteorder; extern crate syscall; extern crate toml; -use std::env; -use std::fs::File; +use std::{env, i64}; +use std::fs::{File, metadata, read_dir}; use std::io::Read; use std::process::Command; use syscall::iopl; @@ -80,12 +80,30 @@ fn handle_parsed_header(config: &Config, pci: &Pci, bus_num: u8, if interface != header.interface() { continue; } } - if let Some(vendor) = driver.vendor { - if vendor != header.vendor_id() { continue; } - } + if let Some(ref ids) = driver.ids { + let mut device_found = false; + for (vendor, devices) in ids { + let vendor_without_prefix = vendor.trim_left_matches("0x"); + let vendor = i64::from_str_radix(vendor_without_prefix, 16).unwrap() as u16; - if let Some(device) = driver.device { - if device != header.device_id() { continue; } + if vendor != header.vendor_id() { continue; } + + for device in devices { + if *device == header.device_id() { + device_found = true; + break; + } + } + } + if !device_found { continue; } + } else { + if let Some(vendor) = driver.vendor { + if vendor != header.vendor_id() { continue; } + } + + if let Some(device) = driver.device { + if device != header.device_id() { continue; } + } } if let Some(ref device_id_range) = driver.device_id_range { @@ -161,11 +179,28 @@ fn main() { let mut args = env::args().skip(1); if let Some(config_path) = args.next() { - if let Ok(mut config_file) = File::open(&config_path) { - let mut config_data = String::new(); - if let Ok(_) = config_file.read_to_string(&mut config_data) { - config = toml::from_str(&config_data).unwrap_or(Config::default()); + if metadata(&config_path).unwrap().is_file() { + if let Ok(mut config_file) = File::open(&config_path) { + let mut config_data = String::new(); + if let Ok(_) = config_file.read_to_string(&mut config_data) { + config = toml::from_str(&config_data).unwrap_or(Config::default()); + } } + } else { + let paths = read_dir(&config_path).unwrap(); + + let mut config_data = String::new(); + + for path in paths { + if let Ok(mut config_file) = File::open(&path.unwrap().path()) { + let mut tmp = String::new(); + if let Ok(_) = config_file.read_to_string(&mut tmp) { + config_data.push_str(&tmp); + } + } + } + + config = toml::from_str(&config_data).unwrap_or(Config::default()); } } diff --git a/rtl8168d/config.toml b/rtl8168d/config.toml new file mode 100644 index 0000000000..04a3626044 --- /dev/null +++ b/rtl8168d/config.toml @@ -0,0 +1,6 @@ +[[drivers]] +name = "RTL8168 NIC" +class = 2 +ids = { 0x10ec = [0x8168] } +command = ["rtl8168d", "$NAME", "$BAR2", "$IRQ"] + From 55da4bcb84a0a3086d18fb37423bd1ca613323c5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 3 Jul 2019 19:57:32 -0600 Subject: [PATCH 06/23] Add missing import --- pcid/src/config.rs | 1 + 1 file changed, 1 insertion(+) 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)] From e88a65e11bc2e484f83e9fd38b7409bb0c998606 Mon Sep 17 00:00:00 2001 From: Simon Ellmann Date: Fri, 5 Jul 2019 16:03:38 +0200 Subject: [PATCH 07/23] Add ixgbed to Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 143e3a8b44..e64eaaa390 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "bgad", "e1000d", "ihdad", + "ixgbed", "nvmed", "pcid", "ps2d", From 6c993af1a21ccdc771db851738fd5fa988308f30 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Sat, 6 Jul 2019 18:42:51 +0200 Subject: [PATCH 08/23] Update ixgbed --- Cargo.lock | 669 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ixgbed | 2 +- 2 files changed, 670 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index e8f68a1aea..51807078cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,6 +32,20 @@ dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "autocfg" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +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)", +] + [[package]] name = "bgad" version = "0.1.0" @@ -60,11 +74,64 @@ name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +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)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cc" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +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)", +] + +[[package]] +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)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.7.1" +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)", + "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)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.5" +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)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "e1000d" version = "0.1.0" @@ -99,6 +166,45 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hyper" +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.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.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)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-rustls" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "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)", +] + [[package]] name = "idna" version = "0.1.5" @@ -128,6 +234,16 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ixgbed" +version = "1.0.0" +dependencies = [ + "bitflags 1.0.4 (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.54 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -137,11 +253,21 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +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" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.58" @@ -152,6 +278,23 @@ name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lock_api" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +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)", +] + [[package]] name = "log" version = "0.4.6" @@ -165,6 +308,37 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.16" +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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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" version = "0.6.19" @@ -182,6 +356,16 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio-uds" +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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", +] + [[package]] name = "miow" version = "0.2.1" @@ -203,6 +387,28 @@ dependencies = [ "winapi 0.3.7 (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#e28efbd6bbfabe42290e7ef84bca5e4c7f0d4aa2" +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.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.58 (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_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (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" @@ -267,6 +473,14 @@ name = "num-traits" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "num_cpus" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "numtoa" version = "0.1.0" @@ -290,6 +504,46 @@ dependencies = [ "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "owning_ref" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (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)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pbr" +version = "1.0.1" +source = "git+https://github.com/a8m/pb#b9792c9fe37343234316e23c263874cf383b208d" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (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" @@ -371,6 +625,33 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.58 (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_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.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)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -384,6 +665,62 @@ name = "rand_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 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)", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (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)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ransid" version = "0.4.7" @@ -422,6 +759,17 @@ dependencies = [ "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ring" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.37 (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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rtl8168d" version = "0.1.0" @@ -432,6 +780,27 @@ dependencies = [ "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustls" +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)", + "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)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rusttype" version = "0.2.3" @@ -442,6 +811,25 @@ dependencies = [ "stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "safemem" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "sct" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sdl2" version = "0.31.0" @@ -463,6 +851,19 @@ dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.90" @@ -493,6 +894,11 @@ name = "spin" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "stb_truetype" version = "0.2.6" @@ -532,6 +938,161 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio" +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.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.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)", + "tokio-fs 0.1.4 (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)", + "tokio-tcp 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)", + "tokio-threadpool 0.1.9 (git+https://gitlab.redox-os.org/redox-os/tokio)", + "tokio-timer 0.2.8 (git+https://gitlab.redox-os.org/redox-os/tokio)", + "tokio-udp 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)", + "tokio-uds 0.2.4 (git+https://gitlab.redox-os.org/redox-os/tokio)", +] + +[[package]] +name = "tokio-codec" +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.28 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.4" +source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" +dependencies = [ + "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)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.5" +source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" +dependencies = [ + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.4" +source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc111038b9cd4dbd9de7" +dependencies = [ + "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)", +] + +[[package]] +name = "tokio-io" +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.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +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.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)", + "mio 0.6.16 (git+https://gitlab.redox-os.org/redox-os/mio)", + "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)", + "tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)", +] + +[[package]] +name = "tokio-tcp" +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.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)", + "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", +] + +[[package]] +name = "tokio-threadpool" +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.28 (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.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)", +] + +[[package]] +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.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)", +] + +[[package]] +name = "tokio-udp" +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.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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)", + "tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)", +] + +[[package]] +name = "tokio-uds" +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.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.58 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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.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)", +] + [[package]] name = "toml" version = "0.4.10" @@ -540,6 +1101,24 @@ dependencies = [ "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "traitobject" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "typeable" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -561,6 +1140,11 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "untrusted" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "url" version = "1.7.2" @@ -585,6 +1169,11 @@ dependencies = [ "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "vesad" version = "0.1.0" @@ -603,6 +1192,24 @@ dependencies = [ "utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "webpki" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "webpki-roots" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -655,26 +1262,47 @@ dependencies = [ [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.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" +"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 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 bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"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 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.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.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" "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 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 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 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)" = "" @@ -682,8 +1310,13 @@ dependencies = [ "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.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.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0e398a001ca5f52b252d1cf5679d52ddd347d3130ac9ded98549f16537c546" +"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" @@ -691,32 +1324,68 @@ dependencies = [ "checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "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 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_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.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 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_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 scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"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 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 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 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.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" "checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "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)" = "" +"checksum tokio-current-thread 0.1.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-executor 0.1.5 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-fs 0.1.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-io 0.1.10 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-reactor 0.1.7 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-tcp 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-threadpool 0.1.9 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-timer 0.2.8 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-udp 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" +"checksum tokio-uds 0.2.4 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" +"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum vte 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f42f536e22f7fcbb407639765c8fd78707a33109301f834a594758bedd6e8cf" +"checksum webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "17d7967316d8411ca3b01821ee6c332bde138ba4363becdb492f12e514daa17f" +"checksum webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85d1f408918fd590908a70d36b7ac388db2edc221470333e4d6e5b598e44cabf" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/ixgbed b/ixgbed index 26c0142179..96d9becf66 160000 --- a/ixgbed +++ b/ixgbed @@ -1 +1 @@ -Subproject commit 26c0142179a8fbcae22d1d48979681fe029c04e3 +Subproject commit 96d9becf66cda99c03431b6b0763481d2e6d3d77 From 217e51f8307adb03b06a8f06f2540f2a56c6992d Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:04:52 -0600 Subject: [PATCH 09/23] ahcid: Handle EOF --- ahcid/src/main.rs | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/ahcid/src/main.rs b/ahcid/src/main.rs index 370b593723..9522634593 100644 --- a/ahcid/src/main.rs +++ b/ahcid/src/main.rs @@ -5,9 +5,9 @@ extern crate byteorder; use std::{env, usize}; use std::fs::File; -use std::io::{Read, Write}; +use std::io::{ErrorKind, Read, Write}; use std::os::unix::io::{FromRawFd, RawFd}; -use syscall::{EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Event, Packet, SchemeBlockMut}; +use syscall::{ENODEV, EVENT_READ, PHYSMAP_NO_CACHE, PHYSMAP_WRITE, Error, Event, Packet, SchemeBlockMut}; use crate::scheme::DiskScheme; @@ -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); } From 974fe7488fa8750602caa90ca4bb1a2b6ec2a2c6 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:10:02 -0600 Subject: [PATCH 10/23] e1000d: handle EOF --- e1000d/src/main.rs | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/e1000d/src/main.rs b/e1000d/src/main.rs index 755bff8d89..a2e88466e8 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -7,7 +7,7 @@ extern crate syscall; use std::cell::RefCell; use std::env; use std::fs::File; -use std::io::{Read, Write, Result}; +use std::io::{ErrorKind, Read, Write, Result}; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; @@ -17,7 +17,7 @@ use syscall::{Packet, SchemeBlockMut, PHYSMAP_NO_CACHE, PHYSMAP_WRITE}; 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 +33,14 @@ 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 +51,7 @@ fn handle_update(socket: &mut File, device: &mut device::Intel8254x, todo: &mut } } - Ok(()) + Ok(false) } fn main() { @@ -88,7 +94,9 @@ fn main() { 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 { @@ -101,7 +109,9 @@ fn main() { let device_packet = device.clone(); let socket_packet = socket.clone(); event_queue.add(socket_fd as RawFd, move |_event| -> Result> { - handle_update(&mut socket_packet.borrow_mut(), &mut device_packet.borrow_mut(), &mut todo.borrow_mut()); + 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 { @@ -135,6 +145,9 @@ fn main() { loop { let event_count = event_queue.run().expect("e1000d: failed to handle events"); + if event_count == 0 { + break; + } send_events(event_count); } } From dfd21dfd36c509530a5613ae672e1bf4b2b548a9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:13:30 -0600 Subject: [PATCH 11/23] ihdad: Handle EOF --- ihdad/src/main.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ihdad/src/main.rs b/ihdad/src/main.rs index feba8a3680..d1f37307be 100755 --- a/ihdad/src/main.rs +++ b/ihdad/src/main.rs @@ -8,7 +8,7 @@ extern crate event; use std::{env, usize}; use std::fs::File; -use std::io::{Read, Write, Result}; +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; @@ -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, From c259b9d44c535683a01a754b77382b76532815a9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:14:20 -0600 Subject: [PATCH 12/23] Add TODO to eventually handle in-flight syscalls with ENODEV --- e1000d/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/e1000d/src/main.rs b/e1000d/src/main.rs index a2e88466e8..1ca21f1969 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -146,6 +146,7 @@ fn main() { 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); From b77f9f6b2f70170dc35f8d82eaf2292bcbca4042 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:15:24 -0600 Subject: [PATCH 13/23] bgad: handle EOF --- bgad/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgad/src/main.rs b/bgad/src/main.rs index 0c8f2835e5..d2ff217f30 100644 --- a/bgad/src/main.rs +++ b/bgad/src/main.rs @@ -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"); } From 41f689bec36c6fe649320adfd64a585ee7b2dba0 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 18 Jul 2019 21:17:13 -0600 Subject: [PATCH 14/23] vesad: handle EOF --- vesad/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vesad/src/main.rs b/vesad/src/main.rs index b8aaceabb6..9bcb62d251 100644 --- a/vesad/src/main.rs +++ b/vesad/src/main.rs @@ -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() { From 56894fbdc2b6241fce93e324f549f883e36ec9e7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 26 Jul 2019 20:13:37 -0600 Subject: [PATCH 15/23] rtl8168d: handle EOF --- rtl8168d/src/main.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rtl8168d/src/main.rs b/rtl8168d/src/main.rs index b3b0dd7255..19908dba1b 100644 --- a/rtl8168d/src/main.rs +++ b/rtl8168d/src/main.rs @@ -7,7 +7,7 @@ extern crate syscall; use std::cell::RefCell; use std::env; use std::fs::File; -use std::io::{Read, Write, Result}; +use std::io::{self, Read, Write, Result}; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::Arc; @@ -86,8 +86,14 @@ fn main() { 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); } } From 16dfc7785ed24b884c29c419c5edd65600129e61 Mon Sep 17 00:00:00 2001 From: Simon Ellmann Date: Tue, 30 Jul 2019 13:01:54 +0200 Subject: [PATCH 16/23] ixgbed: handle EOF --- ixgbed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ixgbed b/ixgbed index 96d9becf66..4b10450a7a 160000 --- a/ixgbed +++ b/ixgbed @@ -1 +1 @@ -Subproject commit 96d9becf66cda99c03431b6b0763481d2e6d3d77 +Subproject commit 4b10450a7aabcabfda8b6b4367eacdd8f38c13e0 From 5e4b53fe929671fdb9cd4ce43f83bac44e446b5d Mon Sep 17 00:00:00 2001 From: Simon Ellmann Date: Tue, 30 Jul 2019 13:20:30 +0200 Subject: [PATCH 17/23] Speed up e1000 driver --- e1000d/src/device.rs | 214 +++++++++++++++++++++++++------------------ e1000d/src/main.rs | 149 +++++++++++++++++++----------- 2 files changed, 218 insertions(+), 145 deletions(-) diff --git a/e1000d/src/device.rs b/e1000d/src/device.rs index 72e066b063..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; @@ -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 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 1ca21f1969..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::{ErrorKind, Read, Write, Result}; +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}; - 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() { @@ -36,10 +39,12 @@ fn handle_update(socket: &mut File, device: &mut device::Intel8254x, todo: &mut match socket.read(&mut packet) { Ok(0) => return Ok(true), Ok(_) => (), - Err(err) => if err.kind() == ErrorKind::WouldBlock { - break; - } else { - return Err(err); + Err(err) => { + if err.kind() == ErrorKind::WouldBlock { + break; + } else { + return Err(err); + } } } @@ -66,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 as RawFd) })); + 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"); @@ -88,58 +109,76 @@ 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)?; - if handle_update(&mut socket_irq.borrow_mut(), &mut device_irq.borrow_mut(), &mut todo_irq.borrow_mut())? { - return Ok(Some(0)) - } + 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 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)); - } + 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); } @@ -152,6 +191,8 @@ fn main() { send_events(event_count); } } - unsafe { let _ = syscall::physunmap(address); } + unsafe { + let _ = syscall::physunmap(address); + } } } From 89d8a8a6f6cfe9d369c34d45a7e241b10887ba12 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 12 Aug 2019 13:37:03 -0600 Subject: [PATCH 18/23] Support MouseRelativeEvent --- Cargo.lock | 390 ++++++++++++++++++++++------------------------ bgad/Cargo.toml | 2 +- ps2d/Cargo.toml | 2 +- ps2d/src/main.rs | 1 - ps2d/src/state.rs | 61 ++++---- vboxd/Cargo.toml | 2 +- vesad/Cargo.toml | 2 +- 7 files changed, 220 insertions(+), 240 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 51807078cb..6503d68d9d 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]] @@ -16,17 +16,17 @@ 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?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.4" +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.22 (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.37" +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)", ] @@ -139,7 +139,7 @@ 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?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)", ] @@ -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,7 +230,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.58 (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)", ] @@ -238,10 +238,10 @@ dependencies = [ name = "ixgbed" version = "1.0.0" 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)", "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.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]] @@ -258,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" @@ -270,7 +265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.58" +version = "0.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -292,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]] @@ -310,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" @@ -330,11 +328,11 @@ dependencies = [ "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.58 (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.54 (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)", ] @@ -348,8 +346,8 @@ dependencies = [ "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.58 (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)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -362,7 +360,7 @@ 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.58 (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)", ] @@ -382,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.58 (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)", ] @@ -396,14 +394,14 @@ dependencies = [ "extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)", "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.58 (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.2 (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)", @@ -412,18 +410,18 @@ dependencies = [ [[package]] name = "netutils" version = "0.1.0" -source = "git+https://gitlab.redox-os.org/redox-os/netutils.git?branch=redox-unix#482c8285faa70c592d235336faaf7223f195b5d7" +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.58 (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.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.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.2 (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)", ] @@ -446,39 +444,44 @@ 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.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -491,17 +494,17 @@ 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.22" +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]] @@ -526,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.58 (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)", ] @@ -538,8 +541,8 @@ name = "pbr" version = "1.0.1" source = "git+https://github.com/a8m/pb#b9792c9fe37343234316e23c263874cf383b208d" dependencies = [ - "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.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.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -550,8 +553,8 @@ 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.58 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.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)", ] @@ -560,11 +563,11 @@ dependencies = [ 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)", ] @@ -580,7 +583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.28" +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)", @@ -591,38 +594,17 @@ name = "ps2d" version = "0.1.0" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.22 (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.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.28 (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.58 (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.58 (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]] @@ -630,10 +612,10 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.58 (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.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -648,7 +630,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.4 (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)", ] @@ -657,12 +639,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]] @@ -686,8 +668,8 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.58 (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)", ] @@ -698,8 +680,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.58 (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)", ] @@ -709,8 +691,8 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.4 (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]] @@ -723,10 +705,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)", ] @@ -743,12 +725,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]] @@ -756,7 +738,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]] @@ -764,9 +746,9 @@ name = "ring" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.37 (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.58 (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)", ] @@ -777,7 +759,7 @@ 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?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]] @@ -794,7 +776,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)", @@ -806,14 +788,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]] @@ -821,6 +803,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" @@ -832,23 +819,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.58 (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]] @@ -866,17 +854,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.28 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (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]] @@ -886,7 +874,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]] @@ -904,27 +892,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.32" +version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (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.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.58 (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.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)", ] @@ -933,8 +921,8 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.58 (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)", ] @@ -1004,7 +992,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc1 dependencies = [ "bytes 0.4.12 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1012,10 +1000,10 @@ 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)", + "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.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1043,9 +1031,9 @@ 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)", + "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.6 (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)", @@ -1056,7 +1044,7 @@ 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)", + "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)", @@ -1069,7 +1057,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/tokio#6c1f7a23c50f8deccce3cc1 dependencies = [ "bytes 0.4.12 (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.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)", "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)", @@ -1084,8 +1072,8 @@ dependencies = [ "bytes 0.4.12 (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.58 (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.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)", @@ -1098,7 +1086,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]] @@ -1132,7 +1120,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]] @@ -1164,9 +1152,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "vboxd" version = "0.1.0" dependencies = [ - "orbclient 0.3.22 (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]] @@ -1178,9 +1166,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "vesad" version = "0.1.0" dependencies = [ - "orbclient 0.3.22 (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)", ] @@ -1255,26 +1243,26 @@ 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.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" +"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.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" -"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" @@ -1287,15 +1275,14 @@ dependencies = [ "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.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" +"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 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" @@ -1307,12 +1294,12 @@ dependencies = [ "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-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.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0e398a001ca5f52b252d1cf5679d52ddd347d3130ac9ded98549f16537c546" +"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" @@ -1320,45 +1307,44 @@ dependencies = [ "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.28 (registry+https://github.com/rust-lang/crates.io-index)" = "ba92c84f814b3f9a44c5cfca7d2ad77fa10710867d2bbb1b3d175ab5f47daa12" -"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" -"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.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.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" -"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"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/bgad/Cargo.toml b/bgad/Cargo.toml index f240b720fc..d7611f9d8a 100644 --- a/bgad/Cargo.toml +++ b/bgad/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2018" [dependencies] -orbclient = "0.3" +orbclient = "0.3.27" redox_syscall = "0.1" diff --git a/ps2d/Cargo.toml b/ps2d/Cargo.toml index f8ac54ebb9..34ef208a98 100644 --- a/ps2d/Cargo.toml +++ b/ps2d/Cargo.toml @@ -5,6 +5,6 @@ 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 9fd7922d62..38c8a3c5ff 100644 --- a/ps2d/src/main.rs +++ b/ps2d/src/main.rs @@ -1,4 +1,3 @@ -#![deny(warnings)] #![feature(asm)] #[macro_use] diff --git a/ps2d/src/state.rs b/ps2d/src/state.rs index eb428dc309..13c71c0876 100644 --- a/ps2d/src/state.rs +++ b/ps2d/src/state.rs @@ -1,8 +1,8 @@ -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 crate::controller::Ps2; @@ -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/vboxd/Cargo.toml b/vboxd/Cargo.toml index dfb5bbe505..bab0ee130a 100644 --- a/vboxd/Cargo.toml +++ b/vboxd/Cargo.toml @@ -4,6 +4,6 @@ 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/vesad/Cargo.toml b/vesad/Cargo.toml index 4e12f77657..6223c0672e 100644 --- a/vesad/Cargo.toml +++ b/vesad/Cargo.toml @@ -4,7 +4,7 @@ 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" From 37e92ac8e53f2702b01f4f37f4090905548d559c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 23 Aug 2019 20:29:19 -0600 Subject: [PATCH 19/23] nvmed: Implement admin queue --- initfs.toml | 7 -- nvmed/config.toml | 5 ++ nvmed/src/main.rs | 7 +- nvmed/src/nvme.rs | 202 +++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 198 insertions(+), 23 deletions(-) create mode 100644 nvmed/config.toml diff --git a/initfs.toml b/initfs.toml index 4e68571eaa..14dbfc3a3d 100644 --- a/initfs.toml +++ b/initfs.toml @@ -22,13 +22,6 @@ vendor = 33006 device = 48879 command = ["bgad", "$NAME", "$BAR0"] -# nvmed -[[drivers]] -name = "NVME storage" -class = 1 -subclass = 8 -command = ["nvmed", "$NAME", "$BAR0", "$IRQ"] - # vboxd [[drivers]] name = "VirtualBox Guest Device" diff --git a/nvmed/config.toml b/nvmed/config.toml new file mode 100644 index 0000000000..9b83c8802f --- /dev/null +++ b/nvmed/config.toml @@ -0,0 +1,5 @@ +[[drivers]] +name = "NVME storage" +class = 1 +subclass = 8 +command = ["nvmed", "$NAME", "$BAR0", "$IRQ"] diff --git a/nvmed/src/main.rs b/nvmed/src/main.rs index bacc3878e6..d8c911aad5 100644 --- a/nvmed/src/main.rs +++ b/nvmed/src/main.rs @@ -42,10 +42,11 @@ 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 mut nvme = Nvme::new(address).expect("nvmed: failed to allocate queues"); + unsafe { 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) }; diff --git a/nvmed/src/nvme.rs b/nvmed/src/nvme.rs index 63c6d78ec7..793c32a2da 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -1,4 +1,6 @@ -use syscall::io::{Io, Mmio}; +use std::thread; +use syscall::io::{Dma, Io, Mmio}; +use syscall::error::Result; #[repr(packed)] pub struct NvmeCmd { @@ -31,15 +33,87 @@ pub struct NvmeCmd { } impl NvmeCmd { - pub fn read(cid: u16, lba: u64, count: u16, dst: u64) -> Self { - NvmeCmd { + pub fn create_io_completion_queue(cid: u16, qid: u16, ptr: usize, size: u16) -> Self { + Self { + opcode: 5, + flags: 0, + cid: cid, + nsid: 0xFFFFFFFF, + _rsvd: 0, + mptr: 0, + 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 create_io_submission_queue(cid: u16, qid: u16, ptr: usize, size: u16, cqid: u16) -> Self { + Self { + opcode: 1, + flags: 0, + cid: cid, + nsid: 0xFFFFFFFF, + _rsvd: 0, + mptr: 0, + 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_controller(cid: u16, ptr: usize) -> Self { + Self { + opcode: 6, + flags: 0, + cid: cid, + nsid: 0xFFFFFFFF, + _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, lba: u64, count: u16, ptr: usize) -> Self { + Self { opcode: 2, flags: 1 << 6, cid: cid, nsid: 0xFFFFFFFF, _rsvd: 0, mptr: 0, - dptr: [dst, (count as u64) << 9], + dptr: [ptr as u64, (count as u64) << 9], cdw10: lba as u32, cdw11: (lba >> 32) as u32, cdw12: count as u32, @@ -49,15 +123,15 @@ impl NvmeCmd { } } - pub fn write(cid: u16, lba: u64, count: u16, src: u64) -> Self { - NvmeCmd { + pub fn io_write(cid: u16, lba: u64, count: u16, ptr: usize) -> Self { + Self { opcode: 1, flags: 1 << 6, cid: cid, nsid: 0xFFFFFFFF, _rsvd: 0, mptr: 0, - dptr: [src, (count as u64) << 9], + dptr: [ptr as u64, (count as u64) << 9], cdw10: lba as u32, cdw11: (lba >> 32) as u32, cdw12: count as u32, @@ -68,6 +142,16 @@ impl NvmeCmd { } } +#[repr(packed)] +pub struct NvmeComp { + command_specific: u32, + _rsvd: u32, + sq_head: u16, + sq_id: u16, + cid: u16, + status: u16, +} + #[repr(packed)] pub struct NvmeRegs { /// Controller Capabilities @@ -99,18 +183,110 @@ pub struct NvmeRegs { } pub struct Nvme { - regs: &'static mut NvmeRegs + regs: &'static mut NvmeRegs, + submission_queues: [Dma<[NvmeCmd; 64]>; 2], + completion_queues: [Dma<[NvmeComp; 256]>; 2], + } impl Nvme { - pub fn new(address: usize) -> Self { - Nvme { - regs: unsafe { &mut *(address as *mut NvmeRegs) } - } + pub fn new(address: usize) -> Result { + Ok(Nvme { + regs: unsafe { &mut *(address as *mut NvmeRegs) }, + submission_queues: [Dma::zeroed()?, Dma::zeroed()?], + completion_queues: [Dma::zeroed()?, Dma::zeroed()?], + }) } - pub fn init(&mut self) { + 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); + println!("doorbell {:X}", addr); + &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) { 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); + + for (qid, queue) in self.completion_queues.iter().enumerate() { + println!(" - completion queue {}: {:X}, {}", qid, queue.physical(), queue.len()); + } + + for (qid, queue) in self.submission_queues.iter().enumerate() { + println!(" - submission queue {}: {:X}, {}", qid, queue.physical(), queue.len()); + } + + { + let asq = &self.submission_queues[0]; + let acq = &self.completion_queues[0]; + self.regs.aqa.write(((acq.len() as u32) << 16) | (asq.len() as u32)); + self.regs.asq.write(asq.physical() as u64); + self.regs.acq.write(acq.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(); + } + + let nsids: Dma<[u16; 2048]> = Dma::zeroed().unwrap(); + + println!(" - Attempting to retrieve namespace ID list"); + { + let qid = 0; + let queue = &mut self.submission_queues[qid]; + let cid = 0; + let cmd = &mut queue[cid]; + + *cmd = NvmeCmd::identify_namespace_list(cid as u16, nsids.physical(), 0); + + self.submission_queue_tail(qid as u16, (cid as u16) + 1); + } + + println!(" - Waiting to retrieve namespace ID list"); + { + let qid = 0; + let queue = &self.completion_queues[qid]; + let cid = 0; + let comp = &queue[cid]; + + while comp.status & 1 == 0 { + thread::yield_now(); + } + + self.completion_queue_head(qid as u16, (cid as u16) + 1); + } + + println!(" - Dumping namespace ID list"); + for &nsid in nsids.iter() { + if nsid != 0 { + println!("{:X}", nsid); + } + } } } From df4a7b054b1e1b387aaaf1218ce279acfe44aa34 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 24 Aug 2019 08:37:38 -0600 Subject: [PATCH 20/23] nvmed: Identify controller and namespaces --- nvmed/src/nvme.rs | 246 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 202 insertions(+), 44 deletions(-) diff --git a/nvmed/src/nvme.rs b/nvmed/src/nvme.rs index 793c32a2da..0dcf29cd82 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -1,7 +1,8 @@ -use std::thread; +use std::{mem, thread}; use syscall::io::{Dma, Io, Mmio}; use syscall::error::Result; +#[derive(Clone, Copy)] #[repr(packed)] pub struct NvmeCmd { /// Opcode @@ -38,7 +39,7 @@ impl NvmeCmd { opcode: 5, flags: 0, cid: cid, - nsid: 0xFFFFFFFF, + nsid: 0, _rsvd: 0, mptr: 0, dptr: [ptr as u64, 0], @@ -56,7 +57,7 @@ impl NvmeCmd { opcode: 1, flags: 0, cid: cid, - nsid: 0xFFFFFFFF, + nsid: 0, _rsvd: 0, mptr: 0, dptr: [ptr as u64, 0], @@ -69,12 +70,30 @@ impl NvmeCmd { } } + 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: 0xFFFFFFFF, + nsid: 0, _rsvd: 0, mptr: 0, dptr: [ptr as u64, 0], @@ -105,12 +124,12 @@ impl NvmeCmd { } } - pub fn io_read(cid: u16, lba: u64, count: u16, ptr: usize) -> Self { + pub fn io_read(cid: u16, nsid: u32, lba: u64, count: u16, ptr: usize) -> Self { Self { opcode: 2, flags: 1 << 6, cid: cid, - nsid: 0xFFFFFFFF, + nsid: nsid, _rsvd: 0, mptr: 0, dptr: [ptr as u64, (count as u64) << 9], @@ -123,12 +142,12 @@ impl NvmeCmd { } } - pub fn io_write(cid: u16, lba: u64, count: u16, ptr: usize) -> Self { + pub fn io_write(cid: u16, nsid: u32, lba: u64, count: u16, ptr: usize) -> Self { Self { opcode: 1, flags: 1 << 6, cid: cid, - nsid: 0xFFFFFFFF, + nsid: nsid, _rsvd: 0, mptr: 0, dptr: [ptr as u64, (count as u64) << 9], @@ -142,6 +161,7 @@ impl NvmeCmd { } } +#[derive(Clone, Copy, Debug)] #[repr(packed)] pub struct NvmeComp { command_specific: u32, @@ -182,19 +202,77 @@ pub struct NvmeRegs { cmbsz: Mmio, } +pub struct NvmeCmdQueue { + data: Dma<[NvmeCmd; 64]>, + i: usize, +} + +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 + } + } + + fn complete_spin(&mut self) -> (usize, NvmeComp) { + loop { + if let Some(some) = self.complete() { + return some; + } else { + thread::yield_now(); + } + } + } +} + pub struct Nvme { regs: &'static mut NvmeRegs, - submission_queues: [Dma<[NvmeCmd; 64]>; 2], - completion_queues: [Dma<[NvmeComp; 256]>; 2], - + submission_queues: [NvmeCmdQueue; 2], + completion_queues: [NvmeCompQueue; 2], } impl Nvme { pub fn new(address: usize) -> Result { Ok(Nvme { regs: unsafe { &mut *(address as *mut NvmeRegs) }, - submission_queues: [Dma::zeroed()?, Dma::zeroed()?], - completion_queues: [Dma::zeroed()?, Dma::zeroed()?], + submission_queues: [NvmeCmdQueue::new()?, NvmeCmdQueue::new()?], + completion_queues: [NvmeCompQueue::new()?, NvmeCompQueue::new()?], }) } @@ -203,7 +281,6 @@ impl Nvme { let addr = (self.regs as *mut _ as usize) + 0x1000 + index * (4 << dstrd); - println!("doorbell {:X}", addr); &mut *(addr as *mut Mmio) } @@ -225,19 +302,21 @@ impl Nvme { self.regs.cc.writef(1, false); for (qid, queue) in self.completion_queues.iter().enumerate() { - println!(" - completion queue {}: {:X}, {}", qid, queue.physical(), queue.len()); + let data = &queue.data; + println!(" - completion queue {}: {:X}, {}", qid, data.physical(), data.len()); } for (qid, queue) in self.submission_queues.iter().enumerate() { - println!(" - submission queue {}: {:X}, {}", qid, queue.physical(), queue.len()); + 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.len() as u32) << 16) | (asq.len() as u32)); - self.regs.asq.write(asq.physical() as u64); - self.regs.acq.write(acq.physical() as u64); + self.regs.aqa.write(((acq.data.len() as u32) << 16) | (asq.data.len() as u32)); + 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(); @@ -254,39 +333,118 @@ impl Nvme { thread::yield_now(); } - let nsids: Dma<[u16; 2048]> = Dma::zeroed().unwrap(); - - println!(" - Attempting to retrieve namespace ID list"); { - let qid = 0; - let queue = &mut self.submission_queues[qid]; - let cid = 0; - let cmd = &mut queue[cid]; + let data: Dma<[u8; 4096]> = Dma::zeroed().unwrap(); - *cmd = NvmeCmd::identify_namespace_list(cid as u16, nsids.physical(), 0); - - self.submission_queue_tail(qid as u16, (cid as u16) + 1); - } - - println!(" - Waiting to retrieve namespace ID list"); - { - let qid = 0; - let queue = &self.completion_queues[qid]; - let cid = 0; - let comp = &queue[cid]; - - while comp.status & 1 == 0 { - thread::yield_now(); + 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); } - self.completion_queue_head(qid as u16, (cid as u16) + 1); + 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(); + { + 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); + } + } } - println!(" - Dumping namespace ID list"); for &nsid in nsids.iter() { - if nsid != 0 { - println!("{:X}", nsid); + 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 } } } From 9c277981be6532b4d0a548a07019f7989cc883a5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 24 Aug 2019 09:26:13 -0600 Subject: [PATCH 21/23] nvmed: Set up I/O queues --- nvmed/src/nvme.rs | 74 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/nvmed/src/nvme.rs b/nvmed/src/nvme.rs index 0dcf29cd82..46a32cdda7 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -135,7 +135,7 @@ impl NvmeCmd { dptr: [ptr as u64, (count as u64) << 9], cdw10: lba as u32, cdw11: (lba >> 32) as u32, - cdw12: count as u32, + cdw12: count.saturating_sub(1) as u32, //TODO: Prevent count of 0 cdw13: 0, cdw14: 0, cdw15: 0, @@ -153,7 +153,7 @@ impl NvmeCmd { dptr: [ptr as u64, (count as u64) << 9], cdw10: lba as u32, cdw11: (lba >> 32) as u32, - cdw12: count as u32, + cdw12: count.saturating_sub(1) as u32, //TODO: Prevent count of 0 cdw13: 0, cdw14: 0, cdw15: 0, @@ -301,6 +301,9 @@ impl Nvme { 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()); @@ -341,7 +344,9 @@ impl Nvme { 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 entry = NvmeCmd::identify_controller( + cid, data.physical() + ); let tail = queue.submit(entry); self.submission_queue_tail(qid as u16, tail as u16); } @@ -393,7 +398,9 @@ impl Nvme { 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 entry = NvmeCmd::identify_namespace_list( + cid, data.physical(), 0 + ); let tail = queue.submit(entry); self.submission_queue_tail(qid as u16, tail as u16); } @@ -423,7 +430,9 @@ impl Nvme { 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 entry = NvmeCmd::identify_namespace( + cid, data.physical(), nsid + ); let tail = queue.submit(entry); self.submission_queue_tail(qid as u16, tail as u16); } @@ -446,5 +455,60 @@ impl Nvme { //TODO: Read block size } + + 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 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 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); + } + } } } From b2c76034b76a2dbc400e4d6fa3dfb653d049e67b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 24 Aug 2019 20:24:01 -0600 Subject: [PATCH 22/23] nvmed: add scheme with read/write implemented using polling --- nvmed/src/main.rs | 117 ++++++++++++++--------- nvmed/src/nvme.rs | 157 ++++++++++++++++++++++++++++--- nvmed/src/scheme.rs | 221 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 438 insertions(+), 57 deletions(-) create mode 100644 nvmed/src/scheme.rs diff --git a/nvmed/src/main.rs b/nvmed/src/main.rs index d8c911aad5..daaa633fe7 100644 --- a/nvmed/src/main.rs +++ b/nvmed/src/main.rs @@ -1,4 +1,3 @@ -//#![deny(warnings)] #![feature(asm)] extern crate bitflags; @@ -6,25 +5,17 @@ extern crate spin; extern crate syscall; use std::{env, usize}; +use std::fs::File; +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, Scheme}; +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); @@ -45,48 +36,84 @@ fn main() { //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).expect("nvmed: failed to allocate queues"); - unsafe { 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 46a32cdda7..8bce947fce 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -1,6 +1,7 @@ -use std::{mem, thread}; +use std::thread; +use std::collections::BTreeMap; use syscall::io::{Dma, Io, Mmio}; -use syscall::error::Result; +use syscall::error::{Error, Result, EINVAL}; #[derive(Clone, Copy)] #[repr(packed)] @@ -124,7 +125,7 @@ impl NvmeCmd { } } - pub fn io_read(cid: u16, nsid: u32, lba: u64, count: u16, ptr: usize) -> Self { + pub fn io_read(cid: u16, nsid: u32, lba: u64, blocks_1: u16, ptr0: u64, ptr1: u64) -> Self { Self { opcode: 2, flags: 1 << 6, @@ -132,17 +133,17 @@ impl NvmeCmd { nsid: nsid, _rsvd: 0, mptr: 0, - dptr: [ptr as u64, (count as u64) << 9], + dptr: [ptr0, ptr1], cdw10: lba as u32, cdw11: (lba >> 32) as u32, - cdw12: count.saturating_sub(1) as u32, //TODO: Prevent count of 0 + cdw12: blocks_1 as u32, cdw13: 0, cdw14: 0, cdw15: 0, } } - pub fn io_write(cid: u16, nsid: u32, lba: u64, count: u16, ptr: usize) -> Self { + pub fn io_write(cid: u16, nsid: u32, lba: u64, blocks_1: u16, ptr0: u64, ptr1: u64) -> Self { Self { opcode: 1, flags: 1 << 6, @@ -150,10 +151,10 @@ impl NvmeCmd { nsid: nsid, _rsvd: 0, mptr: 0, - dptr: [ptr as u64, (count as u64) << 9], + dptr: [ptr0, ptr1], cdw10: lba as u32, cdw11: (lba >> 32) as u32, - cdw12: count.saturating_sub(1) as u32, //TODO: Prevent count of 0 + cdw12: blocks_1 as u32, cdw13: 0, cdw14: 0, cdw15: 0, @@ -261,10 +262,18 @@ impl NvmeCompQueue { } } +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 { @@ -273,6 +282,8 @@ impl 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()?, }) } @@ -292,7 +303,11 @@ impl Nvme { self.doorbell(2 * (qid as usize) + 1).write(head as u32) } - pub unsafe fn init(&mut self) { + 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()); @@ -317,7 +332,7 @@ impl Nvme { { let asq = &self.submission_queues[0]; let acq = &self.completion_queues[0]; - self.regs.aqa.write(((acq.data.len() as u32) << 16) | (asq.data.len() as u32)); + 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); @@ -337,6 +352,7 @@ impl Nvme { } { + //TODO: Use buffer let data: Dma<[u8; 4096]> = Dma::zeroed().unwrap(); println!(" - Attempting to identify controller"); @@ -391,6 +407,7 @@ impl Nvme { let mut nsids = Vec::new(); { + //TODO: Use buffer let data: Dma<[u32; 1024]> = Dma::zeroed().unwrap(); println!(" - Attempting to retrieve namespace ID list"); @@ -422,7 +439,9 @@ impl Nvme { } } + 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); @@ -454,6 +473,12 @@ impl Nvme { 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() { @@ -468,7 +493,7 @@ impl Nvme { 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 as u16 + 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); @@ -496,7 +521,7 @@ impl Nvme { 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 as u16, io_qid as u16 + 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); @@ -510,5 +535,113 @@ impl Nvme { 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<()> { + let (ptr0, ptr1) = if blocks_1 == 0 { + (self.buffer_prp[0], 0) + } else if blocks_1 == 1 { + (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; + //TODO: Get completion queue ID through smarter mechanism + 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, lba: u64, buf: &mut [u8]) -> Result> { + //TODO: Use interrupts + + //TODO: Get real block size + let block_size = 512; + + //TODO: Support this + if buf.len() % block_size != 0 { + return Err(Error::new(EINVAL)); + } + + //TODO: Support this + if buf.len() > self.buffer.len() { + return Err(Error::new(EINVAL)); + } + + let blocks = buf.len() / block_size; + + if blocks == 0 { + return Ok(Some(0)); + } + + //TODO: Support this + if blocks > 0x1_0000 { + return Err(Error::new(EINVAL)); + } + + self.namespace_rw(nsid, lba, (blocks - 1) as u16, false)?; + + buf.copy_from_slice(&self.buffer[..buf.len()]); + + Ok(Some(buf.len())) + } + + pub unsafe fn namespace_write(&mut self, nsid: u32, lba: u64, buf: &[u8]) -> Result> { + //TODO: Use interrupts + + //TODO: Get real block size + let block_size = 512; + + //TODO: Support this + if buf.len() % block_size != 0 { + return Err(Error::new(EINVAL)); + } + + //TODO: Support this + if buf.len() > self.buffer.len() { + return Err(Error::new(EINVAL)); + } + + let blocks = buf.len() / block_size; + + if blocks == 0 { + return Ok(Some(0)); + } + + //TODO: Support this + if blocks > 0x1_0000 { + return Err(Error::new(EINVAL)); + } + + self.buffer[..buf.len()].copy_from_slice(buf); + + self.namespace_rw(nsid, lba, (blocks - 1) as u16, true)?; + + 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))) + } +} From 13dd6ae28f21caee72c2602a7675b9ab012f42dc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 24 Aug 2019 20:45:48 -0600 Subject: [PATCH 23/23] nvmed: add to initfs and fix reading larger block sizes --- initfs.toml | 7 ++++ nvmed/config.toml | 5 --- nvmed/src/nvme.rs | 81 ++++++++++++++++++----------------------------- 3 files changed, 37 insertions(+), 56 deletions(-) delete mode 100644 nvmed/config.toml diff --git a/initfs.toml b/initfs.toml index 14dbfc3a3d..15b49d522f 100644 --- a/initfs.toml +++ b/initfs.toml @@ -22,6 +22,13 @@ vendor = 33006 device = 48879 command = ["bgad", "$NAME", "$BAR0"] +#nvmed +[[drivers]] +name = "NVME storage" +class = 1 +subclass = 8 +command = ["nvmed", "$NAME", "$BAR0", "$IRQ"] + # vboxd [[drivers]] name = "VirtualBox Guest Device" diff --git a/nvmed/config.toml b/nvmed/config.toml deleted file mode 100644 index 9b83c8802f..0000000000 --- a/nvmed/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -[[drivers]] -name = "NVME storage" -class = 1 -subclass = 8 -command = ["nvmed", "$NAME", "$BAR0", "$IRQ"] diff --git a/nvmed/src/nvme.rs b/nvmed/src/nvme.rs index 8bce947fce..66590b3488 100644 --- a/nvmed/src/nvme.rs +++ b/nvmed/src/nvme.rs @@ -540,9 +540,13 @@ impl Nvme { } unsafe fn namespace_rw(&mut self, nsid: u32, lba: u64, blocks_1: u16, write: bool) -> Result<()> { - let (ptr0, ptr1) = if blocks_1 == 0 { + //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 blocks_1 == 1 { + } else if bytes <= 8192 { (self.buffer_prp[0], self.buffer_prp[1]) } else { (self.buffer_prp[0], (self.buffer_prp.physical() + 8) as u64) @@ -552,7 +556,6 @@ impl Nvme { let qid = 1; let queue = &mut self.submission_queues[qid]; let cid = queue.i as u16; - //TODO: Get completion queue ID through smarter mechanism let entry = if write { NvmeCmd::io_write( cid, nsid, lba, blocks_1, ptr0, ptr1 @@ -577,71 +580,47 @@ impl Nvme { Ok(()) } - pub unsafe fn namespace_read(&mut self, nsid: u32, lba: u64, buf: &mut [u8]) -> Result> { + 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; - //TODO: Support this - if buf.len() % block_size != 0 { - return Err(Error::new(EINVAL)); + 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; } - //TODO: Support this - if buf.len() > self.buffer.len() { - return Err(Error::new(EINVAL)); - } - - let blocks = buf.len() / block_size; - - if blocks == 0 { - return Ok(Some(0)); - } - - //TODO: Support this - if blocks > 0x1_0000 { - return Err(Error::new(EINVAL)); - } - - self.namespace_rw(nsid, lba, (blocks - 1) as u16, false)?; - - buf.copy_from_slice(&self.buffer[..buf.len()]); - Ok(Some(buf.len())) } - pub unsafe fn namespace_write(&mut self, nsid: u32, lba: u64, buf: &[u8]) -> Result> { + 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; - //TODO: Support this - if buf.len() % block_size != 0 { - return Err(Error::new(EINVAL)); + 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; } - //TODO: Support this - if buf.len() > self.buffer.len() { - return Err(Error::new(EINVAL)); - } - - let blocks = buf.len() / block_size; - - if blocks == 0 { - return Ok(Some(0)); - } - - //TODO: Support this - if blocks > 0x1_0000 { - return Err(Error::new(EINVAL)); - } - - self.buffer[..buf.len()].copy_from_slice(buf); - - self.namespace_rw(nsid, lba, (blocks - 1) as u16, true)?; - Ok(Some(buf.len())) } }