Home
last modified time | relevance | path

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

12

/linux/rust/kernel/
H A Ddebugfs.rs16 str::CStr,
77 fn create(name: &CStr, parent: Option<&Dir>) -> Self { in create_file()
100 name: &'a CStr,
132 pub fn new(name: &CStr) -> Self {
145 pub fn subdir(&self, name: &CStr) -> Self { in read_only_file()
167 name: &'a CStr,
193 name: &'a CStr,
234 name: &'a CStr, in read_write_file()
252 name: &'a CStr, in read_write_binary_file()
268 name: &'a CStr, in read_write_callback_file()
53 create(name: &CStr, parent: Option<&Dir>) -> Self create() argument
76 create_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, file_ops: &'static FileOps<T>, ) -> impl PinInit<File<T>, E> + 'a where T: Sync + 'static, create_file() argument
146 read_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Send + Sync + 'static, read_only_file() argument
173 read_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + Send + Sync + 'static, read_binary_file() argument
210 read_callback_file<'a, T, E: 'a, F>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
228 read_write_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Writer + Reader + Send + Sync + 'static, read_write_file() argument
244 read_write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryWriter + BinaryReader + Send + Sync + 'static, read_write_binary_file() argument
262 read_write_callback_file<'a, T, E: 'a, F, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _f: &'static F, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
287 write_only_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: Reader + Send + Sync + 'static, write_only_file() argument
304 write_binary_file<'a, T, E: 'a>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, ) -> impl PinInit<File<T>, E> + 'a where T: BinaryReader + Send + Sync + 'static, write_binary_file() argument
319 write_callback_file<'a, T, E: 'a, W>( &'a self, name: &'a CStr, data: impl PinInit<T, E> + 'a, _w: &'static W, ) -> impl PinInit<File<T>, E> + 'a where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_callback_file() argument
365 scope<'a, T: 'a, E: 'a, F>( &'a self, data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Scope<T>, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, scope() argument
464 dir<E: 'a, F>( data: impl PinInit<T, E> + 'a, name: &'a CStr, init: F, ) -> impl PinInit<Self, E> + 'a where F: for<'data, 'dir> FnOnce(&'data T, &'dir ScopedDir<'data, 'dir>) + 'a, dir() argument
517 create_file<T: Sync>(&self, name: &CStr, data: &'data T, vtable: &'static FileOps<T>) create_file() argument
529 read_only_file<T: Writer + Send + Sync + 'static>(&self, name: &CStr, data: &'data T) read_only_file() argument
541 read_binary_file<T: BinaryWriter + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_binary_file() argument
558 read_callback_file<T, F>(&self, name: &CStr, data: &'data T, _f: &'static F) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, read_callback_file() argument
577 read_write_file<T: Writer + Reader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_write_file() argument
593 read_write_binary_file<T: BinaryWriter + BinaryReader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) read_write_binary_file() argument
612 read_write_callback_file<T, F, W>( &self, name: &CStr, data: &'data T, _f: &'static F, _w: &'static W, ) where T: Send + Sync + 'static, F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result + Send + Sync, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, read_write_callback_file() argument
634 write_only_file<T: Reader + Send + Sync + 'static>(&self, name: &CStr, data: &'data T) write_only_file() argument
647 write_binary_file<T: BinaryReader + Send + Sync + 'static>( &self, name: &CStr, data: &'data T, ) write_binary_file() argument
663 write_only_callback_file<T, W>(&self, name: &CStr, data: &'data T, _w: &'static W) where T: Send + Sync + 'static, W: Fn(&T, &mut UserSliceReader) -> Result + Send + Sync, write_only_callback_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 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()
267 fn get_internal(dev: &Device, name: &CStr) -> Result<Regulator<T>> { in get_voltage()
296 pub fn get(dev: &Device, name: &CStr) -> Result<Self> {
323 pub fn get(dev: &Device, name: &CStr) -> Result<Self> {
H A Dplatform.rs62 name: &'static CStr, in register() argument
283 pub fn resource_by_name(&self, name: &CStr) -> Option<&Resource> { in resource_by_name()
314 pub fn io_request_by_name(&self, name: &CStr) -> Option<IoRequest<'_>> { in io_request_by_name()
340 name: &'static CStr,
368 irq_name: &'a CStr,
369 name: &'static CStr,
415 pub fn irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in irq_by_name()
429 pub fn optional_irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in optional_irq_by_name()
H A Dauxiliary.rs53 name: &'static CStr, in register() argument
131 pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self { in new() argument
344 name: &'a CStr, in new() argument
346 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 Dclk.rs137 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> {
304 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> {
H A Ddriver.rs151 name: &'static CStr, in register() argument
218 pub fn new(name: &'static CStr, module: &'static ThisModule) -> impl PinInit<Self, Error> { in new() argument
H A Dlib.rs210 const NAME: &'static crate::str::CStr;
358 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr { in file_from_location()
352 file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr file_from_location() argument
H A Dconfigfs.rs60 //! message: &'static CStr,
148 name: &'static CStr, in new()
355 unsafe { CStr::from_char_ptr(name) }, in make_group()
501 fn make_group(&self, name: &CStr) -> Result<impl PinInit<Group<Self::Child>, Error>>;
612 pub const fn new(name: &'static CStr) -> Self {
822 /// const C: &kernel::str::CStr = match kernel::str::CStr::from_bytes_with_nul(
843 /// const C: &kernel::str::CStr = match kernel::str::CStr::from_bytes_with_nul(
149 new( name: &'static CStr, item_type: &'static ItemType<Subsystem<Data>, Data>, data: impl PinInit<Data, Error>, ) -> impl PinInit<Self, Error> new() argument
H A Di2c.rs46 pub const fn new(id: &'static CStr) -> Self { in new()
111 name: &'static CStr, in register() argument
442 pub const fn new(type_: &'static CStr, addr: u16) -> Self { in new() argument
H A Dfaux.rs36 pub fn new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> { in new()
27 new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> new() argument
H A Dprelude.rs22 c_ushort, c_void, CStr,
/linux/rust/kernel/debugfs/
H A Dentry.rs8 CStr,
37 pub(crate) fn dynamic_dir(name: &CStr, parent: Option<Arc<Self>>) -> Self { in dynamic_dir()
43 // * `name` is a valid C string by the invariants of `&CStr`. in dynamic_dir()
59 name: &CStr, in dynamic_file()
65 // * `name` is a valid C string by the invariants of `&CStr`. in dynamic_file()
90 pub(crate) fn dir(name: &CStr, parent: Option<&'a Entry<'_>>) -> Self { in dir()
96 // * `name` is a valid C string by the invariants of `&CStr`. in dir()
110 name: &CStr, in file()
116 // * `name` is a valid C string by the invariants of `&CStr`. in file()
31 dynamic_dir(name: &CStr, parent: Option<Arc<Self>>) -> Self dynamic_dir() argument
53 dynamic_file<T>( name: &CStr, parent: Arc<Self>, data: &T, file_ops: &'static FileOps<T>, ) -> Self dynamic_file() argument
84 dir(name: &CStr, parent: Option<&'a Entry<'_>>) -> Self dir() argument
104 file<T>( name: &CStr, parent: &'a Entry<'_>, data: &'a T, file_ops: &FileOps<T>, ) -> Self file() argument
/linux/rust/kernel/pci/
H A Dirq.rs17 str::CStr,
180 name: &'static CStr, in request_irq() argument
195 name: &'static CStr, in request_threaded_irq() argument
H A Dio.rs195 pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> { in new()
294 name: &'a CStr, in iomap_region_sized() argument
303 name: &'a CStr, in iomap_region() argument
/linux/rust/kernel/sync/lock/
H A Dglobal.rs8 str::{CStr, CStrExt as _},
24 const NAME: &'static CStr; variable
275 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
/linux/samples/rust/
H A Drust_driver_auxiliary.rs22 const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
23 const AUXILIARY_NAME: &CStr = c"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
H A Dpoll.rs76 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { 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