File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ libusb = ["dep:rusb"]
17
17
[dependencies ]
18
18
bytes = " 1.4.0"
19
19
crc = " 3.0.1"
20
- fastrand = " 1.9.0 "
21
- num_enum = " 0.5.9 "
20
+ fastrand = " 2 "
21
+ num_enum = " 0.7 "
22
22
thiserror = " 1.0.38"
23
23
rusb = { version = " 0.9.1" , optional = true }
24
24
25
25
[dev-dependencies ]
26
26
anyhow = " 1.0.69"
27
- bmap-parser = " 0.1 .0"
27
+ bmap-parser = " 0.2 .0"
28
28
clap = { version = " 4.2" , features = [" derive" ] }
29
29
clap-num = " 1.0"
30
30
flate2 = " 1.0.25"
31
- nbd = " 0.2. 3"
31
+ nbd = " 0.3"
32
32
rockfile = { path = " ../rockfile" , version = " 0.1.1" }
33
33
rusb = " 0.9.1"
34
34
Original file line number Diff line number Diff line change @@ -187,15 +187,19 @@ fn run_nbd(transport: Transport) -> Result<()> {
187
187
188
188
let io = transport. into_io ( ) ?;
189
189
190
- let export = nbd:: Export {
191
- size : io. size ( ) ,
192
- readonly : false ,
193
- ..Default :: default ( )
194
- } ;
195
-
196
190
println ! ( "Connection!" ) ;
197
191
198
- nbd:: server:: handshake ( & mut stream, & export) ?;
192
+ nbd:: server:: handshake ( & mut stream, |_s| {
193
+ Ok ( nbd:: Export {
194
+ size : io. size ( ) ,
195
+ readonly : false ,
196
+ resizeable : false ,
197
+ rotational : false ,
198
+ send_trim : false ,
199
+ send_flush : true ,
200
+ data : ( ) ,
201
+ } )
202
+ } ) ?;
199
203
println ! ( "Shook hands!" ) ;
200
204
nbd:: server:: transmission ( & mut stream, io) ?;
201
205
println ! ( "nbd client disconnected" ) ;
You can’t perform that action at this time.
0 commit comments