Changeset 6c89f20 in mainline


Ignore:
Timestamp:
2008-06-03T15:07:16Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
21c5d41
Parents:
d51db07
Message:

disable extensive debugging output

Location:
uspace/srv/vfs
Files:
3 edited

Legend:

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

    rd51db07 r6c89f20  
    4848#include "vfs.h"
    4949
     50#define NAME "vfs"
     51
    5052#define dprintf(...)    printf(__VA_ARGS__)
    5153
     
    5355{
    5456        bool keep_on_going = 1;
    55 
    56         printf("Connection opened from %p\n", icall->in_phone_hash);
    5757
    5858        /*
     
    7878                callid = async_get_call(&call);
    7979
    80                 printf("Received call, method=%d\n", IPC_GET_METHOD(call));
    81                
    8280                switch (IPC_GET_METHOD(call)) {
    8381                case IPC_M_PHONE_HUNGUP:
     
    132130        ipcarg_t phonead;
    133131
    134         printf("VFS: HelenOS VFS server\n");
     132        printf(NAME ": HelenOS VFS server\n");
    135133
    136134        /*
     
    143141         */
    144142        if (!vfs_nodes_init()) {
    145                 printf("Failed to initialize the VFS node hash table.\n");
     143                printf(NAME ": Failed to initialize VFS node hash table\n");
    146144                return ENOMEM;
    147145        }
     
    153151        plb = as_get_mappable_page(PLB_SIZE);
    154152        if (!plb) {
    155                 printf("Cannot allocate a mappable piece of address space\n");
     153                printf(NAME ": Cannot allocate a mappable piece of address space\n");
    156154                return ENOMEM;
    157155        }
    158156        if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE |
    159157            AS_AREA_CACHEABLE) != plb) {
    160                 printf("Cannot create address space area.\n");
     158                printf(NAME ": Cannot create address space area\n");
    161159                return ENOMEM;
    162160        }
     
    176174         * Start accepting connections.
    177175         */
     176        printf(NAME ": Accepting connections\n");
    178177        async_manager();
    179178        return 0;
  • uspace/srv/vfs/vfs.h

    rd51db07 r6c89f20  
    4141#include <bool.h>
    4242
    43 #define dprintf(...)    printf(__VA_ARGS__)
     43// FIXME: according to CONFIG_DEBUG
     44// #define dprintf(...) printf(__VA_ARGS__)
     45
     46#define dprintf(...)
    4447
    4548#define VFS_FIRST       IPC_FIRST_USER_METHOD
  • uspace/srv/vfs/vfs_ops.c

    rd51db07 r6c89f20  
    445445
    446446        int fd = IPC_GET_ARG1(*request);
    447 
     447       
    448448        /* Lookup the file structure corresponding to the file descriptor. */
    449449        vfs_file_t *file = vfs_file_get(fd);
     
    452452                return;
    453453        }
    454 
     454       
    455455        /*
    456456         * Now we need to receive a call with client's
     
    468468                return;
    469469        }
    470 
     470       
    471471        /*
    472472         * Lock the open file structure so that no other thread can manipulate
     
    474474         */
    475475        futex_down(&file->lock);
    476 
     476       
    477477        /*
    478478         * Lock the file's node so that no other client can read/write to it at
     
    483483        else
    484484                rwlock_write_lock(&file->node->contents_rwlock);
    485 
     485       
    486486        int fs_phone = vfs_grab_phone(file->node->fs_handle);   
    487487       
     
    501501         */
    502502        ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);
    503 
     503       
    504504        vfs_release_phone(fs_phone);
    505 
     505       
    506506        /* Wait for reply from the FS server. */
    507507        ipcarg_t rc;
    508508        async_wait_for(msg, &rc);
    509509        size_t bytes = IPC_GET_ARG1(answer);
    510 
     510       
    511511        /* Unlock the VFS node. */
    512512        if (read)
     
    518518                rwlock_write_unlock(&file->node->contents_rwlock);
    519519        }
    520 
     520       
    521521        /* Update the position pointer and unlock the open file. */
    522522        if (rc == EOK)
    523523                file->pos += bytes;
    524524        futex_up(&file->lock);
    525 
     525       
    526526        /*
    527527         * FS server's reply is the final result of the whole operation we
Note: See TracChangeset for help on using the changeset viewer.