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 1
1
use std:: {
2
2
ffi:: OsString ,
3
+ fmt:: Debug ,
3
4
io:: ErrorKind ,
4
5
os:: fd:: { AsFd , OwnedFd } ,
5
6
path:: { Path , PathBuf } ,
@@ -91,13 +92,16 @@ struct Args {
91
92
}
92
93
93
94
// 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 > {
95
96
openat (
96
97
dirfd,
97
98
name. as_ref ( ) ,
98
99
OFlags :: PATH | OFlags :: DIRECTORY | OFlags :: CLOEXEC ,
99
100
Mode :: empty ( ) ,
100
101
)
102
+ . inspect_err ( |_| {
103
+ eprintln ! ( "Failed to open dir {name:?}" ) ;
104
+ } )
101
105
}
102
106
103
107
fn 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> {
116
120
| OpenTreeFlags :: OPEN_TREE_CLOEXEC
117
121
| OpenTreeFlags :: AT_EMPTY_PATH ,
118
122
)
123
+ . inspect_err ( |_| {
124
+ eprintln ! ( "Open tree failed for {path}" ) ;
125
+ } )
119
126
}
120
127
121
128
fn mount_tmpfs ( ) -> Result < OwnedFd > {
You can’t perform that action at this time.
0 commit comments