Damien Zammit, le sam. 25 juil. 2020 16:51:50 +1000, a ecrit: > -SRCS = ds_routines.c trivfs_server.c \ > - deviceServer.c notifyServer.c mach_i386Server.c > +SRCS = ds_routines.c trivfs_server.c startup_notifyServer.c \ > + deviceServer.c notifyServer.c mach_i386Server.c startup.c > startup-ops.c
I'd say not to split the code into several files. It's already hard to understand how bootstrap works, putting the different pieces in separate files will not help people reading it. > +/* The system is going down. Call trivfs_goaway() */ > +error_t > +S_startup_dosync (mach_port_t handle) > +{ > + struct port_info *inpi = ports_lookup_port (port_bucket, handle, > + machdev_shutdown_notify_class); > + > + if (!inpi) > + return EOPNOTSUPP; > + > + ports_port_deref (inpi); > + > + return trivfs_goaway (NULL, FSYS_GOAWAY_FORCE); > +} That, in particular, should probably interact with machdev_trivfs_init and machdev_trivfs_server, to let the translator using machdev register a function to be called at shutdown. In the rump case, it'll have to flush the disk caches, before startup shuts the system down. Samuel