Subversion Repositories shark

Rev

Rev 1085 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1085 pj 1
/*
2
 *
3
 *
4
 *
5
 */
6
 
7
#include <ll/i386/cons.h>
8
#include <kernel/func.h>
9
 
10
#include <fs/bdevinit.h>
11
#include <fs/fsinit.h>
12
#include <fs/bdev.h>
13
 
14
#include <drivers/keyb.h>
15
 
16
#include <sys/mount.h>
17
#include <sys/types.h>
18
#include <fcntl.h>
19
#include <unistd.h>
20
#include <errno.h>
21
#include <string.h>
22
 
23
#include "common.h"
24
 
25
#define FILENAME "/TEMP/TESTW1.TXT"
26
 
27
//#define FILENAME "/TEMP/CIR2"
28
 
29
extern dev_t temp_device;
30
 
31
int main(int argc,char *argv[])
32
{
33
  int res;
34
 
35
  showmessage("Try to unlink (ie. delete) a file.\n");
36
 
37
  cprintf("UNLINKING %s\n",FILENAME);
38
  res=unlink(FILENAME);
39
  if (res!=0) {
40
    cprintf("FAILED!\n");
41
    cprintf("errno: %i '%s'\n",errno,strerror(errno));
42
  } else cprintf("OK!\n");
43
 
44
  waitend();
45
 
46
  return 0;
47
}