summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd-3.16/0005-suppress-text-in-binary.patch
blob: 34c99245115e9d3f8c5d78ca5d622ea5cd33e95b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -u old/gpsctl.c new/gpsctl.c
--- old/gpsctl.c	2017-01-03 15:57:50.517120891 -0600
+++ new/gpsctl.c	2017-01-03 15:58:05.025120861 -0600
@@ -175,7 +175,7 @@
     int option, status;
     char *device = NULL, *devtype = NULL;
     char *speed = NULL, *control = NULL, *rate = NULL;
-    bool to_binary = false, to_nmea = false, reset = false;
+    bool to_binary = false, to_nmea = false, reset = false, cstring = false;
     bool lowlevel=false, echo=false;
     struct gps_data_t gpsdata;
     const struct gps_type_t *forcetype = NULL;
@@ -205,6 +205,7 @@
 #ifdef CONTROLSEND_ENABLE
 	    control = optarg;
 	    lowlevel = true;
+	    cstring = true;
 	    if ((cooklen = hex_escapes(cooked, control)) <= 0) {
 		gpsd_log(&context.errout, LOG_ERROR,
 			 "invalid escape string (error %d)\n", (int)cooklen);
@@ -443,7 +444,7 @@
 	}
 
 	/* if no control operation was specified, just ID the device */
-	if (speed==NULL && rate == NULL && !to_nmea && !to_binary && !reset) {
+	if (speed==NULL && rate == NULL && !to_nmea && !to_binary && !reset && !cstring) {
 	    (void)printf("%s identified as a %s",
 			 gpsdata.dev.path, gpsdata.dev.driver);
 	    if (gpsdata.dev.subtype[0] != '\0') {