summary refs log tree commit diff
path: root/devices/src/virtio/block.rs
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-08-30 12:47:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-05 21:04:23 -0700
commited2b3e034913bce443688573771ce3e567629088 (patch)
tree7c273aa4b3b67112c139312538d6c8089718aa0a /devices/src/virtio/block.rs
parent8a4a13d48d8495c3291d033e9ff05d0c9fd0b2ee (diff)
downloadcrosvm-ed2b3e034913bce443688573771ce3e567629088.tar
crosvm-ed2b3e034913bce443688573771ce3e567629088.tar.gz
crosvm-ed2b3e034913bce443688573771ce3e567629088.tar.bz2
crosvm-ed2b3e034913bce443688573771ce3e567629088.tar.lz
crosvm-ed2b3e034913bce443688573771ce3e567629088.tar.xz
crosvm-ed2b3e034913bce443688573771ce3e567629088.tar.zst
crosvm-ed2b3e034913bce443688573771ce3e567629088.zip
pci: add tests for add_capability()
Also fix the misleading add_capability() comment.  The standard PCI
capability header is just two bytes (capability type and next pointer);
the length byte is only part of the vendor-specific capability (09h).

More importantly, the current implementation of add_capability() already
inserts the two-byte standard header, so the caller should not provide
it as part of cap_data.

BUG=None
TEST=cargo test -p devices

Change-Id: Id3517d021bfe29d08ff664d66455b15cf07af1d1
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1197069
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'devices/src/virtio/block.rs')
0 files changed, 0 insertions, 0 deletions