Changeset 0ee4322 in mainline for uspace/lib/libc
- Timestamp:
- 2008-01-13T13:19:37Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d0dc74ae
- Parents:
- 4fb6bf36
- Location:
- uspace/lib/libc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/vfs.c
r4fb6bf36 r0ee4322 95 95 96 96 97 int open(const char * name, int oflag, ...)97 int open(const char *path, int oflag, ...) 98 98 { 99 99 int res; … … 113 113 } 114 114 req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer); 115 rc = ipc_data_write_start(vfs_phone, name, strlen(name));115 rc = ipc_data_write_start(vfs_phone, path, strlen(path)); 116 116 if (rc != EOK) { 117 117 async_wait_for(req, NULL); … … 215 215 } 216 216 217 int ftruncate(int fildes, off_t length) 218 { 219 int res; 220 ipcarg_t rc; 221 222 futex_down(&vfs_phone_futex); 223 async_serialize_start(); 224 if (vfs_phone < 0) { 225 res = vfs_connect(); 226 if (res < 0) { 227 async_serialize_end(); 228 futex_up(&vfs_phone_futex); 229 return res; 230 } 231 } 232 rc = async_req_2_0(vfs_phone, VFS_TRUNCATE, fildes, length); 233 async_serialize_end(); 234 futex_up(&vfs_phone_futex); 235 return (int) rc; 236 } 237 217 238 /** @} 218 239 */ -
uspace/lib/libc/include/unistd.h
r4fb6bf36 r0ee4322 46 46 #define SEEK_END 2 47 47 48 extern ssize_t write(int fd, const void * buf, size_t count);49 extern ssize_t read(int fd, void * buf, size_t count);48 extern ssize_t write(int, const void *, size_t); 49 extern ssize_t read(int, void *, size_t); 50 50 extern off_t lseek(int, off_t, int); 51 extern int ftruncate(int, off_t); 51 52 52 53 extern void _exit(int status);
Note:
See TracChangeset
for help on using the changeset viewer.