aboutsummaryrefslogtreecommitdiff
path: root/trayfreq_set/trayfreq_set.c
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-04-04 16:47:50 +1300
committerDavid <dbphillipsnz@gmail.com>2014-04-04 16:47:50 +1300
commite55f3d0ced6cd8a30caefc3e2f6eeacd080a1626 (patch)
treecc99a2cf95fc5dc09d1eaffa7fa24de674fa509a /trayfreq_set/trayfreq_set.c
parent3259ddd1e74e88642913c2b6facc1377ac875a9e (diff)
downloadparamano-e55f3d0ced6cd8a30caefc3e2f6eeacd080a1626.tar.xz
Quick error message fix
Diffstat (limited to 'trayfreq_set/trayfreq_set.c')
-rw-r--r--trayfreq_set/trayfreq_set.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/trayfreq_set/trayfreq_set.c b/trayfreq_set/trayfreq_set.c
index d90717a..75b37f0 100644
--- a/trayfreq_set/trayfreq_set.c
+++ b/trayfreq_set/trayfreq_set.c
@@ -23,6 +23,8 @@
#include "../freq_tray/getfreq.h"
#include "../freq_tray/getcore.h"
+#define ERRMSG "FAILED: Couldn't open %s for writing\n"
+
void set_freq_max(char* freq, char* core)
{
char file_path[100];
@@ -33,6 +35,8 @@ void set_freq_max(char* freq, char* core)
{
fprintf(fd, freq);
fclose(fd);
+ } else {
+ printf(ERRMSG,file_path);
}
}
@@ -46,6 +50,8 @@ void set_freq_min(char* freq, char* core)
{
fprintf(fd, freq);
fclose(fd);
+ } else {
+ printf(ERRMSG,file_path);
}
}
@@ -59,6 +65,8 @@ static void set_speed(char* freq, char* core)
{
fprintf(fd, freq);
fclose(fd);
+ } else {
+ printf(ERRMSG,file_path);
}
}
@@ -72,6 +80,8 @@ void set_gov(char* gov, char* core)
{
fprintf(fd, gov);
fclose(fd);
+ } else {
+ printf(ERRMSG,file_path);
}
}