File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
crates/composefs-setup-root/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11use std:: {
22 ffi:: OsString ,
3+ fmt:: Debug ,
34 io:: ErrorKind ,
45 os:: fd:: { AsFd , OwnedFd } ,
56 path:: { Path , PathBuf } ,
@@ -91,13 +92,16 @@ struct Args {
9192}
9293
9394// Helpers
94- fn open_dir ( dirfd : impl AsFd , name : impl AsRef < Path > ) -> rustix:: io:: Result < OwnedFd > {
95+ fn open_dir ( dirfd : impl AsFd , name : impl AsRef < Path > + Debug ) -> rustix:: io:: Result < OwnedFd > {
9596 openat (
9697 dirfd,
9798 name. as_ref ( ) ,
9899 OFlags :: PATH | OFlags :: DIRECTORY | OFlags :: CLOEXEC ,
99100 Mode :: empty ( ) ,
100101 )
102+ . inspect_err ( |_| {
103+ eprintln ! ( "Failed to open dir {name:?}" ) ;
104+ } )
101105}
102106
103107fn ensure_dir ( dirfd : impl AsFd , name : & str ) -> rustix:: io:: Result < OwnedFd > {
@@ -116,6 +120,9 @@ fn bind_mount(fd: impl AsFd, path: &str) -> rustix::io::Result<OwnedFd> {
116120 | OpenTreeFlags :: OPEN_TREE_CLOEXEC
117121 | OpenTreeFlags :: AT_EMPTY_PATH ,
118122 )
123+ . inspect_err ( |_| {
124+ eprintln ! ( "Open tree failed for {path}" ) ;
125+ } )
119126}
120127
121128fn mount_tmpfs ( ) -> Result < OwnedFd > {
You can’t perform that action at this time.
0 commit comments