File tree 2 files changed +22
-3
lines changed
2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ rust-embed = { version = "6.4.2", features = [
31
31
" debug-embed" ,
32
32
" compression" , # must clean build after updating binaries
33
33
] }
34
- proc-mounts = " 0.3"
35
34
36
35
[target .'cfg(any(target_os = "android", target_os = "linux"))' .dependencies ]
37
36
sys-mount = { git = " https://github.com/tiann/sys-mount" }
38
37
# some android specific dependencies which compiles under unix are also listed here for convenience of coding
39
38
android-properties = { version = " 0.2.2" , features = [" bionic-deprecated" ] }
40
39
procfs = " 0.15"
40
+ proc-mounts = " 0.3"
41
41
42
42
[target .'cfg(target_os = "android")' .dependencies ]
43
43
android_logger = " 0.13"
Original file line number Diff line number Diff line change 1
- use anyhow:: Result ;
1
+ use anyhow:: { Ok , Result } ;
2
2
3
3
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
4
- use anyhow:: { Context , Ok } ;
4
+ use anyhow:: Context ;
5
5
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
6
6
use retry:: delay:: NoDelay ;
7
7
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
@@ -260,9 +260,11 @@ impl StockOverlay {
260
260
#[ derive( Debug ) ]
261
261
pub struct StockMount {
262
262
mnt : String ,
263
+ #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
263
264
mountlist : proc_mounts:: MountList ,
264
265
}
265
266
267
+ #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
266
268
impl StockMount {
267
269
pub fn new ( mnt : & str ) -> Result < Self > {
268
270
let mountlist = proc_mounts:: MountList :: new ( ) ?;
@@ -322,3 +324,20 @@ impl StockMount {
322
324
Ok ( ( ) )
323
325
}
324
326
}
327
+
328
+ #[ cfg( not( any( target_os = "linux" , target_os = "android" ) ) ) ]
329
+ impl StockMount {
330
+ pub fn new ( mnt : & str ) -> Result < Self > {
331
+ Ok ( Self {
332
+ mnt : mnt. to_string ( ) ,
333
+ } )
334
+ }
335
+
336
+ pub fn umount ( & self ) -> Result < ( ) > {
337
+ unimplemented ! ( )
338
+ }
339
+
340
+ pub fn remount ( & self ) -> Result < ( ) > {
341
+ unimplemented ! ( )
342
+ }
343
+ }
You can’t perform that action at this time.
0 commit comments