Skip to content

Instantly share code, notes, and snippets.

@jonas-schievink
jonas-schievink / README.md
Last active April 26, 2021 15:37
Wireshark USB

First, run sudo modprobe usbmon.

Now Wireshark should show usbmon0-N capture devices.

They correspond to USB buses (see lsusb), so select the one on which the target device is attached.

Now filter out the right device on the bus by writing a filter.

usb.src and usb.dst are the packet's source and destination address, one of which will always be "host".

//! NRVO on acyclic CFGs.
use crate::transform::{MirPass, MirSource};
use rustc_middle::mir::visit::Visitor;
use rustc_middle::mir::{
read_only, Body, BodyAndCache, Constant, Local, LocalKind, Location, Operand, Place, Rvalue,
StatementKind, Statement,
};
use rustc_middle::ty::TyCtxt;
use rustc_index::vec::IndexVec;
<html>
<head>
<title>Cargo Build Timings — rustc-main 0.0.0</title>
<meta charset="utf-8">
<style type="text/css">
html {
font-family: sans-serif;
}
@jonas-schievink
jonas-schievink / ramfs-chroot
Created November 15, 2018 17:57
chroot into an initramfs with a single command
#!/bin/bash
set -e
if [[ $# -ne 1 ]]; then
echo "usage: ramfs-chroot <ramfs_image>"
exit 1
fi
RAMFS=$1