mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
persist mount points across pier reboots
This commit is contained in:
parent
542b6f843a
commit
b1c25114bf
@ -99,6 +99,7 @@
|
||||
# define c3__bong c3_s4('b','o','n','g')
|
||||
# define c3__book c3_s4('b','o','o','k')
|
||||
# define c3__bool c3_s4('b','o','o','l')
|
||||
# define c3__boat c3_s4('b','o','a','t')
|
||||
# define c3__boot c3_s4('b','o','o','t')
|
||||
# define c3__born c3_s4('b','o','r','n')
|
||||
# define c3__both c3_s4('b','o','t','h')
|
||||
@ -489,6 +490,7 @@
|
||||
# define c3__hide c3_s4('h','i','d','e')
|
||||
# define c3__high c3_s4('h','i','g','h')
|
||||
# define c3__hike c3_s4('h','i','k','e')
|
||||
# define c3__hill c3_s4('h','i','l','l')
|
||||
# define c3__hind c3_s4('h','i','n','d')
|
||||
# define c3__hint c3_s4('h','i','n','t')
|
||||
# define c3__hit c3_s3('h','i','t')
|
||||
|
@ -1001,6 +1001,11 @@
|
||||
void
|
||||
u3_unix_ef_ogre(u3_noun mon);
|
||||
|
||||
/* u3_unix_ef_ogre(): delete mount point
|
||||
*/
|
||||
void
|
||||
u3_unix_ef_hill(u3_noun hil);
|
||||
|
||||
/* u3_unix_io_init(): initialize storage.
|
||||
*/
|
||||
void
|
||||
|
5
v/reck.c
5
v/reck.c
@ -176,6 +176,10 @@ _reck_kick_sync(u3_noun pox, u3_noun fav)
|
||||
u3_unix_ef_ogre(u3k(u3t(fav)));
|
||||
u3z(pox); u3z(fav); return c3y;
|
||||
}
|
||||
case c3__hill: {
|
||||
u3_unix_ef_hill(u3k(u3t(fav)));
|
||||
u3z(pox); u3z(fav); return c3y;
|
||||
}
|
||||
}
|
||||
|
||||
// XX obviously not right!
|
||||
@ -283,6 +287,7 @@ _reck_kick_spec(u3_noun pox, u3_noun fav)
|
||||
} break;
|
||||
|
||||
case c3__clay:
|
||||
case c3__boat:
|
||||
case c3__sync: {
|
||||
return _reck_kick_sync(pox, fav);
|
||||
} break;
|
||||
|
23
v/unix.c
23
v/unix.c
@ -1,10 +1,9 @@
|
||||
// XXX maybe make sure empty directories disappear on update?
|
||||
// XXX i suspect maybe a problem if there's untrackable files in
|
||||
// a directory when we try to delete it?
|
||||
// XXX maybe it's not a bad idea to have clay handle the placing of the dots?
|
||||
// XXX probably should allow out-only mount points
|
||||
// XXX fix naked file -- currently just does file.root
|
||||
// XXX check for memory leaks
|
||||
// XXX maybe get rid of mim.u.dok cache?
|
||||
/* v/unix.c
|
||||
**
|
||||
** This file is in the public domain.
|
||||
@ -1133,6 +1132,19 @@ u3_unix_ef_ogre(u3_noun mon)
|
||||
_unix_delete_mount_point(mon);
|
||||
}
|
||||
|
||||
/* u3_unix_ef_hill(): enumerate mount points
|
||||
*/
|
||||
void
|
||||
u3_unix_ef_hill(u3_noun hil)
|
||||
{
|
||||
u3_noun mon;
|
||||
for ( mon = hil; c3y == u3du(mon); mon = u3t(hil) ) {
|
||||
_unix_get_mount_point(u3h(mon));
|
||||
}
|
||||
u3_Host.unx_u.dyr = c3y;
|
||||
u3_unix_ef_look();
|
||||
}
|
||||
|
||||
/* u3_unix_io_init(): initialize unix sync.
|
||||
*/
|
||||
void
|
||||
@ -1178,6 +1190,11 @@ u3_unix_io_init(void)
|
||||
uv_timer_init(u3L, &unx_u->tim_u);
|
||||
unx_u->alm = c3n;
|
||||
unx_u->dyr = c3n;
|
||||
|
||||
if ( c3n == u3_Host.ops_u.nuu ) {
|
||||
u3v_plan(u3nt(u3_blip, c3__boat, u3_nul),
|
||||
u3nc(c3__boat, u3_nul));
|
||||
}
|
||||
}
|
||||
|
||||
/* u3_unix_acquire(): acquire a lockfile, killing anything that holds it.
|
||||
@ -1300,7 +1317,7 @@ void
|
||||
u3_unix_ef_look(void)
|
||||
{
|
||||
if ( c3y == u3_Host.unx_u.dyr ) {
|
||||
u3_Host.unx_u.dyr = c3y;
|
||||
u3_Host.unx_u.dyr = c3n;
|
||||
u3_umon* mon_u;
|
||||
|
||||
for ( mon_u = u3_Host.unx_u.mon_u; mon_u; mon_u = mon_u->nex_u ) {
|
||||
|
Loading…
Reference in New Issue
Block a user