48 lines
1.0 KiB
C
48 lines
1.0 KiB
C
#ifndef FSCTL_UTILS_FS_TABLE_H
|
|
#define FSCTL_UTILS_FS_TABLE_H 1
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "fsctl/fugue/bits/fs.h"
|
|
|
|
//---
|
|
// Types
|
|
//---
|
|
|
|
/* struct fs_table : FS table entry information */
|
|
struct fs_table
|
|
{
|
|
bool is_valid;
|
|
uintptr_t vbr;
|
|
fugue_fs_t fs;
|
|
};
|
|
typedef struct fs_table fs_table_t;
|
|
|
|
//---
|
|
// API
|
|
//---
|
|
|
|
/* fs_table_init() : initialize FS table */
|
|
extern void fs_table_init(void);
|
|
|
|
/* fs_table_update() : try to update internal fs table */
|
|
extern int fs_table_update(fugue_fs_t *fs);
|
|
|
|
/* fs_table_info() : get fs table information */
|
|
extern int fs_table_info(fugue_fs_t *fs, int *fs_idx, int *nb_fs);
|
|
|
|
/* fs_table_dtitle() : display FS table title menu */
|
|
extern void fs_table_dtitle(void);
|
|
|
|
/* fs_table_select() : select a FS if available */
|
|
extern int fs_table_select(int idx);
|
|
|
|
/* fs_table_select_left() : try to change to the idx - 1 */
|
|
extern int fs_table_select_left(void);
|
|
|
|
/* fs_table_select_right() : try to change to the idx + 1 */
|
|
extern int fs_table_select_right(void);
|
|
|
|
#endif /* FSCTL_UTILS_FS_TABLE_H */
|