Merge branch 'master' into ccr-noun-clean

* master:
  Update link to docs for swap space help
  Add `git` to default.nix dependencies
  Handle trailing newline in keyfile.
This commit is contained in:
Joe Bryan 2019-05-02 10:40:57 -07:00
commit 46b14af63b
2 changed files with 19 additions and 2 deletions

View File

@ -1590,7 +1590,8 @@ u3m_init(void)
-1, 0);
u3l_log("boot: mapping %dMB failed\r\n", (len_w / (1024 * 1024)));
u3l_log("see urbit.org/docs/getting-started#swap for adding swap space\r\n");
u3l_log("see urbit.org/docs/getting-started/installing-urbit/#swap"
"for adding swap space\r\n");
if ( -1 != (c3_ps)map_v ) {
u3l_log("if porting to a new platform, try U3_OS_LoomBase %p\r\n",
dyn_v);
@ -1634,7 +1635,8 @@ _cm_init_new(void)
-1, 0);
u3l_log("boot: mapping %dMB failed\r\n", (len_w / (1024 * 1024)));
u3l_log("see urbit.org/docs/using/install to add swap space\r\n");
u3l_log("see urbit.org/docs/getting-started/installing-urbit/#swap"
"for adding swap space\r\n");
if ( -1 != (c3_ps)map_v ) {
u3l_log("if porting to a new platform, try U3_OS_LoomBase %p\r\n",
dyn_v);

View File

@ -654,6 +654,21 @@ _boothack_doom(void)
if ( 0 != u3_Host.ops_u.key_c ) {
kef = u3m_file(u3_Host.ops_u.key_c);
// handle trailing newline
//
{
c3_c* key_c = u3r_string(kef);
c3_w len_w = strlen(key_c);
if (len_w && (key_c[len_w - 1] == '\n')) {
key_c[len_w - 1] = '\0';
u3z(kef);
kef = u3i_string(key_c);
}
c3_free(key_c);
}
}
else if ( 0 != u3_Host.ops_u.gen_c ) {
kef = u3i_string(u3_Host.ops_u.gen_c);