Skip to content

Commit

Permalink
disk: fix migrate scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-levan committed Jul 12, 2023
1 parent 0eaba9a commit 3c8c0b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/vere/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,8 @@ u3_disk_need_migrate(u3_disk* log_u)
c3_c dut_c[8193];
snprintf(dut_c, sizeof(dut_c), "%s/data.mdb", log_u->com_u->pax_c);
if ( !_(u3_Host.ops_u.nuu)
&& 0 != access(dut_c, R_OK) ) {
// if .urb/log/data.mdb is not readable, skip migration
&& 0 != access(dut_c, F_OK) ) {
// if .urb/log/data.mdb does not exist, skip migration
return c3n;
}

Expand Down
3 changes: 0 additions & 3 deletions pkg/vere/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,9 +2153,6 @@ _cw_play_exit(c3_i int_i)
static void
_cw_play_impl(c3_d eve_d, c3_d sap_d, c3_o mel_o, c3_o sof_o, c3_o ful_o)
{
// XX factor this into its own function for calling here and
// from main() (urbit play and boot replay)

// XX handle SIGTSTP so that the lockfile is not orphaned?
//
u3_disk* log_u;
Expand Down
2 changes: 1 addition & 1 deletion pkg/vere/pier.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ _pier_init(c3_w wag_w, c3_c* pax_c)
.write_bail_f = _pier_on_disk_write_bail
};

if ( !(pir_u->log_u = u3_disk_init(pax_c, cb_u, c3n)) ) {
if ( !(pir_u->log_u = u3_disk_init(pax_c, cb_u, c3y)) ) {
c3_free(pir_u);
return 0;
}
Expand Down

0 comments on commit 3c8c0b2

Please sign in to comment.