summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrestez Dan Leonard <leonard.crestez@intel.com>2016-05-23 21:39:56 +0300
committerJonathan Cameron <jic23@kernel.org>2016-05-29 20:37:23 +0100
commit4f20d5927b8e900ff1c3ee590b700ca71cd3f3ca (patch)
treee0ade4f52598f2c8a8f110d7035f4724520b72e7
parent90e9a9500f16e60bf96c95cd6b74f84d56e12ef0 (diff)
iio: iio_generic_buffer: Cleanup when receiving signals
This will clean (disable buffer/trigger/channels) when doing something like a CTRL-C. Otherwise restarting generic_buffer requires a manual echo 0 > buffer/enable This also cleanup up all the code freeing string buffers at the end of main. We initialize all pointers to NULL so that cleanup can all be done under a single error label. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>