Subversion Repositories Kolibri OS

Rev

Rev 1408 | Rev 9057 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1408 Rev 6591
Line 1... Line 1...
1
int set_file_size(const char *path, unsigned size)
1
int set_file_size(const char *path, unsigned size)
2
{
2
{
3
     int retval;
3
     int retval;
-
 
4
     int tmp;
4
     __asm__ __volatile__(
5
     __asm__ __volatile__(
5
     "pushl $0 \n\t"
6
     "pushl $0 \n\t"
6
     "pushl $0 \n\t"
7
     "pushl $0 \n\t"
7
     "movl %0, 1(%%esp) \n\t"
8
     "movl %2, 1(%%esp) \n\t"
8
     "pushl $0 \n\t"
9
     "pushl $0 \n\t"
9
     "pushl $0 \n\t"
10
     "pushl $0 \n\t"
10
     "pushl $0 \n\t"
11
     "pushl $0 \n\t"
11
     "pushl %%ebx \n\t"
12
     "pushl %%ebx \n\t"
12
     "push $4 \n\t"
13
     "push $4 \n\t"
13
     "movl %%esp, %%ebx \n\t"
14
     "movl %%esp, %%ebx \n\t"
14
     "movl $70, %%eax \n\t"
15
     "movl $70, %%eax \n\t"
15
     "int $0x40 \n\t"
16
     "int $0x40 \n\t"
16
     "addl $28, %%esp \n\t"
17
     "addl $28, %%esp \n\t"
17
     :"=a" (retval)
18
     :"=a" (retval), "=b"(tmp)
18
     :"a" (path), "b" (size));
19
     :"r" (path), "b" (size));
19
     return retval;
20
     return retval;
20
};
21
};