Home
last modified time | relevance | path

Searched refs:CStr (Results 1 – 25 of 49) 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.rs29 pub use crate::prelude::CStr; in len()
206 pub const fn as_char_ptr_in_const_context(c_str: &CStr) -> *const c_char {
213 impl Sealed for super::CStr {}
216 /// Extensions to [`CStr`].
223 /// last at least `'a`. When `CStr` is alive, the memory pointed by `ptr` in from_bytes_with_nul_unchecked_mut()
225 // This function exists to paper over the fact that `CStr::from_ptr` takes a `*const
229 /// Creates a mutable [`CStr`] from a `[u8]` without performing any
239 // This function exists to paper over the fact that `CStr::as_ptr` returns a `*const
243 /// Convert this [`CStr`] into a [`CString`] by allocating memory and in make_ascii_lowercase()
247 /// Converts this [`CStr`] t
200 impl Sealed for super::CStr {} global() implementation
279 impl fmt::Display for CStr { global() implementation
321 impl CStrExt for CStr { global() implementation
375 impl AsRef<BStr> for CStr { global() implementation
[all...]
H A Dfirmware.rs13 str::{CStr, CStrExt as _},
65 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> {
83 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request_internal()
89 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request()
128 pub fn request_into_buf(name: &CStr, dev: &Device, buf: &mut [u8]) -> Result {
180 /// `const fn create(module_name: &'static CStr) -> ModInfoBuilder`
210 /// const fn create(module_name: &'static kernel::str::CStr) -> firmware::ModInfoBuilder<N> {
244 const __MODULE_FIRMWARE_PREFIX: &'static $crate::str::CStr = if cfg!(MODULE) { in new()
274 module_name: &'static CStr,
279 pub const fn new(module_name: &'static CStr)
69 request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> request_internal() argument
87 request(name: &CStr, dev: &Device) -> Result<Self> request() argument
93 request_nowarn(name: &CStr, dev: &Device) -> Result<Self> request_nowarn() argument
[all...]
H A Dregulator.rs87 pub fn devm_enable(dev: &Device<Bound>, name: &CStr) -> Result { in devm_enable()
105 pub fn devm_enable_optional(dev: &Device<Bound>, name: &CStr) -> Result { in devm_enable_optional()
272 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 Dplatform.rs62 name: &'static CStr, in register() argument
288 pub fn resource_by_name(&self, name: &CStr) -> Option<&Resource> { in resource_by_name()
320 pub fn io_request_by_name(&self, name: &CStr) -> Option<IoRequest<'_>> { in io_request_by_name()
351 name: &'static CStr,
387 irq_name: &'a CStr,
388 name: &'static CStr,
437 pub fn irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in irq_by_name()
451 pub fn optional_irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> { in optional_irq_by_name()
H A Dauxiliary.rs60 name: &'static CStr, in register()
140 pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self { in new()
468 name: &CStr,
470 modname: &CStr,
547 name: &CStr,
549 modname: &CStr,
53 register( adrv: &Opaque<Self::DriverType>, name: &'static CStr, module: &'static ThisModule, ) -> Result register() argument
131 new(modname: &'static CStr, name: &'static CStr) -> Self new() argument
344 new<'a>( parent: &'a device::Device<device::Bound>, name: &'a CStr, id: u32, modname: &'a CStr, ) -> impl PinInit<Devres<Self>, Error> + 'a new() argument
346 new<'a>( parent: &'a device::Device<device::Bound>, name: &'a CStr, id: u32, modname: &'a CStr, ) -> impl PinInit<Devres<Self>, Error> + 'a new() argument
H A Derror.rs12 str::CStr,
280 pub fn name(&self) -> Option<&'static CStr> {
289 Some(unsafe { CStr::from_char_ptr(ptr) })
299 pub fn name(&self) -> Option<&'static CStr> {
179 name(&self) -> Option<&'static CStr> name() argument
198 name(&self) -> Option<&'static CStr> name() argument
H A Dkunit.rs68 static FILE: &'static $crate::str::CStr = $file;
70 static CONDITION: &'static $crate::str::CStr = $crate::c_str!(stringify!($condition));
125 // strings since they are `CStr`s.
202 name: &'static kernel::str::CStr, in kunit_case() argument
H A Dclk.rs144 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
311 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
H A Ddriver.rs161 name: &'static CStr, in unregister()
228 pub fn new(name: &'static CStr, module: &'static ThisModule) -> impl PinInit<Self, Error> in new()
151 register( reg: &Opaque<Self::DriverType>, name: &'static CStr, module: &'static ThisModule, ) -> Result register() argument
218 new(name: &'static CStr, module: &'static ThisModule) -> impl PinInit<Self, Error> new() argument
H A Dlib.rs169 const NAME: &'static str::CStr = c"rust_kernel"; in init()
296 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr {
334 file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr file_from_location() argument
H A Dfaux.rs85 pub fn new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> {
27 new(name: &CStr, parent: Option<&device::Device>) -> Result<Self> new() 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
/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/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()
H A Dcontext.rs10 str::{CStr, CString},
54 pub(crate) fn new(name: &CStr) -> Result<Arc<Self>> { in new()
/linux/rust/kernel/sync/lock/
H A Dglobal.rs8 str::{CStr, CStrExt as _},
24 const NAME: &'static CStr; variable
277 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
/linux/rust/kernel/pci/
H A Dio.rs193 name: &'static CStr, in new()
302 name: &'static CStr, in config_space_extended()
308 pub fn iomap_region<'a>(&'a self, bar: u32, name: &'static CStr) -> Result<Bar<'a>> {
255 iomap_region_sized<'a, const SIZE: usize>( &'a self, bar: u32, name: &'a CStr, ) -> impl PinInit<Devres<Bar<SIZE>>, Error> + 'a iomap_region_sized() argument
264 iomap_region<'a>( &'a self, bar: u32, name: &'a CStr, ) -> impl PinInit<Devres<Bar>, Error> + 'a iomap_region() argument
/linux/samples/rust/
H A Drust_driver_auxiliary.rs25 const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
26 const AUXILIARY_NAME: &CStr = c"auxiliary";
/linux/rust/kernel/irq/
H A Drequest.rs21 str::CStr,
179 name: &'static CStr,
396 name: &'static CStr,
202 new<'a>( request: IrqRequest<'a>, flags: Flags, name: &'static CStr, handler: impl PinInit<T, Error> + 'a, ) -> impl PinInit<Self, Error> + 'a new() argument
422 new<'a>( request: IrqRequest<'a>, flags: Flags, name: &'static CStr, handler: impl PinInit<T, Error> + 'a, ) -> impl PinInit<Self, Error> + 'a new() argument
/linux/rust/kernel/io/
H A Dresource.rs144 pub fn name(&self) -> Option<&CStr> { in name() argument
157 // `CStr`. in name()
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