mirror of
https://github.com/linux-msm/cdba.git
synced 2026-10-06 21:32:09 -07:00
treewide: Use stdio file descriptor constants
The numeric constants for stdout and stderr are used in a couple of places, replace them with the friendlier constants. Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
This commit is contained in:
1 parent
e6dcfc57df
commit
9785de94e9
2 files changed
+4
-4
No files matched your search
@@ -834,9 +834,9 @@ int main(int argc, char **argv)
|
||||
const char blue[] = "\033[94m";
|
||||
const char reset[] = "\033[0m";
|
||||
|
||||
write(2, blue, sizeof(blue) - 1);
|
||||
write(2, buf, n);
|
||||
write(2, reset, sizeof(reset) - 1);
|
||||
write(STDERR_FILENO, blue, sizeof(blue) - 1);
|
||||
write(STDERR_FILENO, buf, n);
|
||||
write(STDERR_FILENO, reset, sizeof(reset) - 1);
|
||||
|
||||
bump_inactivity_timer = true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ static int external_helper(struct external *ext, const char *command, bool on)
|
||||
switch (pid) {
|
||||
case 0:
|
||||
/* Do not clobber stdout with program messages or cdba will become confused */
|
||||
dup2(2, 1);
|
||||
dup2(STDERR_FILENO, STDOUT_FILENO);
|
||||
return execlp(ext->path, ext->path, ext->board, command, on ? "on": "off", NULL);
|
||||
case -1:
|
||||
return -1;
|
||||
|
||||
Reference in new issue
Block a user