[PATCH v2 4/5] Move main_opts from gatttool.c to header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 attrib/gatttool.c    |   22 +---------------------
 attrib/gatttool.h    |   21 +++++++++++++++++++++
 attrib/interactive.c |    2 ++
 3 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index cd6e68a..badd3b0 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -49,27 +49,7 @@
 
 static GMainLoop *event_loop;
 static gboolean got_error = FALSE;
-
-static struct main_opts {
-	gchar *src;
-	gchar *dst;
-	gchar *value;
-	gchar *sec_level;
-	uuid_t *uuid;
-	int start;
-	int end;
-	int handle;
-	int mtu;
-	int psm;
-	gboolean primary;
-	gboolean char_disc;
-	gboolean char_read;
-	gboolean listen;
-	gboolean char_desc;
-	gboolean le;
-	gboolean char_write;
-	gboolean interactive;
-} main_opts;
+static struct main_opts main_opts;
 
 struct characteristic_data {
 	GAttrib *attrib;
diff --git a/attrib/gatttool.h b/attrib/gatttool.h
index ed5d9d6..3dbe88b 100644
--- a/attrib/gatttool.h
+++ b/attrib/gatttool.h
@@ -21,4 +21,25 @@
  *
  */
 
+struct main_opts {
+	gchar *src;
+	gchar *dst;
+	gchar *value;
+	gchar *sec_level;
+	uuid_t *uuid;
+	int start;
+	int end;
+	int handle;
+	int mtu;
+	int psm;
+	gboolean primary;
+	gboolean char_disc;
+	gboolean char_read;
+	gboolean listen;
+	gboolean char_desc;
+	gboolean le;
+	gboolean char_write;
+	gboolean interactive;
+};
+
 int interactive(void);
diff --git a/attrib/interactive.c b/attrib/interactive.c
index 0653609..425a9b2 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <glib.h>
 
+#include <bluetooth/sdp.h>
+
 #include <readline/readline.h>
 #include <readline/history.h>
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux