source: mainline/uspace/srv/fs/tmpfs/tmpfs_ops.c@ 9bddf37

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 9bddf37 was 9bddf37, checked in by Jakub Jermar <jakub@…>, 16 years ago

Free up node's resources in the 'nodes' hash table remove callback.

  • Property mode set to 100644
File size: 16.8 KB
Line 
1/*
2 * Copyright (c) 2008 Jakub Jermar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup fs
30 * @{
31 */
32
33/**
34 * @file tmpfs_ops.c
35 * @brief Implementation of VFS operations for the TMPFS file system
36 * server.
37 */
38
39#include "tmpfs.h"
40#include "../../vfs/vfs.h"
41#include <ipc/ipc.h>
42#include <async.h>
43#include <errno.h>
44#include <atomic.h>
45#include <stdlib.h>
46#include <string.h>
47#include <stdio.h>
48#include <assert.h>
49#include <sys/types.h>
50#include <adt/hash_table.h>
51#include <as.h>
52#include <libfs.h>
53
54#define min(a, b) ((a) < (b) ? (a) : (b))
55#define max(a, b) ((a) > (b) ? (a) : (b))
56
57#define NODES_BUCKETS 256
58
59/** All root nodes have index 0. */
60#define TMPFS_SOME_ROOT 0
61/** Global counter for assigning node indices. Shared by all instances. */
62fs_index_t tmpfs_next_index = 1;
63
64/*
65 * Implementation of the libfs interface.
66 */
67
68/* Forward declarations of static functions. */
69static int tmpfs_match(fs_node_t **, fs_node_t *, const char *);
70static int tmpfs_node_get(fs_node_t **, dev_handle_t, fs_index_t);
71static int tmpfs_node_open(fs_node_t *);
72static int tmpfs_node_put(fs_node_t *);
73static int tmpfs_create_node(fs_node_t **, dev_handle_t, int);
74static int tmpfs_destroy_node(fs_node_t *);
75static int tmpfs_link_node(fs_node_t *, fs_node_t *, const char *);
76static int tmpfs_unlink_node(fs_node_t *, fs_node_t *, const char *);
77
78/* Implementation of helper functions. */
79static int tmpfs_root_get(fs_node_t **rfn, dev_handle_t dev_handle)
80{
81 return tmpfs_node_get(rfn, dev_handle, TMPFS_SOME_ROOT);
82}
83
84static int tmpfs_has_children(bool *has_children, fs_node_t *fn)
85{
86 *has_children = !list_empty(&TMPFS_NODE(fn)->cs_head);
87 return EOK;
88}
89
90static fs_index_t tmpfs_index_get(fs_node_t *fn)
91{
92 return TMPFS_NODE(fn)->index;
93}
94
95static size_t tmpfs_size_get(fs_node_t *fn)
96{
97 return TMPFS_NODE(fn)->size;
98}
99
100static unsigned tmpfs_lnkcnt_get(fs_node_t *fn)
101{
102 return TMPFS_NODE(fn)->lnkcnt;
103}
104
105static char tmpfs_plb_get_char(unsigned pos)
106{
107 return tmpfs_reg.plb_ro[pos % PLB_SIZE];
108}
109
110static bool tmpfs_is_directory(fs_node_t *fn)
111{
112 return TMPFS_NODE(fn)->type == TMPFS_DIRECTORY;
113}
114
115static bool tmpfs_is_file(fs_node_t *fn)
116{
117 return TMPFS_NODE(fn)->type == TMPFS_FILE;
118}
119
120static dev_handle_t tmpfs_device_get(fs_node_t *fn)
121{
122 return 0;
123}
124
125/** libfs operations */
126libfs_ops_t tmpfs_libfs_ops = {
127 .root_get = tmpfs_root_get,
128 .match = tmpfs_match,
129 .node_get = tmpfs_node_get,
130 .node_open = tmpfs_node_open,
131 .node_put = tmpfs_node_put,
132 .create = tmpfs_create_node,
133 .destroy = tmpfs_destroy_node,
134 .link = tmpfs_link_node,
135 .unlink = tmpfs_unlink_node,
136 .has_children = tmpfs_has_children,
137 .index_get = tmpfs_index_get,
138 .size_get = tmpfs_size_get,
139 .lnkcnt_get = tmpfs_lnkcnt_get,
140 .plb_get_char = tmpfs_plb_get_char,
141 .is_directory = tmpfs_is_directory,
142 .is_file = tmpfs_is_file,
143 .device_get = tmpfs_device_get
144};
145
146/** Hash table of all TMPFS nodes. */
147hash_table_t nodes;
148
149#define NODES_KEY_DEV 0
150#define NODES_KEY_INDEX 1
151
152/* Implementation of hash table interface for the nodes hash table. */
153static hash_index_t nodes_hash(unsigned long key[])
154{
155 return key[NODES_KEY_INDEX] % NODES_BUCKETS;
156}
157
158static int nodes_compare(unsigned long key[], hash_count_t keys, link_t *item)
159{
160 tmpfs_node_t *nodep = hash_table_get_instance(item, tmpfs_node_t,
161 nh_link);
162 return (nodep->index == key[NODES_KEY_INDEX] &&
163 nodep->dev_handle == key[NODES_KEY_DEV]);
164}
165
166static void nodes_remove_callback(link_t *item)
167{
168 tmpfs_node_t *nodep = hash_table_get_instance(item, tmpfs_node_t,
169 nh_link);
170
171 while (!list_empty(&nodep->cs_head)) {
172 tmpfs_dentry_t *dentryp = list_get_instance(nodep->cs_head.next,
173 tmpfs_dentry_t, link);
174
175 assert(nodep->type == TMPFS_DIRECTORY);
176 list_remove(&dentryp->link);
177 free(dentryp);
178 }
179
180 if (nodep->data) {
181 assert(nodep->type == TMPFS_FILE);
182 free(nodep->data);
183 }
184 free(nodep->bp);
185 free(nodep);
186}
187
188/** TMPFS nodes hash table operations. */
189hash_table_operations_t nodes_ops = {
190 .hash = nodes_hash,
191 .compare = nodes_compare,
192 .remove_callback = nodes_remove_callback
193};
194
195static void tmpfs_node_initialize(tmpfs_node_t *nodep)
196{
197 nodep->bp = NULL;
198 nodep->index = 0;
199 nodep->dev_handle = 0;
200 nodep->type = TMPFS_NONE;
201 nodep->lnkcnt = 0;
202 nodep->size = 0;
203 nodep->data = NULL;
204 link_initialize(&nodep->nh_link);
205 list_initialize(&nodep->cs_head);
206}
207
208static void tmpfs_dentry_initialize(tmpfs_dentry_t *dentryp)
209{
210 link_initialize(&dentryp->link);
211 dentryp->name = NULL;
212 dentryp->node = NULL;
213}
214
215bool tmpfs_init(void)
216{
217 if (!hash_table_create(&nodes, NODES_BUCKETS, 2, &nodes_ops))
218 return false;
219
220 return true;
221}
222
223static bool tmpfs_instance_init(dev_handle_t dev_handle)
224{
225 fs_node_t *rfn;
226 int rc;
227
228 rc = tmpfs_create_node(&rfn, dev_handle, L_DIRECTORY);
229 if (rc != EOK || !rfn)
230 return false;
231 TMPFS_NODE(rfn)->lnkcnt = 0; /* FS root is not linked */
232 return true;
233}
234
235int tmpfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
236{
237 tmpfs_node_t *parentp = TMPFS_NODE(pfn);
238 link_t *lnk;
239
240 for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head;
241 lnk = lnk->next) {
242 tmpfs_dentry_t *dentryp;
243 dentryp = list_get_instance(lnk, tmpfs_dentry_t, link);
244 if (!str_cmp(dentryp->name, component)) {
245 *rfn = FS_NODE(dentryp->node);
246 return EOK;
247 }
248 }
249
250 *rfn = NULL;
251 return EOK;
252}
253
254int tmpfs_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index)
255{
256 unsigned long key[] = {
257 [NODES_KEY_DEV] = dev_handle,
258 [NODES_KEY_INDEX] = index
259 };
260 link_t *lnk = hash_table_find(&nodes, key);
261 if (lnk) {
262 tmpfs_node_t *nodep;
263 nodep = hash_table_get_instance(lnk, tmpfs_node_t, nh_link);
264 *rfn = FS_NODE(nodep);
265 } else {
266 *rfn = NULL;
267 }
268 return EOK;
269}
270
271int tmpfs_node_open(fs_node_t *fn)
272{
273 /* nothing to do */
274 return EOK;
275}
276
277int tmpfs_node_put(fs_node_t *fn)
278{
279 /* nothing to do */
280 return EOK;
281}
282
283int tmpfs_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int lflag)
284{
285 fs_node_t *rootfn;
286 int rc;
287
288 assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY));
289
290 tmpfs_node_t *nodep = malloc(sizeof(tmpfs_node_t));
291 if (!nodep)
292 return ENOMEM;
293 tmpfs_node_initialize(nodep);
294 nodep->bp = malloc(sizeof(fs_node_t));
295 if (!nodep->bp) {
296 free(nodep);
297 return ENOMEM;
298 }
299 fs_node_initialize(nodep->bp);
300 nodep->bp->data = nodep; /* link the FS and TMPFS nodes */
301
302 rc = tmpfs_root_get(&rootfn, dev_handle);
303 assert(rc == EOK);
304 if (!rootfn)
305 nodep->index = TMPFS_SOME_ROOT;
306 else
307 nodep->index = tmpfs_next_index++;
308 nodep->dev_handle = dev_handle;
309 if (lflag & L_DIRECTORY)
310 nodep->type = TMPFS_DIRECTORY;
311 else
312 nodep->type = TMPFS_FILE;
313
314 /* Insert the new node into the nodes hash table. */
315 unsigned long key[] = {
316 [NODES_KEY_DEV] = nodep->dev_handle,
317 [NODES_KEY_INDEX] = nodep->index
318 };
319 hash_table_insert(&nodes, key, &nodep->nh_link);
320 *rfn = FS_NODE(nodep);
321 return EOK;
322}
323
324int tmpfs_destroy_node(fs_node_t *fn)
325{
326 tmpfs_node_t *nodep = TMPFS_NODE(fn);
327
328 assert(!nodep->lnkcnt);
329 assert(list_empty(&nodep->cs_head));
330
331 unsigned long key[] = {
332 [NODES_KEY_DEV] = nodep->dev_handle,
333 [NODES_KEY_INDEX] = nodep->index
334 };
335 hash_table_remove(&nodes, key, 2);
336
337 /*
338 * The nodes_remove_callback() function takes care of the actual
339 * resource deallocation.
340 */
341 return EOK;
342}
343
344int tmpfs_link_node(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
345{
346 tmpfs_node_t *parentp = TMPFS_NODE(pfn);
347 tmpfs_node_t *childp = TMPFS_NODE(cfn);
348 tmpfs_dentry_t *dentryp;
349 link_t *lnk;
350
351 assert(parentp->type == TMPFS_DIRECTORY);
352
353 /* Check for duplicit entries. */
354 for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head;
355 lnk = lnk->next) {
356 dentryp = list_get_instance(lnk, tmpfs_dentry_t, link);
357 if (!str_cmp(dentryp->name, nm))
358 return EEXIST;
359 }
360
361 /* Allocate and initialize the dentry. */
362 dentryp = malloc(sizeof(tmpfs_dentry_t));
363 if (!dentryp)
364 return ENOMEM;
365 tmpfs_dentry_initialize(dentryp);
366
367 /* Populate and link the new dentry. */
368 size_t size = str_size(nm);
369 dentryp->name = malloc(size + 1);
370 if (!dentryp->name) {
371 free(dentryp);
372 return ENOMEM;
373 }
374 str_cpy(dentryp->name, size + 1, nm);
375 dentryp->node = childp;
376 childp->lnkcnt++;
377 list_append(&dentryp->link, &parentp->cs_head);
378
379 return EOK;
380}
381
382int tmpfs_unlink_node(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
383{
384 tmpfs_node_t *parentp = TMPFS_NODE(pfn);
385 tmpfs_node_t *childp = NULL;
386 tmpfs_dentry_t *dentryp;
387 link_t *lnk;
388
389 if (!parentp)
390 return EBUSY;
391
392 for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head;
393 lnk = lnk->next) {
394 dentryp = list_get_instance(lnk, tmpfs_dentry_t, link);
395 if (!str_cmp(dentryp->name, nm)) {
396 childp = dentryp->node;
397 assert(FS_NODE(childp) == cfn);
398 break;
399 }
400 }
401
402 if (!childp)
403 return ENOENT;
404
405 if ((childp->lnkcnt == 1) && !list_empty(&childp->cs_head))
406 return ENOTEMPTY;
407
408 list_remove(&dentryp->link);
409 free(dentryp);
410 childp->lnkcnt--;
411
412 return EOK;
413}
414
415void tmpfs_mounted(ipc_callid_t rid, ipc_call_t *request)
416{
417 dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
418 int rc;
419
420 /* accept the mount options */
421 ipc_callid_t callid;
422 size_t size;
423 if (!async_data_write_receive(&callid, &size)) {
424 ipc_answer_0(callid, EINVAL);
425 ipc_answer_0(rid, EINVAL);
426 return;
427 }
428 char *opts = malloc(size + 1);
429 if (!opts) {
430 ipc_answer_0(callid, ENOMEM);
431 ipc_answer_0(rid, ENOMEM);
432 return;
433 }
434 ipcarg_t retval = async_data_write_finalize(callid, opts, size);
435 if (retval != EOK) {
436 ipc_answer_0(rid, retval);
437 free(opts);
438 return;
439 }
440 opts[size] = '\0';
441
442 /* Initialize TMPFS instance. */
443 if (!tmpfs_instance_init(dev_handle)) {
444 free(opts);
445 ipc_answer_0(rid, ENOMEM);
446 return;
447 }
448
449 fs_node_t *rootfn;
450 rc = tmpfs_root_get(&rootfn, dev_handle);
451 assert(rc == EOK);
452 tmpfs_node_t *rootp = TMPFS_NODE(rootfn);
453 if (str_cmp(opts, "restore") == 0) {
454 if (tmpfs_restore(dev_handle))
455 ipc_answer_3(rid, EOK, rootp->index, rootp->size,
456 rootp->lnkcnt);
457 else
458 ipc_answer_0(rid, ELIMIT);
459 } else {
460 ipc_answer_3(rid, EOK, rootp->index, rootp->size,
461 rootp->lnkcnt);
462 }
463 free(opts);
464}
465
466void tmpfs_mount(ipc_callid_t rid, ipc_call_t *request)
467{
468 libfs_mount(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request);
469}
470
471void tmpfs_unmounted(ipc_callid_t rid, ipc_call_t *request)
472{
473 ipc_answer_0(rid, ENOTSUP);
474}
475
476void tmpfs_unmount(ipc_callid_t rid, ipc_call_t *request)
477{
478 libfs_unmount(&tmpfs_libfs_ops, rid, request);
479}
480
481void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request)
482{
483 libfs_lookup(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request);
484}
485
486void tmpfs_read(ipc_callid_t rid, ipc_call_t *request)
487{
488 dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
489 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
490 off_t pos = (off_t)IPC_GET_ARG3(*request);
491
492 /*
493 * Lookup the respective TMPFS node.
494 */
495 link_t *hlp;
496 unsigned long key[] = {
497 [NODES_KEY_DEV] = dev_handle,
498 [NODES_KEY_INDEX] = index
499 };
500 hlp = hash_table_find(&nodes, key);
501 if (!hlp) {
502 ipc_answer_0(rid, ENOENT);
503 return;
504 }
505 tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t,
506 nh_link);
507
508 /*
509 * Receive the read request.
510 */
511 ipc_callid_t callid;
512 size_t size;
513 if (!async_data_read_receive(&callid, &size)) {
514 ipc_answer_0(callid, EINVAL);
515 ipc_answer_0(rid, EINVAL);
516 return;
517 }
518
519 size_t bytes;
520 if (nodep->type == TMPFS_FILE) {
521 bytes = max(0, min(nodep->size - pos, size));
522 (void) async_data_read_finalize(callid, nodep->data + pos,
523 bytes);
524 } else {
525 tmpfs_dentry_t *dentryp;
526 link_t *lnk;
527 int i;
528
529 assert(nodep->type == TMPFS_DIRECTORY);
530
531 /*
532 * Yes, we really use O(n) algorithm here.
533 * If it bothers someone, it could be fixed by introducing a
534 * hash table.
535 */
536 for (i = 0, lnk = nodep->cs_head.next;
537 i < pos && lnk != &nodep->cs_head;
538 i++, lnk = lnk->next)
539 ;
540
541 if (lnk == &nodep->cs_head) {
542 ipc_answer_0(callid, ENOENT);
543 ipc_answer_1(rid, ENOENT, 0);
544 return;
545 }
546
547 dentryp = list_get_instance(lnk, tmpfs_dentry_t, link);
548
549 (void) async_data_read_finalize(callid, dentryp->name,
550 str_size(dentryp->name) + 1);
551 bytes = 1;
552 }
553
554 /*
555 * Answer the VFS_READ call.
556 */
557 ipc_answer_1(rid, EOK, bytes);
558}
559
560void tmpfs_write(ipc_callid_t rid, ipc_call_t *request)
561{
562 dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
563 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
564 off_t pos = (off_t)IPC_GET_ARG3(*request);
565
566 /*
567 * Lookup the respective TMPFS node.
568 */
569 link_t *hlp;
570 unsigned long key[] = {
571 [NODES_KEY_DEV] = dev_handle,
572 [NODES_KEY_INDEX] = index
573 };
574 hlp = hash_table_find(&nodes, key);
575 if (!hlp) {
576 ipc_answer_0(rid, ENOENT);
577 return;
578 }
579 tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t,
580 nh_link);
581
582 /*
583 * Receive the write request.
584 */
585 ipc_callid_t callid;
586 size_t size;
587 if (!async_data_write_receive(&callid, &size)) {
588 ipc_answer_0(callid, EINVAL);
589 ipc_answer_0(rid, EINVAL);
590 return;
591 }
592
593 /*
594 * Check whether the file needs to grow.
595 */
596 if (pos + size <= nodep->size) {
597 /* The file size is not changing. */
598 (void) async_data_write_finalize(callid, nodep->data + pos, size);
599 ipc_answer_2(rid, EOK, size, nodep->size);
600 return;
601 }
602 size_t delta = (pos + size) - nodep->size;
603 /*
604 * At this point, we are deliberately extremely straightforward and
605 * simply realloc the contents of the file on every write that grows the
606 * file. In the end, the situation might not be as bad as it may look:
607 * our heap allocator can save us and just grow the block whenever
608 * possible.
609 */
610 void *newdata = realloc(nodep->data, nodep->size + delta);
611 if (!newdata) {
612 ipc_answer_0(callid, ENOMEM);
613 ipc_answer_2(rid, EOK, 0, nodep->size);
614 return;
615 }
616 /* Clear any newly allocated memory in order to emulate gaps. */
617 memset(newdata + nodep->size, 0, delta);
618 nodep->size += delta;
619 nodep->data = newdata;
620 (void) async_data_write_finalize(callid, nodep->data + pos, size);
621 ipc_answer_2(rid, EOK, size, nodep->size);
622}
623
624void tmpfs_truncate(ipc_callid_t rid, ipc_call_t *request)
625{
626 dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
627 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
628 size_t size = (off_t)IPC_GET_ARG3(*request);
629
630 /*
631 * Lookup the respective TMPFS node.
632 */
633 link_t *hlp;
634 unsigned long key[] = {
635 [NODES_KEY_DEV] = dev_handle,
636 [NODES_KEY_INDEX] = index
637 };
638 hlp = hash_table_find(&nodes, key);
639 if (!hlp) {
640 ipc_answer_0(rid, ENOENT);
641 return;
642 }
643 tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t,
644 nh_link);
645
646 if (size == nodep->size) {
647 ipc_answer_0(rid, EOK);
648 return;
649 }
650
651 void *newdata = realloc(nodep->data, size);
652 if (!newdata) {
653 ipc_answer_0(rid, ENOMEM);
654 return;
655 }
656 if (size > nodep->size) {
657 size_t delta = size - nodep->size;
658 memset(newdata + nodep->size, 0, delta);
659 }
660 nodep->size = size;
661 nodep->data = newdata;
662 ipc_answer_0(rid, EOK);
663}
664
665void tmpfs_close(ipc_callid_t rid, ipc_call_t *request)
666{
667 ipc_answer_0(rid, EOK);
668}
669
670void tmpfs_destroy(ipc_callid_t rid, ipc_call_t *request)
671{
672 dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
673 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
674 int rc;
675
676 link_t *hlp;
677 unsigned long key[] = {
678 [NODES_KEY_DEV] = dev_handle,
679 [NODES_KEY_INDEX] = index
680 };
681 hlp = hash_table_find(&nodes, key);
682 if (!hlp) {
683 ipc_answer_0(rid, ENOENT);
684 return;
685 }
686 tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t,
687 nh_link);
688 rc = tmpfs_destroy_node(FS_NODE(nodep));
689 ipc_answer_0(rid, rc);
690}
691
692void tmpfs_open_node(ipc_callid_t rid, ipc_call_t *request)
693{
694 libfs_open_node(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request);
695}
696
697void tmpfs_stat(ipc_callid_t rid, ipc_call_t *request)
698{
699 libfs_stat(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request);
700}
701
702void tmpfs_sync(ipc_callid_t rid, ipc_call_t *request)
703{
704 /* Dummy implementation */
705 ipc_answer_0(rid, EOK);
706}
707
708/**
709 * @}
710 */
Note: See TracBrowser for help on using the repository browser.