60 lines
1.6 KiB
C
60 lines
1.6 KiB
C
#include <string.h>
|
|
|
|
#include "fsctl/menu/info.h"
|
|
#include "fsctl/fugue.h"
|
|
#include "fsctl/utils/display.h"
|
|
#include "fsctl/utils/fs_table.h"
|
|
|
|
//---
|
|
// Public
|
|
//---
|
|
|
|
/* info_menu_init() : init menu */
|
|
void info_menu_init(void)
|
|
{
|
|
;
|
|
}
|
|
|
|
/* info_menu_display() : display menu */
|
|
//TODO : logger display
|
|
void info_menu_display(void)
|
|
{
|
|
fugue_fs_t fs;
|
|
int y;
|
|
|
|
fs_table_dtitle();
|
|
if (fs_table_info(&fs, NULL, NULL) != 0)
|
|
return;
|
|
|
|
y = 0;
|
|
_printXY(0, ++y, "FS type = %s", fs.props.type);
|
|
_printXY(0, ++y, "capacity = %d", fs.props.capacity);
|
|
_printXY(0, ++y, "cluster free = %d", fs.props.cluster_free);
|
|
_printXY(0, ++y, "cluster used = %d", fs.props.cluster_used);
|
|
_printXY(0, ++y, "cluster dead = %d", fs.props.cluster_dead);
|
|
_printXY(0, ++y, "cluster errs = %d", fs.props.cluster_error);
|
|
_printXY(0, ++y, "cluster resv = %d", fs.props.cluster_resv);
|
|
_printXY(0, ++y, "cluster number = %d", fs.props.cluster_nb);
|
|
_printXY(0, ++y, "cluster number = %x", fs.props.cluster_nb);
|
|
_printXY(0, ++y, "FAT0 = %p", fs._private.fat0);
|
|
_printXY(0, ++y, "FAT1 = %p", fs._private.fat1);
|
|
_printXY(0, ++y, "FATs size = %d", fs.props.fats_size);
|
|
_printXY(0, ++y, "FAT0 size = %d", fs.props.fat0_size);
|
|
_printXY(0, ++y, "FAT1 size = %d", fs.props.fat1_size);
|
|
_printXY(0, ++y, "Root addr = %p", fs._private.root);
|
|
}
|
|
|
|
/* info_menu_keyboard() : handle keyboard */
|
|
void info_menu_keyboard(int key)
|
|
{
|
|
switch(key)
|
|
{
|
|
case KEY_LEFT:
|
|
fs_table_select_left();
|
|
break;
|
|
case KEY_RIGHT:
|
|
fs_table_select_right();
|
|
break;
|
|
}
|
|
}
|