summaryrefslogtreecommitdiff
path: root/gpsctl.c
Commit message (Collapse)AuthorAgeFilesLines
* POSIX_C_SOURCE: Not just a linux define. 200112L is a minimum.Gary E. Miller2018-12-261-1/+4
| | | | Don't force _POSIX_C_SOURCE 200112L, just make it a minimum.
* gpsctl: fix busy loop waiting for deviceKian Karas2018-12-041-0/+6
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* gps_read(): fix some nasty buffer overruns and corruptions.Gary E. Miller2018-07-141-2/+2
| | | | | | | Now pass an optional message buffer to gps_read(). Finally the JSON display in cgps works. Thanks to Virgin Orbit for their support fixing this bug.
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* In gpsctl, fore timeout of 2 on u-blox.Eric S. Raymond2017-09-191-0/+3
| | | | | If this turn out to work, we may have to add a timeout member to the device data structure.
* Fixes spurious error message from gpsctl -e.John Klug2017-03-171-3/+6
| | | | | | | Prevent message: (null) identified as a unknown, at 0 baud. which occurs in the control stream when the output is stdout (-c option).
* Explicit marking of ignoring fprintf() resultRobert Norris2017-02-201-1/+1
| | | | | | | | | Ensure consistent marking of '(void)' for most normal usage of fprintf() TESTED: 'scons build-all check' passes Signed-off-by: Fred Wright <fw@fwright.net>
* Shield FreeBSD from standards compliance.Gary E. Miller2016-09-071-3/+4
| | | | | gpsd now compiles, and runs scons check, with no warnings on FreeBSD.
* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999Gary E. Miller2016-08-161-0/+2
| | | | | Sad, C99 did not actually standardize the defines to invoke the standard.
* __DARWIN_C_LEVEL and _DARWIN_C_SOURCE to silence some warnings.Gary E. Miller2016-08-161-0/+3
| | | | vsnprintf() and strlcmp() are happier now.
* sys/ipc.h needs XOPEN_SOURCE 500Gary E. Miller2016-08-151-0/+6
| | | | XOPEN_SOURCE 500 means X/Open 1995. Seems saef enough.
* usleep() is removed from POSIX-2008. Replace with nanosleep()Gary E. Miller2016-08-151-1/+8
| | | | I sure hope I did not drop a zero anywhere...
* Change JSON line ending \n to \r\n.Gary E. Miller2016-04-251-2/+2
| | | | Seems to make gpsctl work better.
* Copy structs using assignment, not memcpy().Zbigniew Chyla2015-05-311-3/+1
|
* A gaggle of whitespace gaffs.Gary E. Miller2015-04-301-8/+8
|
* Revert "Copy structs using assignment, not memcpy()."Gary E. Miller2015-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | This reverts commit d1965788249d7e22cdde4021d452cf0dc6c6b9bd. This breaks my build on Gentoo running gcc 4.9.2 libgps_shm.c: In function 'int gps_shm_read(gps_data_t*)': libgps_shm.c:122:12: error: no match for 'operator=' (operand types are 'gps_data_t' and 'volatile gps_data_t') noclobber = shared->gpsdata; ^ libgps_shm.c:122:12: note: candidate is: In file included from gpsd.h:350:0, from libgps_shm.c:30: gps.h:1918:8: note: gps_data_t& gps_data_t::operator=(const gps_data_t&) struct gps_data_t { ^ gps.h:1918:8: note: no known conversion for argument 1 from 'volatile gps_data_t' to 'const gps_data_t&'
* Copy structs using assignment, not memcpy().Zbigniew Chyla2015-04-281-3/+1
|
* gpsctl now correctly identifies a PPS device in direct mode.Gary E. Miller2015-04-021-1/+9
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-31/+3
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* Clean up most spint errors. All regression tests pass.Eric S. Raymond2015-03-281-1/+1
|
* The last of: Line expects to suppress X errors, found 0 errorsGary E. Miller2015-03-251-1/+1
| | | | gpsd is now splint clean again.
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-132/+134
| | | | | | | | | | | | | | | | This change is done so we can add a "log" hook to the pps_thread_t structure (this is not done yet) and harmonize with the name of the outer logging function. If that name had been left as gpsd_report() there would have been scope for bad confusion with the report_hook member. Also, remove two stray duplicative printf calls from the NMEA2000 driver (drivers shouldn't have printfs!) and fix one typo. This is a step towards factoring out ntplib. For that to happen, the PPS thread code needs to be decoupled from the core session structure. No logic changes. Object compatibility preserved. All regression tests pass.
* Generqte -V messages in a uniform way.Eric S. Raymond2015-03-021-2/+2
| | | | All regression tests pass.
* Use pselect unconditionally. We're assuming POSIX-2001.1 conformance.Eric S. Raymond2015-03-021-9/+0
| | | | All regression tests pass.
* Repair the logic for setting a non-default SHM export segment.Eric S. Raymond2015-02-161-1/+1
| | | | | | Also, ensure this always happens within the regression-test driver. All regression tests pass.
* BSD compiler waening and splint cleanup.Eric S. Raymond2015-02-111-1/+1
|
* Implement and document GPSD_SHM_KEY environment variable.Eric S. Raymond2015-02-091-1/+1
|
* splint cleanup. All regressiion tests pass.Eric S. Raymond2015-02-091-1/+2
|
* Add -R option to gpsctl to remove SHM export segment, use in SConstruct.Eric S. Raymond2015-02-091-2/+26
| | | | All regression tests pass.
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-0/+4
|
* Always use sizeof to get array sizeZbigniew Chyla2015-01-131-1/+1
| | | | | | Don't use constant/expression from an array's definition when referring to its size. Eliminates redundancy and avoids problems when array size changes. The change doesn't affect generated code.
* Permit error messages from gpsctl again.Eric S. Raymond2014-09-201-0/+2
|
* Minimal option requires conditionalization of some code.Eric S. Raymond2014-09-061-0/+2
| | | | | All regression tests pass with default options (GPS tests are disabled with minimal on, because socket_export is off).
* splint/cppcheck cleanuo after the gpsd_report change.Eric S. Raymond2014-08-271-4/+2
| | | | All regression tests pass.
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-59/+59
| | | | All regression tests pass.
* Reverse linkage of gpsd_report() is abolished. All regression tests pass.Eric S. Raymond2014-08-271-11/+2
| | | | Some cleanup and testing is still required.
* More gpsd_report removal. All regression tests pass.Eric S. Raymond2014-08-271-1/+1
|
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-59/+59
| | | | | | | | | | | | | | | | ...with calls to gps_notify(), which indirects to its output method through a slot in an errout structure. Usually the errout structure lives inside the session context, but because struct errout_t is its own thing this does not have to be the case. One large clique of gpsd_notify() calls, in packet.c and isgps.c, looks at a struct errout_t copy in a lexer control block This change is not complete. Remnant gpsd_report calls need to be changed, and gpsmon needs to be tweaked so that the struct_error_t in its context is a non-defaukt hook updating the cuses display rather than simply dumping to stderr. Also the report label functionality needs to be added. All regression tests pass.
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-62/+62
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* Eliminate reverse linkage of gpsd_write. All regression tests pass.Eric S. Raymond2014-08-261-8/+0
|
* Fix trivial but fatal errors introduced by last commit.Eric S. Raymond2014-08-241-1/+1
| | | | All regtession tests pass. gpsmon works live on GR601-W (with PPS).
* Properly free devices when select() sees bad fds for them.Eric S. Raymond2014-08-241-4/+0
|
* Include <sys/select.h> everywhere fd_set us used.Eric S. Raymond2014-08-181-0/+1
| | | | | | | | This came up in connection with Android. According to SuS this shouln't be necessary if sys/time.h was included, but oh well. While we;re at it, rearrange some includes for more consistent order. All regression tests pass.
* Attempt to recover from EBADF in the main select.Eric S. Raymond2014-08-181-0/+8
| | | | All regression tests pass.
* Use the gps_errstr() to handle gps_open() errors.Michael Tatarinov2013-11-281-1/+1
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Investigating ways to get rid of CLOSE_DELAY in the test framework...Eric S. Raymond2013-11-271-0/+4
| | | | | | | | ...actually revealed a bug - device-shutdown messages getting lost on the way out to the test clients. This set of changes mostly fixes it. Some glitches remain; this state of things passes all regression tests but attempting to get rid of what now ought to be unnecessary code in fake.py does not pass. To be continued...
* Typo fix.Eric S. Raymond2013-11-131-6/+6
|
* In gpsctl, make client mode ID operation report the device subtype.Eric S. Raymond2013-11-131-5/+10
|
* Teach gpsctl to extract subtype information.Eric S. Raymond2013-11-131-13/+3
| | | | This degree of linger after packet sync is sufficient on a BU355 (SiRF-III).