applog/quit fix GPU errors created
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
diff --git a/adl.c b/adl.c
index 41b0942..928efe0 100644
--- a/adl.c
+++ b/adl.c
@@ -1343,7 +1343,7 @@ updated:
wlogprint("Failed to modify engine clock speed\n");
} else if (!strncasecmp(&input, "f", 1)) {
get_fanrange(gpu, &imin, &imax);
- wlogprint("Enter fan percentage (%d - %d %)", imin, imax);
+ wlogprint("Enter fan percentage (%d - %d %%)", imin, imax);
val = curses_int("");
if (val < imin || val > imax) {
wlogprint("Value is outside safe range, are you sure?\n");
diff --git a/api.c b/api.c
index 0d35fc6..f6f0a43 100644
--- a/api.c
+++ b/api.c
@@ -126,7 +126,6 @@ char *WSAErrorMsg(void) {
#endif
static const char *UNAVAILABLE = " - API will not be available";
-static const char *INVAPIGROUPS = "Invalid --api-groups parameter";
static const char *BLANK = "";
static const char *COMMA = ",";
@@ -3587,30 +3586,21 @@ static void setup_groups()
colon = strchr(ptr, ':');
if (colon)
*colon = '\0';
- applog(LOG_WARNING, "API invalid group name '%s'", ptr);
- quit(1, INVAPIGROUPS);
+ quit(1, "API invalid group name '%s'", ptr);
}
group = GROUP(*ptr);
- if (!VALIDGROUP(group)) {
- applog(LOG_WARNING, "API invalid group name '%c'", *ptr);
- quit(1, INVAPIGROUPS);
- }
+ if (!VALIDGROUP(group))
+ quit(1, "API invalid group name '%c'", *ptr);
- if (group == PRIVGROUP) {
- applog(LOG_WARNING, "API group name can't be '%c'", PRIVGROUP);
- quit(1, INVAPIGROUPS);
- }
+ if (group == PRIVGROUP)
+ quit(1, "API group name can't be '%c'", PRIVGROUP);
- if (group == NOPRIVGROUP) {
- applog(LOG_WARNING, "API group name can't be '%c'", NOPRIVGROUP);
- quit(1, INVAPIGROUPS);
- }
+ if (group == NOPRIVGROUP)
+ quit(1, "API group name can't be '%c'", NOPRIVGROUP);
- if (apigroups[GROUPOFFSET(group)].commands != NULL) {
- applog(LOG_WARNING, "API duplicate group name '%c'", *ptr);
- quit(1, INVAPIGROUPS);
- }
+ if (apigroups[GROUPOFFSET(group)].commands != NULL)
+ quit(1, "API duplicate group name '%c'", *ptr);
ptr += 2;
@@ -3644,8 +3634,7 @@ static void setup_groups()
*cmd = '\0';
}
} else {
- applog(LOG_WARNING, "API unknown command '%s' in group '%c'", ptr, group);
- quit(1, INVAPIGROUPS);
+ quit(1, "API unknown command '%s' in group '%c'", ptr, group);
}
}
diff --git a/driver-opencl.c b/driver-opencl.c
index b406a75..3c10c70 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -685,7 +685,7 @@ retry:
if (powertune != -1)
tailsprintf(logline, "P: %d%%", powertune);
tailsprintf(logline, "\n");
- wlog(logline);
+ _wlog(logline);
}
}
#endif