MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / copy_bytes

Function copy_bytes

api/src/vfs/dev/event.rs:115–119  ·  view source on GitHub ↗
(src: &[u8], dst: &mut [u8])

Source from the content-addressed store, hash-verified

113}
114
115fn copy_bytes(src: &[u8], dst: &mut [u8]) -> usize {
116 let len = src.len().min(dst.len());
117 dst[..len].copy_from_slice(&src[..len]);
118 len
119}
120
121fn return_str(arg: usize, size: usize, s: &str) -> AxResult<usize> {
122 let slice = UserPtr::<u8>::from(arg).get_as_mut_slice(size)?;

Callers 3

get_event_bitsMethod · 0.85
return_strFunction · 0.85
ioctlMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected