1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Add extfs s_last_mounted support.

This commit is contained in:
Jonas 'Sortie' Termansen 2015-12-23 17:35:00 +01:00
parent e89dc04674
commit c8315c1ac2

View file

@ -26,6 +26,7 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include "ext-constants.h"
@ -72,6 +73,13 @@ Filesystem::Filesystem(Device* device, const char* mount_path)
sb->s_mtime = mtime_realtime;
sb->s_mnt_count++;
sb->s_state = EXT2_ERROR_FS;
// TODO: Remove this temporarily compatibility when this driver is moved
// into the kernel and the the FUSE frontend is removed.
#ifdef __GLIBC__
strncpy(sb->s_last_mounted, mount_path, sizeof(sb->s_last_mounted));
#else
strlcpy(sb->s_last_mounted, mount_path, sizeof(sb->s_last_mounted));
#endif
FinishWrite();
Sync();
}