@@ -338,7 +338,7 @@ pub unsafe extern "C" fn krun_set_mapped_volumes(
338
338
Ok ( s) => s,
339
339
Err ( _) => return -libc:: EINVAL ,
340
340
} ;
341
- let vol_tuple: Vec < & str > = s. split ( ":" ) . collect ( ) ;
341
+ let vol_tuple: Vec < & str > = s. split ( ':' ) . collect ( ) ;
342
342
if vol_tuple. len ( ) != 2 {
343
343
return -libc:: EINVAL ;
344
344
}
@@ -363,7 +363,7 @@ pub unsafe extern "C" fn krun_set_mapped_volumes(
363
363
let fs_device_config = match cfg. get_fs_cfg ( ) {
364
364
Some ( fs_cfg) => FsDeviceConfig {
365
365
fs_id : fs_cfg. fs_id . clone ( ) ,
366
- shared_dir : fs_cfg. shared_dir . clone ( ) ,
366
+ shared_dir : fs_cfg. shared_dir ,
367
367
mapped_volumes : Some ( mapped_volumes) ,
368
368
} ,
369
369
None => FsDeviceConfig {
@@ -423,7 +423,7 @@ pub unsafe extern "C" fn krun_set_port_map(ctx_id: u32, c_port_map: *const *cons
423
423
Ok ( s) => s,
424
424
Err ( _) => return -libc:: EINVAL ,
425
425
} ;
426
- let port_tuple: Vec < & str > = s. split ( ":" ) . collect ( ) ;
426
+ let port_tuple: Vec < & str > = s. split ( ':' ) . collect ( ) ;
427
427
if port_tuple. len ( ) != 2 {
428
428
return -libc:: EINVAL ;
429
429
}
@@ -485,7 +485,7 @@ pub unsafe extern "C" fn krun_set_rlimits(ctx_id: u32, c_rlimits: *const *const
485
485
486
486
match CTX_MAP . lock ( ) . unwrap ( ) . entry ( ctx_id) {
487
487
Entry :: Occupied ( mut ctx_cfg) => {
488
- ctx_cfg. get_mut ( ) . set_rlimits ( rlimits. to_string ( ) ) ;
488
+ ctx_cfg. get_mut ( ) . set_rlimits ( rlimits) ;
489
489
}
490
490
Entry :: Vacant ( _) => return -libc:: ENOENT ,
491
491
}
@@ -646,17 +646,18 @@ pub extern "C" fn krun_start_enter(ctx_id: u32) -> i32 {
646
646
ctx_cfg. vmr . set_attestation_url ( url) ;
647
647
}
648
648
649
- let mut boot_source = BootSourceConfig :: default ( ) ;
650
- boot_source. kernel_cmdline_prolog = Some ( format ! (
651
- "{} init={} KRUN_INIT={} KRUN_WORKDIR={} {} {}" ,
652
- DEFAULT_KERNEL_CMDLINE ,
653
- INIT_PATH ,
654
- ctx_cfg. get_exec_path( ) ,
655
- ctx_cfg. get_workdir( ) ,
656
- ctx_cfg. get_rlimits( ) ,
657
- ctx_cfg. get_env( ) ,
658
- ) ) ;
659
- boot_source. kernel_cmdline_epilog = Some ( format ! ( " -- {}" , ctx_cfg. get_args( ) ) ) ;
649
+ let boot_source = BootSourceConfig {
650
+ kernel_cmdline_prolog : Some ( format ! (
651
+ "{} init={} KRUN_INIT={} KRUN_WORKDIR={} {} {}" ,
652
+ DEFAULT_KERNEL_CMDLINE ,
653
+ INIT_PATH ,
654
+ ctx_cfg. get_exec_path( ) ,
655
+ ctx_cfg. get_workdir( ) ,
656
+ ctx_cfg. get_rlimits( ) ,
657
+ ctx_cfg. get_env( ) ,
658
+ ) ) ,
659
+ kernel_cmdline_epilog : Some ( format ! ( " -- {}" , ctx_cfg. get_args( ) ) ) ,
660
+ } ;
660
661
661
662
if ctx_cfg. vmr . set_boot_source ( boot_source) . is_err ( ) {
662
663
return -libc:: EINVAL ;
0 commit comments