summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-08-09 16:01:49 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-09-08 14:26:27 +1000
commit9f42e56fc5968fcb34edfad017adb73960c2bb61 (patch)
tree1114b3ed7f7fe9b36e1176268e611e69ed31d1f0 /utils
parente4a641a6e3133158b003d19ee285cfc37164cb1f (diff)
downloadpetitboot-9f42e56fc5968fcb34edfad017adb73960c2bb61.zip
petitboot-9f42e56fc5968fcb34edfad017adb73960c2bb61.tar.gz
Use 'consoles' instead of 'tty' to refer to interfaces
'Console' is more readily understandable and technically more correct than 'tty' for referring to the interfaces that Petitboot starts a UI on. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/hooks/30-add-offb.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/utils/hooks/30-add-offb.c b/utils/hooks/30-add-offb.c
index e5947ca..eca9d13 100644
--- a/utils/hooks/30-add-offb.c
+++ b/utils/hooks/30-add-offb.c
@@ -500,40 +500,43 @@ static char *get_vga_path(struct offb_ctx *ctx)
static int set_stdout(struct offb_ctx *ctx)
{
- const char *boot_tty, *ptr;
+ const char *boot_console, *ptr;
long unsigned int termno;
const fdt32_t *prop;
int node, prop_len;
char *stdout_path;
- boot_tty = getenv("boot_tty");
- if (!boot_tty) {
- fprintf(stderr, "boot_tty not set, using default stdout for boot\n");
+ boot_console = getenv("boot_console");
+ if (!boot_console) {
+ fprintf(stderr, "boot_console not set, using default stdout for boot\n");
return 0;
}
- if (strstr(boot_tty, "tty") != NULL) {
- fprintf(stderr, "TTY recognised: %s\n", boot_tty);
+ if (strstr(boot_console, "tty") != NULL) {
+ fprintf(stderr, "TTY recognised: %s\n", boot_console);
stdout_path = get_vga_path(ctx);
} else {
- ptr = strstr(boot_tty, "hvc");
+ ptr = strstr(boot_console, "hvc");
if (!ptr || strlen(ptr) <= strlen("hvc")) {
- fprintf(stderr, "Unrecognised console: %s\n", boot_tty);
+ fprintf(stderr, "Unrecognised console: %s\n",
+ boot_console);
return 0;
}
ptr += strlen("hvc");
errno = 0;
termno = strtoul(ptr, NULL, 0);
if (errno) {
- fprintf(stderr, "Couldn't parse termno from %s\n", boot_tty);
+ fprintf(stderr, "Couldn't parse termno from %s\n",
+ boot_console);
return 0;
}
- fprintf(stderr, "HVC recognised: %s\n", boot_tty);
+ fprintf(stderr, "HVC recognised: %s\n", boot_console);
stdout_path = get_hvc_path(ctx, termno);
}
if (!stdout_path) {
- fprintf(stderr, "Couldn't parse %s into a path\n", boot_tty);
+ fprintf(stderr, "Couldn't parse %s into a path\n",
+ boot_console);
return -1;
}
OpenPOWER on IntegriCloud