]>
sigrok.org Git - sigrok-cli.git/log
poljar (Damir Jelić) [Thu, 14 Nov 2013 19:01:18 +0000 (20:01 +0100)]
sigrok-cli: Fix two memory leaks in parse_probestring().
This patch fixes two memory leaks if multiple probe names or probe ranges are
specified.
Bert Vermeulen [Thu, 7 Nov 2013 21:46:40 +0000 (22:46 +0100)]
Use annotation-specific struct
Uwe Hermann [Mon, 11 Nov 2013 09:03:03 +0000 (10:03 +0100)]
Revert "Use annotation-specific struct".
This reverts commit
fa498bbb3baf5d9bf62fe0e013aaf434cb2732fd (which
was accidentally committed).
Bert Vermeulen [Mon, 11 Nov 2013 08:40:15 +0000 (09:40 +0100)]
Update man page for --probe-group
Bert Vermeulen [Thu, 7 Nov 2013 21:46:40 +0000 (22:46 +0100)]
Use annotation-specific struct
Bert Vermeulen [Sun, 3 Nov 2013 13:18:19 +0000 (14:18 +0100)]
Report options requiring probe groups by passing them in if given
Bert Vermeulen [Sat, 2 Nov 2013 21:44:14 +0000 (22:44 +0100)]
New --probe-group option
Devices that don't use probe groups don't need this option at all;
it only needs to be specified when using a device that has probe
groups, and then only for options that require it.
Bert Vermeulen [Sat, 2 Nov 2013 21:43:32 +0000 (22:43 +0100)]
Report probe groups with --show
Bert Vermeulen [Sat, 2 Nov 2013 02:20:47 +0000 (03:20 +0100)]
Probe group API fixes
Bert Vermeulen [Fri, 1 Nov 2013 01:38:50 +0000 (02:38 +0100)]
Use new probe_groups API
poljar (Damir Jelić) [Wed, 30 Oct 2013 22:04:02 +0000 (23:04 +0100)]
sigrok-cli: Fix leaks in device_scan().
If a bogus driver name is specified on the command line or for some reason we
fail to initialize a driver device_scan() leaks data.
This patch adds appropriate free calls.
Bert Vermeulen [Wed, 30 Oct 2013 21:39:00 +0000 (22:39 +0100)]
Adjust to libsigrokdecode API changes
Bert Vermeulen [Wed, 30 Oct 2013 13:39:59 +0000 (14:39 +0100)]
Actually exit when a fatal error is logged
Bert Vermeulen [Thu, 12 Sep 2013 22:02:23 +0000 (00:02 +0200)]
Use the new libsigrokdecode session API
Matt Ranostay [Wed, 11 Sep 2013 05:38:05 +0000 (22:38 -0700)]
sigrok-cli: Allow both hex and decimals parameters
When strtoll() base parameter is set to 0 it can handle both hex and
decimals values.
Signed-off-by: Matt Ranostay <redacted>
Uwe Hermann [Sun, 8 Sep 2013 17:59:05 +0000 (19:59 +0200)]
Fix issue with optional PD probes.
Running (or showing info about) PDs with optional probes was not working
and causing segfaults.
The reason was a g_slist_concat() call that was applied to a list,
whereas it needs to be applied to a copy of the list.
This fixes #138.
Bert Vermeulen [Thu, 5 Sep 2013 22:30:38 +0000 (00:30 +0200)]
List dummy "sigrok" file format, and accept it as option
See bug 131
Marc Schink [Mon, 5 Aug 2013 12:40:23 +0000 (14:40 +0200)]
Remove datafeed callbacks to prevent memory leak.
Bert Vermeulen [Mon, 2 Sep 2013 09:28:22 +0000 (11:28 +0200)]
Avoid trying to save to a file if there's nothing to save
This works around the division by zero when trying to save analog
data.
Uwe Hermann [Wed, 31 Jul 2013 20:16:33 +0000 (22:16 +0200)]
NEWS: Fix typo in the year.
Thanks codyps1 on IRC for the report.
Bert Vermeulen [Thu, 20 Jun 2013 15:06:42 +0000 (17:06 +0200)]
More generic handling of SR_T types, and SR_T_UINT64 support
Uwe Hermann [Thu, 13 Jun 2013 23:50:39 +0000 (01:50 +0200)]
manpage: Escape minus characters.
Bert Vermeulen [Thu, 9 May 2013 11:49:37 +0000 (13:49 +0200)]
Fix error message and compiler warning
Thanks to Christian Deussen for the patch.
Bert Vermeulen [Tue, 7 May 2013 13:46:29 +0000 (15:46 +0200)]
Fix various memory leaks
Uwe Hermann [Sat, 4 May 2013 19:37:41 +0000 (21:37 +0200)]
configure.ac: Update version number to 0.4.0.
Uwe Hermann [Sat, 4 May 2013 13:51:06 +0000 (15:51 +0200)]
NEWS: Add changes since the last release.
Uwe Hermann [Fri, 3 May 2013 18:42:41 +0000 (20:42 +0200)]
Adapt to new <libsigrokdecode/libsigrokdecode.h> header.
Uwe Hermann [Fri, 3 May 2013 17:53:09 +0000 (19:53 +0200)]
sigrok-cli depends on libsigrokdecode >= 0.2.0.
Bert Vermeulen [Tue, 30 Apr 2013 13:15:13 +0000 (15:15 +0200)]
Update man page
Bert Vermeulen [Tue, 30 Apr 2013 11:58:04 +0000 (13:58 +0200)]
Update cmdline options to better reflect functionality
Bert Vermeulen [Mon, 29 Apr 2013 22:07:16 +0000 (00:07 +0200)]
Remove anykey input source after it fired
Bert Vermeulen [Sun, 28 Apr 2013 23:14:43 +0000 (01:14 +0200)]
Fix error message
Bert Vermeulen [Sat, 27 Apr 2013 15:34:00 +0000 (17:34 +0200)]
Use new output API receive() function
Bert Vermeulen [Mon, 22 Apr 2013 23:15:32 +0000 (01:15 +0200)]
Open device before adding it to the session
Uwe Hermann [Tue, 23 Apr 2013 20:10:41 +0000 (22:10 +0200)]
GPL headers: Use correct project name.
Uwe Hermann [Tue, 23 Apr 2013 19:39:46 +0000 (21:39 +0200)]
README: Add "Copyright and license" section.
Uwe Hermann [Mon, 22 Apr 2013 11:46:13 +0000 (13:46 +0200)]
Add NSIS file for use with cross-compiled sigrok-cli.
Bert Vermeulen [Wed, 17 Apr 2013 23:17:20 +0000 (01:17 +0200)]
Show driver name and optional conn string
Martin Ling [Mon, 15 Apr 2013 20:17:23 +0000 (21:17 +0100)]
Update for libsigrok datafeed callback API changes.
Uwe Hermann [Mon, 15 Apr 2013 10:35:51 +0000 (12:35 +0200)]
Small variable naming fix to avoid confusion.
Uwe Hermann [Mon, 15 Apr 2013 10:30:31 +0000 (12:30 +0200)]
configure.ac: Show $build, $host, and lib versions.
Bert Vermeulen [Sun, 7 Apr 2013 19:04:35 +0000 (21:04 +0200)]
SR_CONF_TIMEBASE and _VDIVS lists are now an array of tuples
Bert Vermeulen [Sun, 31 Mar 2013 08:21:11 +0000 (10:21 +0200)]
More GVariant conversions
Bert Vermeulen [Sat, 30 Mar 2013 14:44:56 +0000 (15:44 +0100)]
fix options setting to use GVariant
Bert Vermeulen [Sat, 30 Mar 2013 14:28:28 +0000 (15:28 +0100)]
avoid deprecated struct sr_rational
Bert Vermeulen [Tue, 26 Mar 2013 21:09:28 +0000 (22:09 +0100)]
More GVariant conversions
Bert Vermeulen [Mon, 25 Mar 2013 19:55:42 +0000 (20:55 +0100)]
Adjust to GVariant-based sr_config_* functions
Bert Vermeulen [Tue, 19 Mar 2013 15:20:08 +0000 (16:20 +0100)]
fix time-based limit logic
Bert Vermeulen [Tue, 19 Mar 2013 00:57:52 +0000 (01:57 +0100)]
use new libsigrok GVariant-based option/probe passing
Uwe Hermann [Sun, 17 Mar 2013 12:02:09 +0000 (13:02 +0100)]
README: Refer to INSTALL and new Building wiki page.
Uwe Hermann [Sun, 17 Mar 2013 12:09:35 +0000 (13:09 +0100)]
autotools: Don't use "foreign" option.
This adds INSTALL and allows for a few more sanity checks being done.
Bert Vermeulen [Sat, 16 Mar 2013 20:51:32 +0000 (21:51 +0100)]
show SR_CONF_SAMPLE_INTERVAL (debug)
Bert Vermeulen [Tue, 12 Mar 2013 21:49:16 +0000 (22:49 +0100)]
make libsigrokdecode optional
Only if you really need to compile without libsigrokdecode.
Bert Vermeulen [Mon, 11 Mar 2013 15:30:14 +0000 (16:30 +0100)]
support for live status of SR_CONF_DATALOG
Bert Vermeulen [Mon, 11 Mar 2013 15:29:27 +0000 (16:29 +0100)]
add --set option
Bert Vermeulen [Mon, 11 Mar 2013 14:32:45 +0000 (15:32 +0100)]
dump obsolete multiple-device leftover code
Bert Vermeulen [Tue, 5 Mar 2013 20:48:34 +0000 (21:48 +0100)]
fix SR_DF_END flow
Output modules were getting SR_DF_END after their object was already
free()d, and the output channel closed.
Bert Vermeulen [Tue, 5 Mar 2013 20:31:50 +0000 (21:31 +0100)]
properly check for result after output module data()
Bert Vermeulen [Fri, 22 Feb 2013 21:21:39 +0000 (22:21 +0100)]
use input API properly
Uwe Hermann [Tue, 5 Feb 2013 17:23:02 +0000 (18:23 +0100)]
Update, fix, and extend manpage.
- Probe indices start at 0 now (not 1).
- Update manpage date.
- Mention the 'analog' output format.
- Various smaller cosmetic fixes.
- Add more examples for some options.
- Document all possible suffixes for --time/--samples values.
- Mention the PulseView(1) manpage in "SEE ALSO".
- Mention Bugzilla for bugreports.
Bert Vermeulen [Fri, 25 Jan 2013 19:42:43 +0000 (20:42 +0100)]
Use sr_dev_has_option() where appropriate.
Bert Vermeulen [Fri, 25 Jan 2013 15:21:04 +0000 (16:21 +0100)]
Use sr_dev_has_option().
Bert Vermeulen [Fri, 25 Jan 2013 14:49:21 +0000 (15:49 +0100)]
Use sr_config_get().
Bert Vermeulen [Fri, 25 Jan 2013 14:39:24 +0000 (15:39 +0100)]
Use sr_config_set()
Bert Vermeulen [Fri, 25 Jan 2013 14:10:22 +0000 (15:10 +0100)]
Deprecate SR_DI_HWOPTS.
Bert Vermeulen [Fri, 25 Jan 2013 14:02:30 +0000 (15:02 +0100)]
Deprecate SR_DI_HWCAPS.
Bert Vermeulen [Fri, 25 Jan 2013 10:52:55 +0000 (11:52 +0100)]
Deprecate SR_DI_TRIGGER_TYPES.
Bert Vermeulen [Fri, 25 Jan 2013 10:26:59 +0000 (11:26 +0100)]
Deprecate SR_DI_TRIGGER_SOURCES.
Bert Vermeulen [Fri, 25 Jan 2013 10:22:38 +0000 (11:22 +0100)]
Deprecate SR_DI_TIMEBASES.
Bert Vermeulen [Fri, 25 Jan 2013 10:20:01 +0000 (11:20 +0100)]
Deprecate SR_DI_FILTERS.
Bert Vermeulen [Fri, 25 Jan 2013 10:15:47 +0000 (11:15 +0100)]
Deprecate SR_DI_VDIVS.
Bert Vermeulen [Fri, 25 Jan 2013 10:04:57 +0000 (11:04 +0100)]
Deprecate SR_DI_COUPLING.
Bert Vermeulen [Fri, 25 Jan 2013 10:00:53 +0000 (11:00 +0100)]
Deprecate SR_DI_BUFFERSIZES.
Bert Vermeulen [Fri, 25 Jan 2013 02:39:18 +0000 (03:39 +0100)]
Deprecate SR_DI_PATTERNS.
Bert Vermeulen [Fri, 25 Jan 2013 02:18:27 +0000 (03:18 +0100)]
Deprecate SR_DI_CUR_SAMPLERATE.
Bert Vermeulen [Fri, 25 Jan 2013 02:04:59 +0000 (03:04 +0100)]
deprecate SR_DI_SAMPLERATES
Bert Vermeulen [Mon, 21 Jan 2013 22:24:18 +0000 (23:24 +0100)]
Use new SR_CONF_* keys.
Bert Vermeulen [Mon, 21 Jan 2013 21:00:29 +0000 (22:00 +0100)]
Use new sr_config_info*_get() calls.
Bert Vermeulen [Sun, 20 Jan 2013 14:29:28 +0000 (15:29 +0100)]
handle meta packets, specifically SR_HWCAP_SAMPLERATE
It's actually unused, but a good example of how to handle these.
Bert Vermeulen [Sun, 20 Jan 2013 04:55:36 +0000 (05:55 +0100)]
use new sr_config struct
Bert Vermeulen [Sun, 20 Jan 2013 04:20:55 +0000 (05:20 +0100)]
update to newer options
Uwe Hermann [Mon, 14 Jan 2013 10:17:20 +0000 (11:17 +0100)]
Makefile.am: Fix typo in 'ChangeLog' target.
Bert Vermeulen [Tue, 8 Jan 2013 13:11:49 +0000 (14:11 +0100)]
don't use the obsolete datastore.
This also removes the 64-probe limit.
Additionally, sigrok-cli now no longer requires a meta packet to be sent;
this was an entirely avoidable limitation.
Alexandru Gagniuc [Wed, 19 Dec 2012 07:31:58 +0000 (01:31 -0600)]
parserc.c: Fix memory leak from g_strsplit
g_strsplit() returns a newly-allocated NULL-terminated array of strings.
g_strfreev() must be used to free it, once it is no longer needed.
The probe 'names' were not freed properly, causing a "definitely lost" memory
leak.
Call g_strfreev(names) to properly free the memory.
Signed-off-by: Alexandru Gagniuc <redacted>
Alexandru Gagniuc [Thu, 20 Dec 2012 03:53:51 +0000 (21:53 -0600)]
sigrok-cli.c: Fix memory leak in parsing of hardware options
During parsing of hardware options, hash_to_hwopt() creates a GSList that is
passed to device_scan(). The list is discarded by device_scan() and never freed.
This is identified by valgrind as "definitely lost".
Call g_slist_free_full() on the list when it is no longer needed.
Signed-off-by: Alexandru Gagniuc <redacted>
Joel Holdsworth [Thu, 27 Dec 2012 12:08:51 +0000 (12:08 +0000)]
Corrected a comment typo
Bert Vermeulen [Tue, 1 Jan 2013 12:00:33 +0000 (13:00 +0100)]
clean up unused code
Bert Vermeulen [Tue, 1 Jan 2013 11:59:33 +0000 (12:59 +0100)]
use constified SRD decoder list
Bert Vermeulen [Fri, 28 Dec 2012 22:42:28 +0000 (23:42 +0100)]
fix device-specific options setting
Uwe Hermann [Fri, 28 Dec 2012 16:30:56 +0000 (17:30 +0100)]
configure.ac: Fix CFLAGS settings.
Don't override/overwrite CFLAGS in configure.ac, but rather amend it
with (currently) "-Wall -Wextra".
This properly allows users/packagers to do things like:
./configure (this will default to using "-g -O2" additionally)
CFLAGS="-g -O2" ./configure (same as above)
CFLAGS="" ./configure (no additional flags)
CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use)
etc. etc.
Joel Holdsworth [Tue, 18 Dec 2012 20:31:39 +0000 (20:31 +0000)]
Make datafeed_in packet parameter a const pointer
This patch corresponds to
bf53457d in libsigrok.
Peter Stuge [Sun, 21 Oct 2012 18:43:32 +0000 (20:43 +0200)]
Add struct sr_context * to sr_driver_init() calls
libsigrok.git commit
193691ae1590eb31025d943ffbb0ea5c1047e6ca changes
the API of sr_driver_init() to take a struct sr_context * parameter as
allocated by sr_init().
Move our struct sr_context *sr_ctx out of main() into file global scope
so that it can be used easily in all calls to sr_driver_init().
Uwe Hermann [Sun, 11 Nov 2012 17:17:52 +0000 (18:17 +0100)]
Drop unneeded comments.
Peter Stuge [Sun, 21 Oct 2012 18:43:32 +0000 (20:43 +0200)]
Add struct sr_context to the sr_init() and sr_exit() calls
libsigrok.git commit
b8072700c1bc7d13ba004fd897668b56cec4ac62 adds
struct sr_context to the public API, and changes sr_init() and sr_exit()
to take a struct sr_context ** and struct sr_context * parameter,
respectively.
struct sr_context is opaque, and all sr_init() and sr_exit() calls must
be balanced.
Thanks to the new struct sr_context * the error path code flow can also
be simplifed, and allow a single point in main() to clean up after any
possible program state.
Peter Stuge [Sun, 21 Oct 2012 18:52:41 +0000 (20:52 +0200)]
Change main() to have only one exit code flow, used also on errors
Peter Stuge [Sun, 21 Oct 2012 18:55:35 +0000 (20:55 +0200)]
Move sr_exit() in main() to correctly mirror order of initialization
Uwe Hermann [Tue, 16 Oct 2012 12:56:43 +0000 (14:56 +0200)]
Re-add HACKING file after repo split.
Bert Vermeulen [Sun, 14 Oct 2012 12:59:11 +0000 (14:59 +0200)]
Merge branch 'master' of ssh://sigrok.org/data/git/sigrok-cli
Bert Vermeulen [Sun, 14 Oct 2012 12:58:30 +0000 (14:58 +0200)]
more compact display of probe list
Bert Vermeulen [Sun, 14 Oct 2012 12:53:30 +0000 (14:53 +0200)]
don't accept numbers as probe indexes in probe string
Unless the driver actually names them by number -- but the comparison
is done by string now.
Syntax for --probes is unchanged; even a range like 0-7 still works,
but only if there really are probes named "0", "1" etc.