Line | |
---|
1 | #include <lib.h>
|
---|
2 | #include <string.h>
|
---|
3 | #define truncate _truncate
|
---|
4 | #define ftruncate _ftruncate
|
---|
5 | #include <unistd.h>
|
---|
6 |
|
---|
7 | PUBLIC int truncate(const char *_path, off_t _length)
|
---|
8 | {
|
---|
9 | message m;
|
---|
10 | m.m2_p1 = (char *) _path;
|
---|
11 | m.m2_i1 = strlen(_path)+1;
|
---|
12 | m.m2_l1 = _length;
|
---|
13 |
|
---|
14 | return(_syscall(FS, TRUNCATE, &m));
|
---|
15 | }
|
---|
16 |
|
---|
17 | PUBLIC int ftruncate(int _fd, off_t _length)
|
---|
18 | {
|
---|
19 | message m;
|
---|
20 | m.m2_l1 = _length;
|
---|
21 | m.m2_i1 = _fd;
|
---|
22 |
|
---|
23 | return(_syscall(FS, FTRUNCATE, &m));
|
---|
24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.