Home
last modified time | relevance | path

Searched refs:CStr (Results 1 – 25 of 37) sorted by relevance

12

/linux/rust/kernel/
H A Dstr.rs183 pub const fn as_char_ptr_in_const_context(c_str: &CStr) -> *const c_char { in as_char_ptr_in_const_context()
187 /// Possible errors when using conversion functions in [`CStr`].
209 pub struct CStr([u8]); struct
211 impl CStr { implementation
222 // SAFETY: This is one of the invariant of `CStr`. in len_with_nul()
241 /// last at least `'a`. When `CStr` is alive, the memory pointed by `ptr`
255 /// Creates a [`CStr`] from a `[u8]`.
279 /// Creates a [`CStr`] from a `[u8]` without performing any additional
287 pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr { in from_bytes_with_nul_unchecked() argument
292 /// Creates a mutable [`CStr`] fro
300 from_bytes_with_nul_unchecked_mut(bytes: &mut [u8]) -> &mut CStr from_bytes_with_nul_unchecked_mut() argument
458 impl fmt::Display for CStr { global() implementation
488 impl fmt::Debug for CStr { global() implementation
520 impl AsRef<BStr> for CStr { global() implementation
527 impl Deref for CStr { global() implementation
536 impl Index<ops::RangeFrom<usize>> for CStr { global() implementation
549 impl Index<ops::RangeFull> for CStr { global() implementation
570 impl<Idx> Index<Idx> for CStr global() implementation
[all...]
H A Dfirmware.rs7 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
135 /// `const fn create(module_name: &'static CStr) -> ModInfoBuilder`
165 /// const fn create(module_name: &'static kernel::str::CStr) -> firmware::ModInfoBuilder<N> {
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 Dregulator.rs277 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 Dauxiliary.rs31 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 Derror.rs10 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 Ddriver.rs9 use crate::{acpi, device, of, str::CStr, try_pin_init, types::Opaque, ThisModule};
38 name: &'static CStr, in register() argument
73 pub fn new(name: &'static CStr, module: &'static ThisModule) -> impl PinInit<Self, Error> { in new() argument
H A Dpci.rs15 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 Dkunit.rs63 static FILE: &'static $crate::str::CStr = $crate::c_str!($file);
65 static CONDITION: &'static $crate::str::CStr = $crate::c_str!(stringify!($condition));
120 // strings since they are `CStr`s.
200 name: &'static kernel::str::CStr, in kunit_case() argument
H A Dclk.rs138 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 Dplatform.rs34 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 Dlib.rs180 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 Dfaux.rs27 pub fn new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> { in new() argument
H A Dprelude.rs44 pub use super::{str::CStr, ThisModule};
H A Dof.rs36 pub const fn new(compatible: &'static CStr) -> Self { in new()
/linux/rust/kernel/device/
H A Dproperty.rs15 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()
99 // SAFETY: By the invariant of `CStr`, `name` is null-terminated. 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
260 property_get_reference_args( &self, prop: &CStr, nargs: NArgs<'_>, index: u32, ) -> Result<FwNodeReferenceArgs> property_get_reference_args() argument
478 read_array_from_fwnode_property<'a>( fwnode: &FwNode, name: &CStr, out: &'a mut [MaybeUninit<Self>], ) -> Result<&'a mut [Self]> read_array_from_fwnode_property() argument
[all...]
/linux/drivers/net/phy/
H A Dax88796b_rust.rs44 const NAME: &'static CStr = c_str!("Asix Electronics AX88772A"); variable
108 const NAME: &'static CStr = c_str!("Asix Electronics AX88772C"); variable
128 const NAME: &'static CStr = c_str!("Asix Electronics AX88796B"); variable
/linux/rust/kernel/io/
H A Dresource.rs12 use crate::str::{CStr, CString};
141 pub fn name(&self) -> Option<&CStr> { in name() argument
154 // `CStr`. in name()
155 Some(unsafe { CStr::from_char_ptr(name) }) in name()
/linux/rust/kernel/sync/lock/
H A Dglobal.rs8 str::CStr,
24 const NAME: &'static CStr; variable
270 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
/linux/samples/rust/
H A Drust_configfs.rs30 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 Drust_driver_auxiliary.rs13 const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
14 const AUXILIARY_NAME: &CStr = c_str!("auxiliary");
/linux/drivers/gpu/drm/nova/
H A Ddriver.rs29 const NOVA_CORE_MODULE_NAME: &CStr = c_str!("NovaCore");
30 const AUXILIARY_NAME: &CStr = c_str!("nova-drm");
/linux/rust/kernel/drm/
H A Ddriver.rs27 pub name: &'static CStr,
29 pub desc: &'static CStr,
/linux/rust/kernel/sync/
H A Dcondvar.rs11 str::CStr,
103 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() argument
H A Dlock.rs10 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 Dnova_core.rs16 pub(crate) const MODULE_NAME: &kernel::str::CStr = <LocalModule as kernel::ModuleMetadata>::NAME;

12