Skip to content

Commit

Permalink
host fst fix
Browse files Browse the repository at this point in the history
reported in c.e.a2 - when dropping into p8, fst_shutdown is called.  when returning to gs/os, fst_startup is NOT called.

This effective unmounts the host file system, permanently, since it assumed fst_startup would get called again.

fst_shutdown code now closes any open files but does not otherwise unmount.
  • Loading branch information
ksherlock authored and digarok committed May 11, 2019
1 parent a02f323 commit 5a21b96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/host_fst.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ static char *get_path2(void) {
}


/*
* shutdown is called when switching to p8.
* startup is ONLY called during initial boot.
*/

static word32 fst_shutdown(void) {

Expand All @@ -418,14 +422,16 @@ static word32 fst_shutdown(void) {
free_fd(head);
head = next;
}
host_shutdown();
//host_shutdown();
return 0;
}

static word32 fst_startup(void) {
// if restart, close any previous files.

fst_shutdown();
host_shutdown();

memset(&cookies, 0, sizeof(cookies));

return host_startup();
Expand Down

0 comments on commit 5a21b96

Please sign in to comment.