File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ async fn main() -> Result<()> {
257
257
bootable,
258
258
stat_root,
259
259
} => {
260
- let mut fs = composefs:: fs:: read_from_path ( path, Some ( & repo) , stat_root) ?;
260
+ let mut fs = composefs:: fs:: read_filesystem ( CWD , path, Some ( & repo) , stat_root) ?;
261
261
if bootable {
262
262
fs. transform_for_boot ( & repo) ?;
263
263
}
@@ -270,7 +270,7 @@ async fn main() -> Result<()> {
270
270
stat_root,
271
271
ref image_name,
272
272
} => {
273
- let mut fs = composefs:: fs:: read_from_path ( path, Some ( & repo) , stat_root) ?;
273
+ let mut fs = composefs:: fs:: read_filesystem ( CWD , path, Some ( & repo) , stat_root) ?;
274
274
if bootable {
275
275
fs. transform_for_boot ( & repo) ?;
276
276
}
@@ -282,7 +282,7 @@ async fn main() -> Result<()> {
282
282
bootable,
283
283
stat_root,
284
284
} => {
285
- let mut fs = composefs:: fs:: read_from_path ( path, Some ( & repo) , stat_root) ?;
285
+ let mut fs = composefs:: fs:: read_filesystem ( CWD , path, Some ( & repo) , stat_root) ?;
286
286
if bootable {
287
287
fs. transform_for_boot ( & repo) ?;
288
288
}
Original file line number Diff line number Diff line change @@ -313,7 +313,8 @@ impl<ObjectID: FsVerityHashValue> FilesystemReader<'_, ObjectID> {
313
313
}
314
314
}
315
315
316
- pub fn read_from_path < ObjectID : FsVerityHashValue > (
316
+ pub fn read_filesystem < ObjectID : FsVerityHashValue > (
317
+ dirfd : impl AsFd ,
317
318
path : & Path ,
318
319
repo : Option < & Repository < ObjectID > > ,
319
320
stat_root : bool ,
@@ -323,7 +324,7 @@ pub fn read_from_path<ObjectID: FsVerityHashValue>(
323
324
inodes : HashMap :: new ( ) ,
324
325
} ;
325
326
326
- let root = reader. read_directory ( CWD , path. as_os_str ( ) , stat_root) ?;
327
+ let root = reader. read_directory ( dirfd , path. as_os_str ( ) , stat_root) ?;
327
328
328
329
Ok ( FileSystem {
329
330
root,
Original file line number Diff line number Diff line change @@ -318,13 +318,13 @@ pub fn write_config<ObjectID: FsVerityHashValue>(
318
318
319
319
pub fn seal < ObjectID : FsVerityHashValue > (
320
320
repo : & Arc < Repository < ObjectID > > ,
321
- name : & str ,
322
- verity : Option < & ObjectID > ,
321
+ config_name : & str ,
322
+ config_verity : Option < & ObjectID > ,
323
323
) -> Result < ContentAndVerity < ObjectID > > {
324
- let ( mut config, refs) = open_config ( repo, name , verity ) ?;
324
+ let ( mut config, refs) = open_config ( repo, config_name , config_verity ) ?;
325
325
let mut myconfig = config. config ( ) . clone ( ) . context ( "no config!" ) ?;
326
326
let labels = myconfig. labels_mut ( ) . get_or_insert_with ( HashMap :: new) ;
327
- let mut fs = crate :: oci:: image:: create_filesystem ( repo, name , verity ) ?;
327
+ let mut fs = crate :: oci:: image:: create_filesystem ( repo, config_name , config_verity ) ?;
328
328
let id = fs. compute_image_id ( ) ;
329
329
labels. insert ( "containers.composefs.fsverity" . to_string ( ) , id. to_hex ( ) ) ;
330
330
config. set_config ( Some ( myconfig) ) ;
You can’t perform that action at this time.
0 commit comments