Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252950
b: refs/heads/master
c: 4423fe4
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Rusty Russell committed May 30, 2011
1 parent 53d072e commit 89cbb40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60
refs/heads/master: 4423fe40b03f32b11e72ecfa03077e702e55d5a9
19 changes: 17 additions & 2 deletions trunk/tools/virtio/virtio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ const struct option longopts[] = {
.name = "help",
.val = 'h',
},
{
.name = "event-idx",
.val = 'E',
},
{
.name = "no-event-idx",
.val = 'e',
},
{
.name = "indirect",
.val = 'I',
Expand All @@ -211,13 +219,17 @@ const struct option longopts[] = {

static void help()
{
fprintf(stderr, "Usage: virtio_test [--help] [--no-indirect]\n");
fprintf(stderr, "Usage: virtio_test [--help]"
" [--no-indirect]"
" [--no-event-idx]"
"\n");
}

int main(int argc, char **argv)
{
struct vdev_info dev;
unsigned long long features = 1ULL << VIRTIO_RING_F_INDIRECT_DESC;
unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
(1ULL << VIRTIO_RING_F_EVENT_IDX);
int o;

for (;;) {
Expand All @@ -228,6 +240,9 @@ int main(int argc, char **argv)
case '?':
help();
exit(2);
case 'e':
features &= ~(1ULL << VIRTIO_RING_F_EVENT_IDX);
break;
case 'h':
help();
goto done;
Expand Down

0 comments on commit 89cbb40

Please sign in to comment.