Merge pull request #1002 from urbit/fix-events-error-logging

print error on failed syscall in _ce_patch_create()
This commit is contained in:
Keaton Dunsford 2018-06-18 11:08:12 -07:00 committed by GitHub
commit 76720288d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,11 +276,13 @@ _ce_patch_create(u3_ce_patch* pat_u)
snprintf(ful_c, 8192, "%s/.urb/chk/control.bin", u3P.dir_c);
if ( -1 == (pat_u->ctl_i = open(ful_c, O_RDWR | O_CREAT | O_EXCL, 0666)) ) {
perror(ful_c);
c3_assert(0);
}
snprintf(ful_c, 8192, "%s/.urb/chk/memory.bin", u3P.dir_c);
if ( -1 == (pat_u->mem_i = open(ful_c, O_RDWR | O_CREAT | O_EXCL, 0666)) ) {
perror(ful_c);
c3_assert(0);
}
}