/DragonOS/user/apps/test-blockcache/src/ |
H A D | main.rs | 2 use std::io::{BufReader, Read, Seek, SeekFrom, Write}; 7 file.seek(std::io::SeekFrom::Start(file_size_bytes - 1))?; in main() 15 file.seek(SeekFrom::Start(0))?; in main()
|
/DragonOS/kernel/src/libs/ |
H A D | vec_cursor.rs | 8 use crate::driver::base::block::SeekFrom; 132 pub fn seek(&mut self, origin: SeekFrom) -> Result<usize, SystemError> { in seek() 134 SeekFrom::SeekSet(offset) => offset, in seek() 135 SeekFrom::SeekCurrent(offset) => self.pos as i64 + offset, in seek() 137 SeekFrom::SeekEnd(offset) => self.data.len() as i64 + offset, in seek() 138 SeekFrom::Invalid => { in seek()
|
H A D | elf.rs | 20 driver::base::block::SeekFrom, 340 file.lseek(SeekFrom::SeekSet(offset_in_file as i64))?; in do_load_file() 447 file.lseek(SeekFrom::SeekSet(shoff as i64)) in parse_segments() 479 file.lseek(SeekFrom::SeekSet(phoff as i64)) in parse_segments()
|
/DragonOS/user/apps/user-manage/src/executor/ |
H A D | executor.rs | 123 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in write_group_file() 166 .seek(std::io::SeekFrom::Start(0)) in write_gshadow_file() 211 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file() 240 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file() 258 guard.shadow_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_shadow_file() 289 .seek(std::io::SeekFrom::Start(0)) in update_gshadow_file() 358 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file() 406 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file() 428 guard.shadow_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_shadow_file() 481 .seek(std::io::SeekFrom::Start(0)) in update_gshadow_file() [all …]
|
/DragonOS/kernel/src/driver/base/block/ |
H A D | mod.rs | 8 pub enum SeekFrom { enum
|
/DragonOS/kernel/src/filesystem/fat/ |
H A D | fs.rs | 24 driver::base::block::{block_device::LBA_SIZE, disk_info::Partition, SeekFrom}, 439 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry() 530 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry_raw() 986 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster() 1031 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster() 1060 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster() 1106 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry() 1116 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry() 1138 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry() 1164 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry() [all …]
|
H A D | bpb.rs | 7 driver::base::block::{block_device::LBA_SIZE, gendisk::GenDisk, SeekFrom}, 264 cursor.seek(SeekFrom::SeekCurrent(420))?; in new()
|
H A D | entry.rs | 7 driver::base::block::{block_device::LBA_SIZE, SeekFrom}, 1145 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in flush() 1358 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in flush() 2408 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_raw_dir_entry() 2420 cursor.seek(SeekFrom::SeekCurrent(10))?; in get_raw_dir_entry() 2424 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_raw_dir_entry()
|
/DragonOS/kernel/src/filesystem/ |
H A D | mbr.rs | 11 driver::base::block::{block_device::BlockDevice, disk_info::Partition, SeekFrom}, 97 cursor.seek(SeekFrom::SeekCurrent(446))?; in from_disk()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | file.rs | 19 base::{block::SeekFrom, device::DevicePrivateData}, 387 pub fn lseek(&self, origin: SeekFrom) -> Result<usize, SystemError> { in lseek() 397 SeekFrom::SeekSet(offset) => offset, in lseek() 398 SeekFrom::SeekCurrent(offset) => self.offset.load(Ordering::SeqCst) as i64 + offset, in lseek() 399 SeekFrom::SeekEnd(offset) => { in lseek() 403 SeekFrom::Invalid => { in lseek()
|
H A D | open.rs | 13 driver::base::block::SeekFrom, process::ProcessManager, 220 file.lseek(SeekFrom::SeekEnd(0))?; in do_sys_openat2()
|
H A D | syscall.rs | 12 driver::base::{block::SeekFrom, device::device_number::DeviceNumber}, 606 SEEK_SET => Ok(SeekFrom::SeekSet(offset)), in lseek() 607 SEEK_CUR => Ok(SeekFrom::SeekCurrent(offset)), in lseek() 608 SEEK_END => Ok(SeekFrom::SeekEnd(offset)), in lseek() 609 SEEK_MAX => Ok(SeekFrom::SeekEnd(0)), in lseek()
|
/DragonOS/kernel/src/process/ |
H A D | exec.rs | 7 driver::base::block::SeekFrom, 168 param.file_mut().lseek(SeekFrom::SeekSet(0))?; in load_binary_file()
|
/DragonOS/kernel/src/mm/ |
H A D | syscall.rs | 9 driver::base::block::SeekFrom, 621 let old_pos = file.lseek(SeekFrom::SeekCurrent(0)).unwrap(); in msync() 622 file.lseek(SeekFrom::SeekSet(fstart as i64)).unwrap(); in msync() 626 file.lseek(SeekFrom::SeekSet(old_pos as i64)).unwrap(); in msync()
|