From b2cac5bd2d577207ab2d64c10fa074a320c419b9 Mon Sep 17 00:00:00 2001 From: Emma Nora Theuer Date: Fri, 25 Oct 2024 16:43:50 +0200 Subject: [PATCH] Changed timestamp behavior --- util.c | 2 +- util.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/util.c b/util.c index 795ab21..22aa399 100644 --- a/util.c +++ b/util.c @@ -10,7 +10,7 @@ int find_number_of_inodes(uint64_t fs_size) { } // NOTE: formerly part of inode. Now transferred to util because it's both used in Inodes and the Superblock. The superblock does include inode.h, but this makes the code ordering easier to understand. -tm* get_local_time() { +tm get_local_time() { return localtime(¤t_time); } diff --git a/util.h b/util.h index 55fdb83..aa650e6 100644 --- a/util.h +++ b/util.h @@ -1,5 +1,5 @@ -#ifndef BLOCK_H_ -#define BLOCK_H_ +#ifndef UTIL_H_ +#define UTIL_H_ #include #include @@ -67,7 +67,7 @@ time_t current_time; // Provide fs size in bytes int find_number_of_inodes(uint64_t fs_size); -tm* get_local_time(); +tm get_local_time(); uint32_t get_file_size(uint16_t block_count); uint16_t bytes_to_kb(uint32_t bytes); uint16_t kb_to_mb(uint16_t kb); @@ -75,4 +75,4 @@ uint16_t mb_to_gb(uint16_t mb); uint16_t gb_to_tb(uint16_t gb); uint8_t tb_to_pb(uint16_t tb); -#endif // BLOCK_H_ +#endif // UTIL_H_