Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c5747fe in mainline


Ignore:
Timestamp:
2009-05-18T17:16:24Z (13 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master
Children:
1090b8c
Parents:
687246b
Message:

Rename ramdisk protocol → block device protocol.

Location:
uspace
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/libblock/libblock.c

    r687246b rc5747fe  
    3838#include "libblock.h"
    3939#include "../../srv/vfs/vfs.h"
    40 #include "../../srv/rd/rd.h"
    4140#include <ipc/devmap.h>
     41#include <ipc/bd.h>
    4242#include <ipc/services.h>
    4343#include <errno.h>
     
    478478                        /* Refill the communication buffer with a new block. */
    479479                        ipcarg_t retval;
    480                         int rc = async_req_2_1(devcon->dev_phone, RD_READ_BLOCK,
     480                        int rc = async_req_2_1(devcon->dev_phone, BD_READ_BLOCK,
    481481                            *pos / block_size, block_size, &retval);
    482482                        if ((rc != EOK) || (retval != EOK))
  • uspace/lib/libc/include/ipc/bd.h

    r687246b rc5747fe  
    11/*
    2  * Copyright (c) 2007 Michal Konopa
    3  * Copyright (c) 2007 Martin Jelen
    4  * Copyright (c) 2007 Peter Majer
    5  * Copyright (c) 2007 Jakub Jermar
     2 * Copyright (c) 2009 Jiri Svoboda
    63 * All rights reserved.
    74 *
     
    3027 */
    3128
    32 /** @addtogroup rd
     29/** @addtogroup libcipc
    3330 * @{
    3431 */
     32/** @file
     33 */
    3534
    36 /**
    37  * @file        rd.h
    38  * @brief       Initial RAM disk for HelenOS - header
    39  */
     35#ifndef LIBC_IPC_BD_H_
     36#define LIBC_IPC_BD_H_
    4037
    41 /* Basic constants. */
     38#include <ipc/ipc.h>
    4239
    43 #ifndef RD_RD_H_
    44 #define RD_RD_H_
    45 
    46 #define RD_BASE         1024
    47 #define RD_READ_BLOCK   (RD_BASE + 1)   /**< Method for reading block. */
    48 #define RD_WRITE_BLOCK  (RD_BASE + 2)   /**< Method for writing block. */
     40typedef enum {
     41        BD_READ_BLOCK = IPC_FIRST_USER_METHOD,
     42        BD_WRITE_BLOCK
     43} bd_request_t;
    4944
    5045#endif
     46
     47/** @}
     48 */
  • uspace/srv/rd/rd.c

    r687246b rc5747fe  
    5454#include <stdio.h>
    5555#include <ipc/devmap.h>
    56 #include "rd.h"
     56#include <ipc/bd.h>
    5757
    5858#define NAME "rd"
     
    123123                        ipc_answer_0(callid, EOK);
    124124                        return;
    125                 case RD_READ_BLOCK:
     125                case BD_READ_BLOCK:
    126126                        offset = IPC_GET_ARG1(call);
    127127                        block_size = IPC_GET_ARG2(call);
     
    145145                        retval = EOK;
    146146                        break;
    147                 case RD_WRITE_BLOCK:
     147                case BD_WRITE_BLOCK:
    148148                        offset = IPC_GET_ARG1(call);
    149149                        block_size = IPC_GET_ARG2(call);
Note: See TracChangeset for help on using the changeset viewer.