Changed timestamp behavior
This commit is contained in:
parent
8272aa245b
commit
b2cac5bd2d
2 changed files with 5 additions and 5 deletions
2
util.c
2
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.
|
// 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);
|
return localtime(¤t_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
util.h
8
util.h
|
@ -1,5 +1,5 @@
|
||||||
#ifndef BLOCK_H_
|
#ifndef UTIL_H_
|
||||||
#define BLOCK_H_
|
#define UTIL_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -67,7 +67,7 @@ time_t current_time;
|
||||||
|
|
||||||
// Provide fs size in bytes
|
// Provide fs size in bytes
|
||||||
int find_number_of_inodes(uint64_t fs_size);
|
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);
|
uint32_t get_file_size(uint16_t block_count);
|
||||||
uint16_t bytes_to_kb(uint32_t bytes);
|
uint16_t bytes_to_kb(uint32_t bytes);
|
||||||
uint16_t kb_to_mb(uint16_t kb);
|
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);
|
uint16_t gb_to_tb(uint16_t gb);
|
||||||
uint8_t tb_to_pb(uint16_t tb);
|
uint8_t tb_to_pb(uint16_t tb);
|
||||||
|
|
||||||
#endif // BLOCK_H_
|
#endif // UTIL_H_
|
||||||
|
|
Loading…
Reference in a new issue