aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0e4a862c5..b06eb36e6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -422,7 +422,7 @@ impl<'a> Control<'a> {
422 buf[name.len() + 1..][..val.len()].copy_from_slice(val); 422 buf[name.len() + 1..][..val.len()].copy_from_slice(val);
423 423
424 let total_len = name.len() + 1 + val.len(); 424 let total_len = name.len() + 1 + val.len();
425 self.ioctl(2, 263, 0, &mut buf).await; 425 self.ioctl(2, 263, 0, &mut buf[..total_len]).await;
426 } 426 }
427 427
428 // TODO this is not really working, it always returns all zeros. 428 // TODO this is not really working, it always returns all zeros.
@@ -904,7 +904,7 @@ where
904 let bus = unsafe { &mut *bus }; 904 let bus = unsafe { &mut *bus };
905 async { 905 async {
906 bus.write(&[cmd]).await?; 906 bus.write(&[cmd]).await?;
907 bus.write(&buf[..(total_len + 3) / 4]).await?; 907 bus.write(&buf[..total_len / 4]).await?;
908 Ok(()) 908 Ok(())
909 } 909 }
910 }) 910 })