diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 21:46:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 21:46:35 +0100 |
commit | d3558251777ab71b2a505d7acb2edd35d05b0d58 (patch) | |
tree | f56b8fc70777bdb297fd4dcae899f61fa6933ac2 /tools/virtual.c | |
parent | d2f7f85cd20fb3a2bb3dba8c9be7ff21d2a8c049 (diff) |
intel-virtual-overlay: Don't do a sibling search if bumblebee is explicitly requested
If either all or bumblee is explicitly requested, don't automatically
perform the other search.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/virtual.c')
-rw-r--r-- | tools/virtual.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index 64b869c8..67591356 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -2338,7 +2338,7 @@ int main(int argc, char **argv) } else open++; } - if (all || (optind == argc && open == 0)) { + if (all || (optind == argc && !bumblebee)) { first_display_for_each_sibling(&ctx, i) { ret = first_display_send_command(&ctx, 5000, "C%s", ctx.command); if (ret && ret != -EBUSY) @@ -2347,7 +2347,7 @@ int main(int argc, char **argv) open++; } } - if (bumblebee || (optind == argc && open == 0)) { + if (bumblebee || (optind == argc && !all)) { ret = first_display_send_command(&ctx, 5000, "B"); if (ret && ret != -EBUSY) { if (bumblebee) @@ -2390,7 +2390,7 @@ int main(int argc, char **argv) } else open++; } - if (all || (optind == argc && open == 0)) { + if (all || (optind == argc && !bumblebee)) { first_display_for_each_sibling(&ctx, i) { ret = last_display_clone(&ctx, display_open(&ctx, ctx.command)); if (ret && ret != -EBUSY) @@ -2399,7 +2399,7 @@ int main(int argc, char **argv) open++; } } - if (bumblebee || (optind == argc && open == 0)) { + if (bumblebee || (optind == argc && !all)) { ret = last_display_clone(&ctx, bumblebee_open(&ctx)); if (ret && ret != -EBUSY) { if (bumblebee) |