summaryrefslogtreecommitdiffstats
path: root/binding/radio_impl_rtlsdr.c
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-11-29 09:47:14 +0100
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-12-02 12:05:48 +0000
commit9b5ca97855494c9f9c4c80427400539d71c65759 (patch)
treeec536ad71ca36474128b732cdeb4086ecf708cb5 /binding/radio_impl_rtlsdr.c
parent8239d20cc9ee88ca052060589ec8bf9e66cda6a3 (diff)
Migration to binding V3icefish_8.99.2icefish/8.99.28.99.2
Bug-AGL: SPEC-2745 Change-Id: I5ee9d3118a302f0edf5fe79a43590818d3d829c3 Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'binding/radio_impl_rtlsdr.c')
-rw-r--r--binding/radio_impl_rtlsdr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/binding/radio_impl_rtlsdr.c b/binding/radio_impl_rtlsdr.c
index 044da0e..62ec623 100644
--- a/binding/radio_impl_rtlsdr.c
+++ b/binding/radio_impl_rtlsdr.c
@@ -178,7 +178,7 @@ static int rtlsdr_init(void)
if(!helper_path)
return -ENOMEM;
if(snprintf(helper_path, HELPER_MAX, "%s/bin/%s --detect", rootdir, HELPER_NAME) == HELPER_MAX) {
- AFB_ERROR("Could not create command for \"%s --detect\"", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Could not create command for \"%s --detect\"", HELPER_NAME);
return -EINVAL;
}
if(system(helper_path) != 0) {
@@ -316,7 +316,7 @@ static int rtlsdr_start_helper(void)
if(helper_output) {
// Indicate desired output to helper
- AFB_INFO("Setting RADIO_OUTPUT=%s", helper_output);
+ AFB_API_INFO(afbBindingV3root, "Setting RADIO_OUTPUT=%s", helper_output);
setenv("RADIO_OUTPUT", helper_output, 1);
}
@@ -325,15 +325,15 @@ static int rtlsdr_start_helper(void)
if(!helper_path)
return -ENOMEM;
if(snprintf(helper_path, PATH_MAX, "%s/bin/%s", rootdir, HELPER_NAME) == PATH_MAX) {
- AFB_ERROR("Could not create path to %s", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Could not create path to %s", HELPER_NAME);
return -EINVAL;
}
helper_pid = popen2(helper_path, &helper_out, &helper_in);
if(helper_pid < 0) {
- AFB_ERROR("Could not run %s!", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Could not run %s!", HELPER_NAME);
return -1;
}
- AFB_DEBUG("%s started", HELPER_NAME);
+ AFB_API_DEBUG(afbBindingV3root, "%s started", HELPER_NAME);
helper_started = true;
free(helper_path);
@@ -359,7 +359,7 @@ static void rtlsdr_start(void)
rc = write(helper_in, cmd, strlen(cmd));
pthread_mutex_unlock(&helper_mutex);
if (rc < 0) {
- AFB_ERROR("Failed to ask \"%s\" to start", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Failed to ask \"%s\" to start", HELPER_NAME);
return;
}
active = true;
@@ -381,7 +381,7 @@ static void rtlsdr_stop(void)
rc = write(helper_in, cmd, strlen(cmd));
pthread_mutex_unlock(&helper_mutex);
if (rc < 0) {
- AFB_ERROR("Failed to ask \"%s\" to stop", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Failed to ask \"%s\" to stop", HELPER_NAME);
return;
}
active = false;
@@ -454,7 +454,7 @@ static void rtlsdr_scan_stop(void)
rc = write(helper_in, cmd, strlen(cmd));
pthread_mutex_unlock(&helper_mutex);
if (rc < 0)
- AFB_ERROR("Failed to ask \"%s\" to stop scan", HELPER_NAME);
+ AFB_API_ERROR(afbBindingV3root, "Failed to ask \"%s\" to stop scan", HELPER_NAME);
}
static radio_stereo_mode_t rtlsdr_get_stereo_mode(void)