Lines Matching +full:- +full:- +full:disable +full:- +full:qom +full:- +full:cast +full:- +full:debug
3 // SPDX-License-Identifier: GPL-2.0-or-later
14 fmt::{self, Debug},
37 /// back-end that is used for example by a device. Compared to the
39 /// because the QOM object ([`bindings::Chardev`]) contains a pointer to
47 fn flush(&mut self) -> io::Result<()> { in flush()
51 fn write(&mut self, buf: &[u8]) -> io::Result<usize> { in write()
59 fn write_all(&mut self, buf: &[u8]) -> io::Result<()> { in write_all()
74 impl Debug for CharBackend {
75 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()
78 Debug::fmt(unsafe { &*chr }, f) in fmt()
90 /// Enable the front-end's character device handlers, if there is an
111 ) -> c_int { in enable_handlers()
114 let owner: &T = unsafe { &*(opaque.cast::<T>()) }; in enable_handlers()
126 let owner: &T = unsafe { &*(opaque.cast::<T>()) }; in enable_handlers()
137 let owner: &T = unsafe { &*(opaque.cast::<T>()) }; in enable_handlers()
163 (owner as *const T).cast_mut().cast::<c_void>(), in enable_handlers()
170 /// Disable the front-end's character device handlers.
199 pub fn borrow_mut(&self) -> impl Write + '_ { in borrow_mut()
205 pub fn send_break(&self, long: bool) -> io::Result<()> { in send_break()
213 addr_of_mut!(duration).cast::<c_void>(), in send_break()
227 pub fn write(&self, buf: &[u8]) -> io::Result<usize> { in write()
229 // SAFETY: qemu_chr_fe_write is thread-safe in write()
241 pub fn write_all(&self, buf: &[u8]) -> io::Result<()> { in write_all()
243 // SAFETY: qemu_chr_fe_write_all is thread-safe in write_all()