Changeset 6843a9c in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
722912e
Parents:
ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Trivial conflicts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.c

    rba72f2b r6843a9c  
    127127                        vfs_wait_handle(callid, &call);
    128128                        break;
     129                case VFS_IN_MTAB_GET:
     130                        vfs_get_mtab(callid, &call);
     131                        break;
    129132                default:
    130133                        async_answer_0(callid, ENOTSUP);
     
    156159int main(int argc, char **argv)
    157160{
    158         printf(NAME ": HelenOS VFS server\n");
     161        printf("%s: HelenOS VFS server\n", NAME);
    159162       
    160163        /*
     
    162165         */
    163166        if (!vfs_nodes_init()) {
    164                 printf(NAME ": Failed to initialize VFS node hash table\n");
     167                printf("%s: Failed to initialize VFS node hash table\n",
     168                    NAME);
    165169                return ENOMEM;
    166170        }
     
    169173         * Allocate and initialize the Path Lookup Buffer.
    170174         */
    171         plb = as_get_mappable_page(PLB_SIZE);
    172         if (!plb) {
    173                 printf(NAME ": Cannot allocate a mappable piece of address space\n");
    174                 return ENOMEM;
    175         }
    176        
    177         if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE |
    178             AS_AREA_CACHEABLE) != plb) {
    179                 printf(NAME ": Cannot create address space area\n");
     175        plb = as_area_create(AS_AREA_ANY, PLB_SIZE,
     176            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
     177        if (plb == AS_MAP_FAILED) {
     178                printf("%s: Cannot create address space area\n", NAME);
    180179                return ENOMEM;
    181180        }
     
    198197        async_set_interrupt_received(notification_received);
    199198        event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE);
    200 
     199       
    201200        /*
    202201         * Register at the naming service.
    203202         */
    204         if (service_register(SERVICE_VFS) != EOK) {
     203        int rc = service_register(SERVICE_VFS);
     204        if (rc != EOK) {
    205205                printf("%s: Cannot register VFS service\n", NAME);
    206                 return EINVAL;
     206                return rc;
    207207        }
    208208       
     
    210210         * Start accepting connections.
    211211         */
    212         printf(NAME ": Accepting connections\n");
     212        printf("%s: Accepting connections\n", NAME);
    213213        async_manager();
    214214        return 0;
Note: See TracChangeset for help on using the changeset viewer.