mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
u3: ports minor noun/ cleanup
This commit is contained in:
parent
a8dadedebf
commit
5d4142eff8
@ -432,6 +432,7 @@ _ce_patch_verify(u3_ce_patch* pat_u)
|
|||||||
}
|
}
|
||||||
return c3n;
|
return c3n;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
c3_w nug_w = u3r_mug_words(mem_w, pag_wiz_i);
|
c3_w nug_w = u3r_mug_words(mem_w, pag_wiz_i);
|
||||||
|
|
||||||
|
@ -1946,6 +1946,10 @@ void
|
|||||||
u3m_stop()
|
u3m_stop()
|
||||||
{
|
{
|
||||||
u3je_secp_stop();
|
u3je_secp_stop();
|
||||||
|
|
||||||
|
// XX move to jets.c
|
||||||
|
//
|
||||||
|
c3_free(u3D.ray_u);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* u3m_boot(): start the u3 system. return next event, starting from 1.
|
/* u3m_boot(): start the u3 system. return next event, starting from 1.
|
||||||
|
@ -278,11 +278,19 @@ void
|
|||||||
u3t_trace_open(c3_c* dir_c)
|
u3t_trace_open(c3_c* dir_c)
|
||||||
{
|
{
|
||||||
c3_c fil_c[2048];
|
c3_c fil_c[2048];
|
||||||
|
|
||||||
|
if ( !dir_c ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(fil_c, 2048, "%s/.urb/put/trace", dir_c);
|
snprintf(fil_c, 2048, "%s/.urb/put/trace", dir_c);
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if ( -1 == stat(fil_c, &st) ) {
|
if ( (-1 == stat(fil_c, &st))
|
||||||
c3_mkdir(fil_c, 0700);
|
&& (-1 == c3_mkdir(fil_c, 0700)) )
|
||||||
|
{
|
||||||
|
fprintf(stderr, "mkdir: %s failed: %s\r\n", fil_c, strerror(errno));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c3_c lif_c[2056];
|
c3_c lif_c[2056];
|
||||||
@ -291,6 +299,11 @@ u3t_trace_open(c3_c* dir_c)
|
|||||||
u3_Host.tra_u.fil_u = c3_fopen(lif_c, "w");
|
u3_Host.tra_u.fil_u = c3_fopen(lif_c, "w");
|
||||||
u3_Host.tra_u.nid_w = (int)getpid();
|
u3_Host.tra_u.nid_w = (int)getpid();
|
||||||
|
|
||||||
|
if ( !u3_Host.tra_u.fil_u) {
|
||||||
|
fprintf(stderr, "trace open: %s\r\n", strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(u3_Host.tra_u.fil_u, "[ ");
|
fprintf(u3_Host.tra_u.fil_u, "[ ");
|
||||||
|
|
||||||
// We have two "threads", the event processing and the nock stuff.
|
// We have two "threads", the event processing and the nock stuff.
|
||||||
|
Loading…
Reference in New Issue
Block a user