reverse the direction of the monitor configuration flag
This makes ply image not configure the monitors by default, and
requires an explicit flag (--set-monitors) to enable it.
BUG=chrome-os-partner:26957
TEST=builds
CQ-DEPEND=CL:192411
Change-Id: Idc98ad4f9b13d21cbd98805d868333f860207a21
Reviewed-on: https://chromium-review.googlesource.com/192392
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/src/ply-image.c b/src/ply-image.c
index 663fb7e..9261136 100644
--- a/src/ply-image.c
+++ b/src/ply-image.c
@@ -312,7 +312,7 @@
" --help display this message\n"
" --location=X,Y image location relative to top left\n"
" corner of framebuffer\n"
- " --no-set-monitors don't turn off all non-main monitors\n"
+ " --set-monitors turn off all non-main monitors\n"
" --offset=[+|-]X,[+|-]Y image location as offset from center\n"
" of framebuffer\n"
" --print-resolution print space-separated framebuffer\n"
@@ -432,7 +432,7 @@
#define FLAG_GAMMA 'g'
#define FLAG_HELP 'h'
#define FLAG_LOCATION 'l'
-#define FLAG_NO_SET_MONITORS 'm'
+#define FLAG_SET_MONITORS 'm'
#define FLAG_OFFSET 'o'
#define FLAG_PRINT_RESOLUTION 'p'
@@ -443,7 +443,7 @@
{ "gamma", required_argument, NULL, FLAG_GAMMA },
{ "help", no_argument, NULL, FLAG_HELP },
{ "location", required_argument, NULL, FLAG_LOCATION },
- { "no-set-monitors", no_argument, NULL, FLAG_NO_SET_MONITORS },
+ { "set-monitors", no_argument, NULL, FLAG_SET_MONITORS },
{ "offset", required_argument, NULL, FLAG_OFFSET },
{ "print-resolution", no_argument, NULL, FLAG_PRINT_RESOLUTION },
{ NULL, 0, NULL, 0 },
@@ -511,8 +511,8 @@
continue;
}
- if (c == FLAG_NO_SET_MONITORS) {
- ply_monitor_set_monitors = false;
+ if (c == FLAG_SET_MONITORS) {
+ ply_monitor_set_monitors = true;
continue;
}
diff --git a/src/ply-monitor.c b/src/ply-monitor.c
index ad29bdc..e02b9e2 100644
--- a/src/ply-monitor.c
+++ b/src/ply-monitor.c
@@ -30,7 +30,7 @@
#include "ply-kms.h"
#include "ply-utils.h"
-bool ply_monitor_set_monitors = true;
+bool ply_monitor_set_monitors = false;
static drmModeCrtc *find_crtc_for_connector(int fd,
drmModeRes *resources,