Skip to content

Commit 8a69bd7

Browse files
committed
update PAL and add check-cfg override for target_os
1 parent 1581d08 commit 8a69bd7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

library/std/src/sys/pal/vexos/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl File {
340340
map_fresult(vex_sdk::vexFileSeek(self.fd.0, try_convert_offset(offset)?, SEEK_SET))?
341341
},
342342

343-
// vexOS does not allow seeking with negative offsets.
343+
// VEXos does not allow seeking with negative offsets.
344344
// That means we need to calculate the offset from the start for both of these.
345345
SeekFrom::End(offset) => unsafe {
346346
// If our offset is positive, everything is easy
@@ -430,7 +430,7 @@ impl Drop for File {
430430
pub fn readdir(_p: &Path) -> io::Result<ReadDir> {
431431
// While there *is* a userspace function for reading file directories,
432432
// the necessary implementation cannot currently be done cleanly, as
433-
// vexOS does not expose directory length to user programs.
433+
// VEXos does not expose directory length to user programs.
434434
//
435435
// This means that we would need to create a large fixed-length buffer
436436
// and hope that the folder's contents didn't exceed that buffer's length,
@@ -458,7 +458,7 @@ pub fn remove_dir_all(_path: &Path) -> io::Result<()> {
458458
unsupported()
459459
}
460460

461-
pub fn try_exists(path: &Path) -> io::Result<bool> {
461+
pub fn exists(path: &Path) -> io::Result<bool> {
462462
let path = CString::new(path.as_os_str().as_encoded_bytes())
463463
.map_err(|_| io::Error::new(io::ErrorKind::InvalidData, "Path contained a null byte"))?;
464464

library/std/src/sys/pal/vexos/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub mod process;
1616
pub mod stdio;
1717
#[path = "../unsupported/thread.rs"]
1818
pub mod thread;
19-
#[path = "../unsupported/thread_local_key.rs"]
20-
pub mod thread_local_key;
2119
pub mod time;
2220

2321
use crate::{arch::asm, ptr::{self, addr_of_mut}};
@@ -37,7 +35,7 @@ pub unsafe extern "C" fn _start() -> ! {
3735
// Setup the stack
3836
asm!("ldr sp, =__stack_top", options(nostack));
3937

40-
// vexOS doesn't explicitly clean out .bss, so as a sanity
38+
// VEXos doesn't explicitly clean out .bss, so as a sanity
4139
// check we'll fill it with zeroes.
4240
ptr::slice_from_raw_parts_mut(
4341
addr_of_mut!(__bss_start),

0 commit comments

Comments
 (0)