kolibrios-gitea/programs/cmm/tmpdisk/tmpdisk.c
Kirill Lipatov (Leency) 2e36ea6cf7 Eolite: better menu selection, F5 / Tmpdisk: small fix, less debug / Installer: fixes, copyf() unification
git-svn-id: svn://kolibrios.org@3440 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-04-02 13:33:32 +00:00

74 lines
1.7 KiB
C

#define MEMSIZE 0x8E80
#include "..\lib\kolibri.h"
#include "..\lib\strings.h"
#include "..\lib\file_system.h"
#ifndef AUTOBUILD
#include "lang.h--"
#endif
/////////////////////////////////////////////////////////////////////////////////////////
///////////////////////// îáëàñòü äàííûõ ////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
struct ioctl_struct
{
dword handle;
dword io_code;
dword input;
dword inp_size;
dword output;
dword out_size;
};
#define DEV_ADD_DISK 1 //input = structure add_disk_struc
#define DEV_DEL_DISK 2 //input = structure del_disk_struc
struct add_disk_struc
{
dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data
unsigned char DiskId; // from 0 to 9
};
struct del_disk_struc
{
unsigned char DiskId; //from 0 to 9
};
ioctl_struct ioctl;
add_disk_struc add_disk;
del_disk_struc del_disk;
int driver_handle;
/////////////////////////////////////////////////////////////////////////////////////////
///////////////////////// êîä ////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
#include "t_console.c"
#include "t_window.c"
void main()
{
debug("========= tmpdisk 0.45 =========");
driver_handle = LoadDriver("tmpdisk");
if (driver_handle==0)
{
notify("error: /rd1/1/drivers/tmpdisk.obj driver loading failed");
notify("program terminated");
ExitProcess();
}
if (param)
Console_Work();
else
Main_Window();
ExitProcess();
}
stop: