qemu-e2k/hw
Benjamin David Lunt 5e02a4fdeb hw/usb/bus.c: PCAP adding 0xA in Windows version
Since Windows text files use CRLFs for all \n, the Windows version of QEMU
inserts a CR in the PCAP stream when a LF is encountered when using USB PCAP
files. This is due to the fact that the PCAP file is opened as TEXT instead
of BINARY.

To show an example, when using a very common protocol to USB disks, the BBB
protocol uses a 10-byte command packet. For example, the READ_CAPACITY(10)
command will have a command block length of 10 (0xA). When this 10-byte
command (part of the 31-byte CBW) is placed into the PCAP file, the Windows
file manager inserts a 0xD before the 0xA, turning the 31-byte CBW into a
32-byte CBW.

Actual CBW:
  0040 55 53 42 43 01 00 00 00 08 00 00 00 80 00 0a 25 USBC...........%
  0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       ...............

PCAP CBW
  0040 55 53 42 43 01 00 00 00 08 00 00 00 80 00 0d 0a USBC............
  0050 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 %..............

I believe simply opening the PCAP file as BINARY instead of TEXT will fix
this issue.

Resolves: https://bugs.launchpad.net/qemu/+bug/2054889
Signed-off-by: Benjamin David Lunt <benlunt@fysnet.net>
Message-ID: <000101da6823$ce1bbf80$6a533e80$@fysnet.net>
[thuth: Break long line to avoid checkpatch.pl error]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-03-01 08:27:33 +01:00
..
9pfs
acpi hw/acpi/cpu_hotplug: Include 'x86.h' instead of 'pc.h' 2024-02-20 20:34:21 +03:00
adc
alpha hw/alpha/dp264: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
arm target-arm queue: 2024-02-27 15:34:41 +00:00
audio
avr
block block: m25p80: Add support of mt35xu02gbba 2024-02-27 13:01:41 +00:00
char hw/sparc/grlib: split out the headers for each peripherals 2024-02-15 16:58:46 +01:00
core plugins: create CPUPluginState and migrate plugin_mask 2024-02-28 09:11:42 +00:00
cpu target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
cris hw/net/etraxfs-eth: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
cxl hw/cxl: Standardize all references on CXL r3.1 and minor updates 2024-02-14 06:09:33 -05:00
display hw/usb: extract sysbus-ohci to a separate file 2024-02-27 09:37:25 +01:00
dma hw/dma: Pass parent object to i8257_dma_init() 2024-02-15 16:58:46 +01:00
fsi hw/fsi: Aspeed APB2OPB & On-chip peripheral bus 2024-02-01 08:33:18 +01:00
gpio hw/gpio: Connect SD controller to BCM2838 GPIO 2024-02-27 13:01:42 +00:00
hppa hw/hppa: do not require CONFIG_USB 2024-02-27 09:37:13 +01:00
hyperv hv-balloon: use get_min_alignment() to express 32 GiB alignment 2024-02-04 17:42:03 +01:00
i2c hw/i2c/smbus_slave: Add object path on error prints 2024-02-22 12:47:40 +01:00
i386 vl, pc: turn -no-fd-bootchk into a machine property 2024-02-28 00:23:36 +01:00
ide ide, vl: turn -win2k-hack into a property on IDE devices 2024-02-28 00:23:39 +01:00
input hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper 2024-02-22 12:47:35 +01:00
intc hw/intc/Kconfig: Fix GIC settings when using "--without-default-devices" 2024-03-01 08:27:33 +01:00
ipack
ipmi
isa Misc HW patch queue 2024-02-22 15:44:29 +00:00
loongarch hw/loongarch: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
m68k hw/m68k/q800: use qemu_find_nic_info() 2024-02-02 16:23:47 +00:00
mem hw/cxl: Standardize all references on CXL r3.1 and minor updates 2024-02-14 06:09:33 -05:00
microblaze hw/microblaze: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
mips hw/mips/loongson3_virt: do not require CONFIG_USB 2024-02-27 09:37:11 +01:00
misc hw/misc/bcm2835_property: Add missed BCM2835 properties 2024-02-27 15:24:20 +00:00
net migration: MigrationNotifyFunc 2024-02-28 11:31:28 +08:00
nios2
nubus hw/nubus: add nubus-virtio-mmio device 2024-02-27 09:36:39 +01:00
nvme hw/nvme: fix invalid endian conversion 2024-02-27 09:37:30 +01:00
nvram hw/sysbus: Inline and remove sysbus_add_io() 2024-02-22 12:47:40 +01:00
openrisc hw/openrisc/openrisc_sim: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
pci target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
pci-bridge hw/cxl: Standardize all references on CXL r3.1 and minor updates 2024-02-14 06:09:33 -05:00
pci-host hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/ 2024-02-22 12:47:40 +01:00
pcmcia
ppc hw/usb: extract sysbus-ohci to a separate file 2024-02-27 09:37:25 +01:00
rdma
remote Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
riscv target/riscv: SMBIOS support for RISC-V virt machine 2024-02-09 20:43:14 +10:00
rtc pl031: Update last RTCLR value on write in case it's read back 2024-02-27 13:01:41 +00:00
rx hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary 2024-02-15 16:58:46 +01:00
s390x target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
scsi esp.c: add my copyright to the file 2024-02-13 19:37:28 +00:00
sd
sensor
sh4 hw/usb: extract sysbus-ohci to a separate file 2024-02-27 09:37:25 +01:00
smbios hw/smbios: Fix port connector option validation 2024-02-14 06:09:33 -05:00
sparc hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro 2024-02-22 12:47:40 +01:00
sparc64 hw/sparc64/cpu: Initialize GPIO before realizing CPU devices 2024-02-15 16:58:46 +01:00
ssi xlnx-versal-ospi: disable reentrancy detection for iomem_dac 2024-02-27 13:01:41 +00:00
timer misc: pxa2xx_timer: replace qemu_system_reset_request() call with watchdog_perform_action() 2024-02-27 13:01:41 +00:00
tpm
tricore hw/tricore/testboard: Use qdev_new() instead of QOM basic API 2024-02-22 12:47:40 +01:00
ufs
usb hw/usb/bus.c: PCAP adding 0xA in Windows version 2024-03-01 08:27:33 +01:00
vfio migration: MigrationNotifyFunc 2024-02-28 11:31:28 +08:00
virtio migration: remove error from notifier data 2024-02-28 11:31:28 +08:00
watchdog
xen target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
xenpv hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs 2024-02-02 16:23:47 +00:00
xtensa hw/xtensa/xtfpga: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
Kconfig hw/fsi: Introduce IBM's Local bus 2024-02-01 08:13:30 +01:00
meson.build hw/fsi: Introduce IBM's Local bus 2024-02-01 08:13:30 +01:00