kolibrios/drivers/ddk/io/finfo.c
turbocat be90c91c89 ddk:
- Fixed Makefile
- Added FS_Service instead of calling system call 70

git-svn-id: svn://kolibrios.org@9057 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-07-12 22:49:51 +00:00

69 lines
953 B
C

#include <syscall.h>
#pragma pack(push,1)
typedef struct
{
char sec;
char min;
char hour;
char rsv;
}detime_t;
typedef struct
{
char day;
char month;
short year;
}dedate_t;
typedef struct
{
unsigned attr;
unsigned flags;
union
{
detime_t ctime;
unsigned cr_time;
};
union
{
dedate_t cdate;
unsigned cr_date;
};
union
{
detime_t atime;
unsigned acc_time;
};
union
{
dedate_t adate;
unsigned acc_date;
};
union
{
detime_t mtime;
unsigned mod_time;
};
union
{
dedate_t mdate;
unsigned mod_date;
};
unsigned size;
unsigned size_high;
} FILEINFO;
#pragma pack(pop)
int get_fileinfo(const char *path, FILEINFO *info)
{
ksys70_t k;
int err;
k.p00 = 5;
k.bdfe = info;
k.p20 = 0;
k.p21 = path;
return FS_Service(&k, err);
}