Changeset 15f3c3f in mainline for uspace/srv/fs/locfs/locfs.c


Ignore:
Timestamp:
2011-06-22T22:00:52Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
86ffa27f
Parents:
ef09a7a
Message:

Rename devmap to loc, devfs to locfs.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/locfs/locfs.c

    ref09a7a r15f3c3f  
    3232
    3333/**
    34  * @file devfs.c
    35  * @brief Devices file system.
     34 * @file locfs.c
     35 * @brief Location-service file system.
    3636 *
    37  * Every device registered to device mapper is represented as a file in this
     37 * Every service registered with location service is represented as a file in this
    3838 * file system.
    3939 */
     
    4646#include <task.h>
    4747#include <libfs.h>
    48 #include "devfs.h"
    49 #include "devfs_ops.h"
     48#include "locfs.h"
     49#include "locfs_ops.h"
    5050
    51 #define NAME  "devfs"
     51#define NAME  "locfs"
    5252
    53 static vfs_info_t devfs_vfs_info = {
     53static vfs_info_t locfs_vfs_info = {
    5454        .name = NAME,
    5555        .concurrent_read_write = false,
     
    5757};
    5858
    59 fs_reg_t devfs_reg;
     59fs_reg_t locfs_reg;
    6060
    61 static void devfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     61static void locfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    6262{
    6363        if (iid)
     
    7373                switch (IPC_GET_IMETHOD(call)) {
    7474                case VFS_OUT_MOUNTED:
    75                         devfs_mounted(callid, &call);
     75                        locfs_mounted(callid, &call);
    7676                        break;
    7777                case VFS_OUT_MOUNT:
    78                         devfs_mount(callid, &call);
     78                        locfs_mount(callid, &call);
    7979                        break;
    8080                case VFS_OUT_UNMOUNTED:
    81                         devfs_unmounted(callid, &call);
     81                        locfs_unmounted(callid, &call);
    8282                        break;
    8383                case VFS_OUT_UNMOUNT:
    84                         devfs_unmount(callid, &call);
     84                        locfs_unmount(callid, &call);
    8585                        break;
    8686                case VFS_OUT_LOOKUP:
    87                         devfs_lookup(callid, &call);
     87                        locfs_lookup(callid, &call);
    8888                        break;
    8989                case VFS_OUT_OPEN_NODE:
    90                         devfs_open_node(callid, &call);
     90                        locfs_open_node(callid, &call);
    9191                        break;
    9292                case VFS_OUT_STAT:
    93                         devfs_stat(callid, &call);
     93                        locfs_stat(callid, &call);
    9494                        break;
    9595                case VFS_OUT_READ:
    96                         devfs_read(callid, &call);
     96                        locfs_read(callid, &call);
    9797                        break;
    9898                case VFS_OUT_WRITE:
    99                         devfs_write(callid, &call);
     99                        locfs_write(callid, &call);
    100100                        break;
    101101                case VFS_OUT_TRUNCATE:
    102                         devfs_truncate(callid, &call);
     102                        locfs_truncate(callid, &call);
    103103                        break;
    104104                case VFS_OUT_CLOSE:
    105                         devfs_close(callid, &call);
     105                        locfs_close(callid, &call);
    106106                        break;
    107107                case VFS_OUT_SYNC:
    108                         devfs_sync(callid, &call);
     108                        locfs_sync(callid, &call);
    109109                        break;
    110110                case VFS_OUT_DESTROY:
    111                         devfs_destroy(callid, &call);
     111                        locfs_destroy(callid, &call);
    112112                        break;
    113113                default:
     
    122122        printf("%s: HelenOS Device Filesystem\n", NAME);
    123123       
    124         if (!devfs_init()) {
    125                 printf("%s: failed to initialize devfs\n", NAME);
     124        if (!locfs_init()) {
     125                printf("%s: failed to initialize locfs\n", NAME);
    126126                return -1;
    127127        }
     
    134134        }
    135135       
    136         int rc = fs_register(vfs_sess, &devfs_reg, &devfs_vfs_info,
    137             devfs_connection);
     136        int rc = fs_register(vfs_sess, &locfs_reg, &locfs_vfs_info,
     137            locfs_connection);
    138138        if (rc != EOK) {
    139139                printf("%s: Failed to register file system (%d)\n", NAME, rc);
Note: See TracChangeset for help on using the changeset viewer.