/linux/rust/kernel/ |
H A D | str.rs | 183 pub const fn as_char_ptr_in_const_context(c_str: &CStr) -> *const c_char { in as_char_ptr_in_const_context() 209 pub struct CStr([u8]); struct 211 impl CStr { implementation 287 pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr { in from_bytes_with_nul_unchecked() argument 300 pub unsafe fn from_bytes_with_nul_unchecked_mut(bytes: &mut [u8]) -> &mut CStr { in from_bytes_with_nul_unchecked_mut() argument 302 unsafe { &mut *(core::ptr::from_mut(bytes) as *mut CStr) } in from_bytes_with_nul_unchecked_mut() 458 impl fmt::Display for CStr { implementation 488 impl fmt::Debug for CStr { implementation 520 impl AsRef<BStr> for CStr { implementation 527 impl Deref for CStr { implementation [all …]
|
H A D | firmware.rs | 7 use crate::{bindings, device::Device, error::Error, error::Result, ffi, str::CStr}; 62 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> { in request_internal() argument 80 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request() argument 86 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request_nowarn() argument 199 const __MODULE_FIRMWARE_PREFIX: &'static $crate::str::CStr = if cfg!(MODULE) { 229 module_name: &'static CStr, 234 pub const fn new(module_name: &'static CStr) -> Self { in new()
|
H A D | regulator.rs | 277 fn get_internal(dev: &Device, name: &CStr) -> Result<Regulator<T>> { in get_internal() 305 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get() 332 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get() 364 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
|
H A D | auxiliary.rs | 31 name: &'static CStr, in register() argument 107 pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self { in new() argument 298 pub fn new(parent: &device::Device, name: &CStr, id: u32, modname: &CStr) -> Result<Self> { in new() argument
|
H A D | error.rs | 10 str::CStr, 162 pub fn name(&self) -> Option<&'static CStr> { in name() argument 169 Some(unsafe { CStr::from_char_ptr(ptr) }) in name() 179 pub fn name(&self) -> Option<&'static CStr> { in name() argument
|
H A D | driver.rs | 94 use crate::{acpi, device, of, str::CStr, try_pin_init, types::Opaque, ThisModule}; 123 name: &'static CStr, in register() argument 158 pub fn new(name: &'static CStr, module: &'static ThisModule) -> impl PinInit<Self, Error> { in new() argument
|
H A D | pci.rs | 15 str::CStr, 36 name: &'static CStr, in register() argument 291 fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> { in new() 421 name: &'a CStr, in iomap_region_sized() argument 430 name: &'a CStr, in iomap_region() argument
|
H A D | kunit.rs | 63 static FILE: &'static $crate::str::CStr = $crate::c_str!($file); 65 static CONDITION: &'static $crate::str::CStr = $crate::c_str!(stringify!($condition)); 200 name: &'static kernel::str::CStr, in kunit_case() argument
|
H A D | platform.rs | 34 name: &'static CStr, in register() argument 248 pub fn resource_by_name(&self, name: &CStr) -> Option<&Resource> { in resource_by_name() 279 pub fn io_request_by_name(&self, name: &CStr) -> Option<IoRequest<'_>> { in io_request_by_name()
|
H A D | clk.rs | 138 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get() 306 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
|
H A D | lib.rs | 180 const NAME: &'static crate::str::CStr; 328 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr { in file_from_location() argument
|
H A D | configfs.rs | 149 name: &'static CStr, in new() argument 356 unsafe { CStr::from_char_ptr(name) }, in make_group() 502 fn make_group(&self, name: &CStr) -> Result<impl PinInit<Group<Self::Child>, Error>>; in make_group() 613 pub const fn new(name: &'static CStr) -> Self { in new()
|
H A D | faux.rs | 27 pub fn new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> { in new() argument
|
H A D | uaccess.rs | 347 pub fn strcpy_into_buf<'buf>(self, buf: &'buf mut [u8]) -> Result<&'buf CStr> { in strcpy_into_buf() argument 394 Ok(unsafe { CStr::from_bytes_with_nul_unchecked(&buf[..len]) }) in strcpy_into_buf()
|
H A D | prelude.rs | 44 pub use super::{str::CStr, ThisModule};
|
H A D | workqueue.rs | 504 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> in new() argument 673 work_name: &'static CStr, in new() argument 675 timer_name: &'static CStr, in new() argument
|
H A D | of.rs | 36 pub const fn new(compatible: &'static CStr) -> Self { in new()
|
/linux/rust/kernel/device/ |
H A D | property.rs | 15 str::{CStr, CString}, 89 let name = unsafe { CStr::from_char_ptr(name) }; in display_name() 98 pub fn property_present(&self, name: &CStr) -> bool { in property_present() 104 pub fn property_read_bool(&self, name: &CStr) -> bool { in property_read_bool() 113 pub fn property_match_string(&self, name: &CStr, match_str: &CStr) -> Result<usize> { in property_match_string() argument 131 name: &'name CStr, in property_read_array_vec() argument 157 pub fn property_count_elem<T: PropertyInt>(&self, name: &CStr) -> Result<usize> { in property_count_elem() 192 name: &'name CStr, in property_read() argument 202 pub fn get_child_by_name(&self, name: &CStr) -> Option<ARef<Self>> { in get_child_by_name() 260 prop: &CStr, in property_get_reference_args() argument [all …]
|
/linux/rust/kernel/io/ |
H A D | resource.rs | 12 use crate::str::{CStr, CString}; 141 pub fn name(&self) -> Option<&CStr> { in name() argument 155 Some(unsafe { CStr::from_char_ptr(name) }) in name()
|
/linux/samples/rust/ |
H A D | rust_configfs.rs | 30 message: &'static CStr, 74 fn make_group(&self, name: &CStr) -> Result<impl PinInit<configfs::Group<Child>, Error>> { in make_group() 139 fn make_group(&self, name: &CStr) -> Result<impl PinInit<configfs::Group<GrandChild>, Error>> { in make_group()
|
H A D | rust_driver_auxiliary.rs | 13 const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME; 14 const AUXILIARY_NAME: &CStr = c_str!("auxiliary");
|
/linux/rust/kernel/drm/ |
H A D | driver.rs | 27 pub name: &'static CStr, 29 pub desc: &'static CStr,
|
/linux/rust/kernel/sync/ |
H A D | condvar.rs | 11 str::CStr, 103 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() argument
|
H A D | lock.rs | 10 str::CStr, 130 pub fn new(t: T, name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() argument
|
/linux/drivers/gpu/nova-core/ |
H A D | nova_core.rs | 16 pub(crate) const MODULE_NAME: &kernel::str::CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
|