[PATCH 10/11] weston-image --help works. Also help if no filename is given

Bill Spitzak spitzak at gmail.com
Tue Jul 8 21:17:13 PDT 2014


---
 clients/image.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/clients/image.c b/clients/image.c
index 112b93d..573117c 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -412,6 +412,11 @@ main(int argc, char *argv[])
 	int i;
 	int image_counter = 0;
 
+	if (argc <= 1 || argv[1][0]=='-') {
+		printf("Usage: %s image...\n", argv[0]);
+		return 1;
+	}
+
 	d = display_create(&argc, argv);
 	if (d == NULL) {
 		fprintf(stderr, "failed to create display: %m\n");
-- 
1.7.9.5



More information about the wayland-devel mailing list