diff options
author | Dan Williams <dcbw@redhat.com> | 2008-12-16 09:30:21 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-12-16 09:30:21 -0500 |
commit | 6f85879c00a0a1471405e67205751187b579b354 (patch) | |
tree | 7def4fe43f8f0b6b242188ffb363f7bfc79e97c1 | |
parent | 65c6e90e49de338d0d18e38eda0e3f48a12999bb (diff) |
fixes
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | option-zerocd/61-option-zerocd.rules (renamed from option-zerocd/50-option-zerocd.rules) | 0 | ||||
-rw-r--r-- | probe-modem/Makefile.am | 4 | ||||
-rw-r--r-- | probe-modem/probe-modem.8 | 13 | ||||
-rw-r--r-- | probe-modem/probe-modem.c | 12 |
6 files changed, 21 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am index 119027a..10a088b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,2 @@ -SUBDIRS = probe-modem - -EXTRA_DIST = \ - CONTRIBUTING +SUBDIRS = probe-modem option-zerocd diff --git a/configure.ac b/configure.ac index 489e9b1..9818bcd 100644 --- a/configure.ac +++ b/configure.ac @@ -55,10 +55,14 @@ dnl Make sha1.c happy on big endian systems dnl AC_C_BIGENDIAN -PKG_CHECK_MODULES(GLIB, glib-2 >= 2.12) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.12) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12) +AC_SUBST(LIBUSB_CFLAGS) +AC_SUBST(LIBUSB_LIBS) + AC_ARG_ENABLE(more-warnings, AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), set_more_warnings="$enableval",set_more_warnings=yes) AC_MSG_CHECKING(for more warnings, including -Werror) @@ -91,6 +95,7 @@ fi AC_CONFIG_FILES([ Makefile probe-modem/Makefile +option-zerocd/Makefile ]) AC_OUTPUT diff --git a/option-zerocd/50-option-zerocd.rules b/option-zerocd/61-option-zerocd.rules index 5ec44a6..5ec44a6 100644 --- a/option-zerocd/50-option-zerocd.rules +++ b/option-zerocd/61-option-zerocd.rules diff --git a/probe-modem/Makefile.am b/probe-modem/Makefile.am index 7872d7d..f438962 100644 --- a/probe-modem/Makefile.am +++ b/probe-modem/Makefile.am @@ -1,9 +1,9 @@ -libudevdir = $(prefix)/lib/udev +libudevdir = $(libdir)/udev libudev_PROGRAMS = probe-modem probe_modem_SOURCES = probe-modem.c probe_modem_CPPFLAGS = $(GLIB_CFLAGS) -probe_modem_LDADD = $(GLIB_LDFLAGS) +probe_modem_LDADD = $(GLIB_LIBS) rulesdir = $(sysconfdir)/udev/ rules_DATA = 62-probe-modem-capabilities.rules diff --git a/probe-modem/probe-modem.8 b/probe-modem/probe-modem.8 index 158bac0..3370b1b 100644 --- a/probe-modem/probe-modem.8 +++ b/probe-modem/probe-modem.8 @@ -1,23 +1,26 @@ .TH EDD_ID 8 "November 2005" "" "Linux Administrator's Manual" .SH NAME -modem_caps \- udev callout to identify Hayes-compatible modem capabilities +probe-modem \- udev callout to identify Hayes-compatible modem capabilities .SH SYNOPSIS -.BI modem_caps +.BI probe-modem [\fI--export\fP] \fI<devpath>\fP .SH "DESCRIPTION" -.B modem_caps +.B probe-modem is normally called from a udev rule, to provide udev with the modem capabilities for Hayes-compatible modems. .SH USAGE -.B modem_caps +.B probe-modem opens the tty node specified at the commandline and prints the discovered modem capabilities. .SH OPTIONS The following commandline switches are supported to specify what modem_caps should print: .TP -.BI --export +.BI \-\-export print values as environment keys +.TP +.BI \-\-verbose +print debugging information .RE .SH SEE ALSO .BR udev (7) diff --git a/probe-modem/probe-modem.c b/probe-modem/probe-modem.c index 8ffe964..2d8f091 100644 --- a/probe-modem/probe-modem.c +++ b/probe-modem/probe-modem.c @@ -23,8 +23,6 @@ #include <glib.h> -#include "../../udev.h" - #define MODEM_CAP_GSM 0x0001 /* GSM */ #define MODEM_CAP_IS707_A 0x0002 /* CDMA Circuit Switched Data */ #define MODEM_CAP_IS707_P 0x0004 /* CDMA Packet Switched Data */ @@ -298,10 +296,10 @@ static int modem_probe_caps(int fd) return ret; } -void +static void print_usage (void) { - printf("Usage: modem_caps [options] <device>\n" + printf("Usage: probe-modem [options] <device>\n" " --export export key/value pairs\n" " --verbose print verbose debugging output\n" " --help\n\n"); @@ -318,10 +316,8 @@ main(int argc, char *argv[]) }; const char *device = NULL; - int i; gboolean export = 0; struct termios orig, attrs; - char *udi; int fd, caps; while (1) { @@ -389,7 +385,7 @@ main(int argc, char *argv[]) g_print ("ID_MODEM_GSM=1\n"); if (caps & MODEM_CAP_IS707_A) g_print ("ID_MODEM_IS707_A=1\n"); - if (caps & MODEM_CAP_IS707P) + if (caps & MODEM_CAP_IS707_P) g_print ("ID_MODEM_IS707P=1\n"); if (caps & MODEM_CAP_IS856) g_print ("ID_MODEM_IS856=1\n"); @@ -398,7 +394,7 @@ main(int argc, char *argv[]) } else { g_print ("%s: caps 0x%X%s%s%s%s\n", device, caps, caps & MODEM_CAP_GSM ? " GSM" : "", - caps & (MODEM_CAP_IS707_A | MODEM_CAP_IS707P) ? " CDMA-1x" : "", + caps & (MODEM_CAP_IS707_A | MODEM_CAP_IS707_P) ? " CDMA-1x" : "", caps & MODEM_CAP_IS856 ? " EVDOr0" : "", caps & MODEM_CAP_IS856_A ? " EVDOrA" : ""); } |