Searched refs:to_bytes (Results 1 – 18 of 18) sorted by relevance
| /linux/drivers/android/binder/ |
| H A D | stats.rs | 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/drivers/md/ |
| H A D | dm-ebs-target.c | 72 unsigned int buf_off = to_bytes(__block_mod(iter->bi_sector, ec->u_bs)); in __ebs_rw_bvec() 276 to_bytes(tmp1) > PAGE_SIZE) { in ebs_ctr() 316 ec->bufio = dm_bufio_client_create(ec->dev->bdev, to_bytes(ec->u_bs), 1, in ebs_ctr() 434 limits->logical_block_size = to_bytes(ec->e_bs); in ebs_io_hints() 435 limits->physical_block_size = to_bytes(ec->u_bs); in ebs_io_hints()
|
| H A D | dm-stripe.c | 263 bio->bi_iter.bi_size = to_bytes(end - begin); in stripe_map_range()
|
| H A D | dm-clone-target.c | 452 bio->bi_iter.bi_size = to_bytes(len); in trim_bio()
|
| H A D | dm.c | 651 clone->bi_iter.bi_size = to_bytes(*len); in alloc_tio()
|
| /linux/scripts/crypto/ |
| H A D | gen-hash-testvecs.py | 69 return m.to_bytes(16, byteorder='little') 92 return Ghash.reflect_bits_in_bytes(poly).to_bytes(16, byteorder='little') 144 return self.acc.to_bytes(16, byteorder='little') 282 h += (p % 2**64).to_bytes(8, byteorder='little')
|
| /linux/samples/rust/ |
| H A D | rust_debugfs_scoped.rs | 50 .retain(|device| device.name.to_bytes() != to_remove.to_bytes()); in create_file_write()
|
| /linux/rust/kernel/ |
| H A D | str.rs | 82 /// assert_eq!(s.to_bytes(), "Hello, BStr!".as_bytes()); in fmt() 86 /// assert_eq!(s.to_bytes(), "\\xf0\\x9f\\xa6\\x80".as_bytes()); in fmt() 114 /// assert_eq!(s.to_bytes(), "\"Hello, \\\"BStr\\\"!\"".as_bytes()); in fmt() 118 /// assert_eq!(s.to_bytes(), "\"\\xf0\\x9f\\x98\\xba\"".as_bytes()); in fmt() 309 for &c in self.to_bytes() { 391 BStr::from_bytes(self.to_bytes())
|
| H A D | error.rs | 312 unsafe { core::str::from_utf8_unchecked(name.to_bytes()) },
|
| /linux/tools/testing/selftests/drivers/net/lib/py/ |
| H A D | env.py | 586 ifindex_bytes = self.nk_host_ifindex.to_bytes(4, byteorder='little') 620 phys_ifindex_bytes = self.ifindex.to_bytes(4, byteorder=sys.byteorder)
|
| /linux/rust/zerocopy/src/ |
| H A D | ref.rs | 1044 assert_eq!(Ref::bytes(&r), &VAL1.to_bytes()); in test_new_helper() 1047 assert_eq!(Ref::bytes(&r), &VAL1.to_bytes()); in test_new_helper() 1052 Ref::bytes_mut(&mut r).copy_from_slice(&VAL2.to_bytes()[..]); in test_new_helper()
|
| H A D | byteorder.rs | 578 pub const fn to_bytes(self) -> [u8; $bytes] { 1321 const _BYTES: [u8; 2] = _FROM_BYTES.to_bytes(); in test_const_methods()
|
| /linux/tools/perf/scripts/python/ |
| H A D | intel-pt-events.py | 144 s = payload.to_bytes(8, "little").decode("ascii").rstrip("\x00")
|
| /linux/rust/zerocopy/src/util/ |
| H A D | mod.rs | 876 pub(crate) fn to_bytes(self) -> [u8; 8] { in to_bytes() method
|
| /linux/tools/testing/selftests/net/openvswitch/ |
| H A D | ovs-dpctl.py | 180 def to_bytes(mac): function 192 return to_bytes(mac_str), to_bytes(mask_str)
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_panic_qr.rs | 971 &Segment::Binary(url_cstr.to_bytes()), in drm_panic_qr_generate()
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | psp.py | 476 tx['key'] = (tx['key'][0] ^ 0xff).to_bytes(1, 'little') + tx['key'][1:]
|
| /linux/rust/proc-macro2/ |
| H A D | fallback.rs | 1102 let mut bytes = string.to_bytes(); in c_string()
|