mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
Initialize buffer as 1s to ensure it's written to.
This commit is contained in:
committed by
Matthew Leach
parent
ebd459039e
commit
5c8793675d
@@ -76,7 +76,7 @@ fn test_read() {
|
||||
print!("Testing read syscall ...");
|
||||
let file = "/dev/zero";
|
||||
let c_file = std::ffi::CString::new(file).unwrap();
|
||||
let mut buffer = [0u8; 16];
|
||||
let mut buffer = [1u8; 16];
|
||||
unsafe {
|
||||
let fd = libc::open(c_file.as_ptr(), libc::O_RDONLY);
|
||||
if fd < 0 {
|
||||
|
||||
Reference in New Issue
Block a user