Subversion Repositories Kolibri OS

Rev

Rev 4872 | Blame | Last modification | View Log | RSS feed

  1.  
  2. #include <sys/types.h>
  3. #include <sys/kos_io.h>
  4.  
  5.  
  6. int set_file_size(const char *path, unsigned size)
  7. {
  8.      int retval;
  9.      __asm__ __volatile__(
  10.      "pushl $0 \n\t"
  11.      "pushl $0 \n\t"
  12.      "movl %%eax, 1(%%esp) \n\t"
  13.      "pushl $0 \n\t"
  14.      "pushl $0 \n\t"
  15.      "pushl $0 \n\t"
  16.      "pushl %%ebx \n\t"
  17.      "push $4 \n\t"
  18.      "movl %%esp, %%ebx \n\t"
  19.      "movl $70, %%eax \n\t"
  20.      "int $0x40 \n\t"
  21.      "addl $28, %%esp \n\t"
  22.      :"=a" (retval)
  23.      :"a" (path), "b" (size));
  24.      return retval;
  25. };
  26.  
  27.