Home
last modified time | relevance | path

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

12

/linux/rust/kernel/
H A Ddebugfs.rs13 use crate::str::CStr;
53 fn create(name: &CStr, parent: Option<&Dir>) -> Self { in create() argument
76 name: &'a CStr, in create_file() argument
109 pub fn new(name: &CStr) -> Self { in new()
123 pub fn subdir(&self, name: &CStr) -> Self { in subdir()
146 name: &'a CStr, in read_only_file() argument
173 name: &'a CStr, in read_binary_file() argument
210 name: &'a CStr, in read_callback_file() argument
228 name: &'a CStr, in read_write_file() argument
244 name: &'a CStr, in read_write_binary_file() argument
[all …]
H A Dstr.rs16 pub use crate::prelude::CStr;
192 pub const fn as_char_ptr_in_const_context(c_str: &CStr) -> *const c_char { in as_char_ptr_in_const_context()
199 impl Sealed for super::CStr {} implementation
278 impl fmt::Display for CStr { implementation
313 unsafe fn to_bytes_mut(s: &mut CStr) -> &mut [u8] { in to_bytes_mut()
320 impl CStrExt for CStr { implementation
324 unsafe { CStr::from_ptr(ptr.cast()) } in from_char_ptr()
333 unsafe { &mut *(core::ptr::from_mut(bytes) as *mut CStr) } in from_bytes_with_nul_unchecked_mut()
372 impl AsRef<BStr> for CStr { implementation
394 const C: &$crate::str::CStr = match $crate::str::CStr::from_bytes_with_nul(S.as_bytes()) {
[all …]
H A Dfirmware.rs13 str::{CStr, CStrExt as _},
69 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> { in request_internal() argument
87 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request() argument
93 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request_nowarn() argument
206 const __MODULE_FIRMWARE_PREFIX: &'static $crate::str::CStr = if cfg!(MODULE) {
236 module_name: &'static CStr,
241 pub const fn new(module_name: &'static CStr) -> Self { in new()
H A Dplatform.rs36 name: &'static CStr, in register() argument
252 pub fn resource_by_name(&self, name: &CStr) -> Option<&Resource> { in resource_by_name()
283 pub fn io_request_by_name(&self, name: &CStr) -> Option<IoRequest<'_>> { in io_request_by_name()
309 name: &'static CStr,
337 irq_name: &'a CStr,
338 name: &'static CStr,
384 pub fn irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in irq_by_name()
398 pub fn optional_irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in optional_irq_by_name()
H A Dregulator.rs84 pub fn devm_enable(dev: &Device<Bound>, name: &CStr) -> Result { in devm_enable()
102 pub fn devm_enable_optional(dev: &Device<Bound>, name: &CStr) -> Result { in devm_enable_optional()
270 fn get_internal(dev: &Device, name: &CStr) -> Result<Regulator<T>> { in get_internal()
299 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
326 pub fn get(dev: &Device, name: &CStr) -> Result<Self> { in get()
H A Dauxiliary.rs33 name: &'static CStr, in register() argument
109 pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self { in new() argument
313 name: &'a CStr, in new() argument
315 modname: &'a CStr, in new() argument
H A Derror.rs12 str::CStr,
179 pub fn name(&self) -> Option<&'static CStr> { in name() argument
188 Some(unsafe { CStr::from_char_ptr(ptr) }) in name()
198 pub fn name(&self) -> Option<&'static CStr> { in name() argument
H A Ddriver.rs94 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 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 Dlib.rs204 const NAME: &'static crate::str::CStr;
352 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr { in file_from_location() argument
H A Dconfigfs.rs149 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 Dfaux.rs27 pub fn new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> { in new() argument
H A Di2c.rs46 pub const fn new(id: &'static CStr) -> Self { in new()
102 name: &'static CStr, in register() argument
433 pub const fn new(type_: &'static CStr, addr: u16) -> Self { in new() argument
/linux/rust/kernel/debugfs/
H A Dentry.rs6 use crate::str::{CStr, CStrExt as _};
31 pub(crate) fn dynamic_dir(name: &CStr, parent: Option<Arc<Self>>) -> Self { in dynamic_dir() argument
53 name: &CStr, in dynamic_file() argument
84 pub(crate) fn dir(name: &CStr, parent: Option<&'a Entry<'_>>) -> Self { in dir() argument
104 name: &CStr, in file() argument
/linux/drivers/android/binder/
H A Dstats.rs64 use kernel::str::{CStr, CStrExt as _};
75 let bytes = unsafe { CStr::from_char_ptr(c_str_ptr) }.to_bytes(); in command_string()
84 let bytes = unsafe { CStr::from_char_ptr(c_str_ptr) }.to_bytes(); in return_string()
/linux/rust/kernel/pci/
H A Dio.rs32 pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> { in new()
131 name: &'a CStr, in iomap_region_sized() argument
140 name: &'a CStr, in iomap_region() argument
H A Dirq.rs17 str::CStr,
180 name: &'static CStr, in request_irq() argument
195 name: &'static CStr, in request_threaded_irq() argument
/linux/rust/kernel/sync/lock/
H A Dglobal.rs8 str::{CStr, CStrExt as _},
24 const NAME: &'static CStr; variable
273 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
/linux/drivers/gpu/drm/nova/
H A Ddriver.rs31 const NOVA_CORE_MODULE_NAME: &CStr = c_str!("NovaCore");
32 const AUXILIARY_NAME: &CStr = c_str!("nova-drm");
/linux/samples/rust/
H A Drust_driver_auxiliary.rs21 const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
22 const AUXILIARY_NAME: &CStr = c_str!("auxiliary");
/linux/rust/kernel/io/
H A Dresource.rs144 pub fn name(&self) -> Option<&CStr> { in name() argument
158 Some(unsafe { CStr::from_char_ptr(name) }) in name()
/linux/rust/kernel/sync/
H A Dcondvar.rs11 str::{CStr, CStrExt as _},
103 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() argument
H A Dlock.rs10 str::{CStr, CStrExt as _},
133 name: &'static CStr, in new() argument
/linux/rust/quote/
H A Dto_tokens.rs8 use std::ffi::{CStr, CString};
223 impl ToTokens for CStr { implementation
/linux/rust/
H A Dffi.rs50 pub use core::ffi::CStr;

12