diff --git a/tpfs/vol.c b/tpfs/vol.c index 490cdc28ca1d7281739c9ddf3457e76f8767dedb..d61d2fe16c21cf2285d6b2d4e30de349f88c109c 100644 --- a/tpfs/vol.c +++ b/tpfs/vol.c @@ -188,4 +188,12 @@ int load_super(unsigned int vol) memcpy(&super, buffer, sizeof(vsuper_t)); assert(super.magic == MAGIC); +} + +void save_super() +{ + unsigned char buffer[sizeof(vsuper_t)]; + + memcpy(buffer, &super, sizeof(vsuper_t)); + write_bloc(super.id, SUPER_BLOC, buffer); } \ No newline at end of file diff --git a/tpfs/vol.h b/tpfs/vol.h index a155d880cf5f561eaad9cc3876e4062c5ebc9b7f..9dadedcb2f5cf710d752aff692df08a4ea2ef533 100644 --- a/tpfs/vol.h +++ b/tpfs/vol.h @@ -61,5 +61,6 @@ void remove_vol(); void init_volume(unsigned int vol); int load_super(unsigned int vol); +void save_super(); #endif