Changeset 9dc6083 in mainline for uspace/lib/fs/libfs.c
- Timestamp:
- 2013-07-06T15:53:01Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 11baebb
- Parents:
- 66366470
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
r66366470 r9dc6083 45 45 #include <mem.h> 46 46 #include <sys/stat.h> 47 #include <sys/statfs.h> 47 48 #include <stdlib.h> 48 49 … … 218 219 async_answer_0(rid, rc); 219 220 } 221 #include<stdio.h> 222 static void vfs_out_statfs(ipc_callid_t rid, ipc_call_t *req) 223 { 224 printf("TRACE: vfs_out_statfs\n"); 225 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 226 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req); 227 228 fs_node_t *fn; 229 int rc = libfs_ops->node_get(&fn, service_id, index); 230 on_error(rc, answer_and_return(rid, rc)); 231 232 ipc_callid_t callid; 233 size_t size; 234 if ((!async_data_read_receive(&callid, &size)) || 235 (size != sizeof(struct stat))) { 236 libfs_ops->node_put(fn); 237 async_answer_0(callid, EINVAL); 238 async_answer_0(rid, EINVAL); 239 return; 240 } 241 242 struct statfs statfs; 243 memset(&statfs, 0, sizeof(struct statfs)); 244 245 statfs.f_bsize = libfs_ops->size_block(service_id); 246 247 libfs_ops->node_put(fn); 248 249 async_data_read_finalize(callid, &statfs, sizeof(struct statfs)); 250 async_answer_0(rid, EOK); 251 } 220 252 221 253 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) … … 276 308 case VFS_OUT_SYNC: 277 309 vfs_out_sync(callid, &call); 310 break; 311 case VFS_OUT_STATFS: 312 vfs_out_statfs(callid, &call); 278 313 break; 279 314 default:
Note:
See TracChangeset
for help on using the changeset viewer.