From 1083e67d45cd44824e346fe13a3b7d69b174002e Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Thu, 24 Mar 2016 23:58:14 +0100 Subject: [PATCH] Fix sysinstall videomode creation. --- sysinstall/sysinstall.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sysinstall/sysinstall.c b/sysinstall/sysinstall.c index b2074a7d..29c4025e 100644 --- a/sysinstall/sysinstall.c +++ b/sysinstall/sysinstall.c @@ -421,7 +421,7 @@ int main(void) while ( true ) { prompt(input, sizeof(input), - "Select default display resolution? (yes/no)", "yes"); + "Select a default display resolution? (yes/no)", "yes"); if ( strcasecmp(input, "no") && strcasecmp(input, "yes") ) continue; bool was_no = strcasecmp(input, "no") == 0; @@ -446,18 +446,19 @@ int main(void) get_mode.mode.fb_format); break; } + + if ( !input[0] ) + text("/etc/videomode will not be created.\n"); + else + { + textf("/etc/videomode will be set to \"%s\".\n", input); + mode_t old_umask = getumask(); + umask(022); + install_configurationf("videomode", "w", "%s\n", input); + umask(old_umask); + } + text("\n"); } - if ( !input[0] ) - text("/etc/videomode will not be created.\n"); - else - { - textf("/etc/videomode will be set to \"%s\".\n", input); - mode_t old_umask = getumask(); - umask(022); - install_configurationf("videomode", "w", "%s\n", input); - umask(old_umask); - } - text("\n"); scan_devices();