2010-02-12 21:11:35 +01:00
|
|
|
|
|
|
|
int set_file_size(const char *path, unsigned size)
|
|
|
|
{
|
|
|
|
int retval;
|
2016-10-13 23:18:16 +02:00
|
|
|
int tmp;
|
2010-02-12 21:11:35 +01:00
|
|
|
__asm__ __volatile__(
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
2016-10-13 23:18:16 +02:00
|
|
|
"movl %2, 1(%%esp) \n\t"
|
2010-02-12 21:11:35 +01:00
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl %%ebx \n\t"
|
|
|
|
"push $4 \n\t"
|
|
|
|
"movl %%esp, %%ebx \n\t"
|
|
|
|
"movl $70, %%eax \n\t"
|
|
|
|
"int $0x40 \n\t"
|
|
|
|
"addl $28, %%esp \n\t"
|
2016-10-13 23:18:16 +02:00
|
|
|
:"=a" (retval), "=b"(tmp)
|
|
|
|
:"r" (path), "b" (size));
|
2010-02-12 21:11:35 +01:00
|
|
|
return retval;
|
|
|
|
};
|