Changeset ffa2c8ef in mainline for uspace/srv/bd/part


Ignore:
Timestamp:
2011-01-29T11:36:08Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46b881c
Parents:
64d2b10
Message:

do not intermix low-level IPC methods with async framework methods

Location:
uspace/srv/bd/part
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/part/guid_part/guid_part.c

    r64d2b10 rffa2c8ef  
    4747#include <stdlib.h>
    4848#include <unistd.h>
    49 #include <ipc/ipc.h>
    5049#include <ipc/bd.h>
    5150#include <async.h>
     
    335334
    336335        if (part == NULL) {
    337                 ipc_answer_0(iid, EINVAL);
     336                async_answer_0(iid, EINVAL);
    338337                return;
    339338        }
     
    342341
    343342        /* Answer the IPC_M_CONNECT_ME_TO call. */
    344         ipc_answer_0(iid, EOK);
     343        async_answer_0(iid, EOK);
    345344
    346345        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    347                 ipc_answer_0(callid, EHANGUP);
     346                async_answer_0(callid, EHANGUP);
    348347                return;
    349348        }
     
    351350        fs_va = as_get_mappable_page(comm_size);
    352351        if (fs_va == NULL) {
    353                 ipc_answer_0(callid, EHANGUP);
     352                async_answer_0(callid, EHANGUP);
    354353                return;
    355354        }
     
    363362                case IPC_M_PHONE_HUNGUP:
    364363                        /* The other side has hung up. */
    365                         ipc_answer_0(callid, EOK);
     364                        async_answer_0(callid, EOK);
    366365                        return;
    367366                case BD_READ_BLOCKS:
     
    386385                        break;
    387386                case BD_GET_BLOCK_SIZE:
    388                         ipc_answer_1(callid, EOK, block_size);
     387                        async_answer_1(callid, EOK, block_size);
    389388                        continue;
    390389                case BD_GET_NUM_BLOCKS:
    391                         ipc_answer_2(callid, EOK, LOWER32(part->length),
     390                        async_answer_2(callid, EOK, LOWER32(part->length),
    392391                            UPPER32(part->length));
    393392                        continue;
     
    396395                        break;
    397396                }
    398                 ipc_answer_0(callid, retval);
     397                async_answer_0(callid, retval);
    399398        }
    400399}
  • uspace/srv/bd/part/mbr_part/mbr_part.c

    r64d2b10 rffa2c8ef  
    5757#include <stdlib.h>
    5858#include <unistd.h>
    59 #include <ipc/ipc.h>
    6059#include <ipc/bd.h>
    6160#include <async.h>
     
    413412
    414413        if (part == NULL) {
    415                 ipc_answer_0(iid, EINVAL);
     414                async_answer_0(iid, EINVAL);
    416415                return;
    417416        }
     
    420419
    421420        /* Answer the IPC_M_CONNECT_ME_TO call. */
    422         ipc_answer_0(iid, EOK);
     421        async_answer_0(iid, EOK);
    423422
    424423        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    425                 ipc_answer_0(callid, EHANGUP);
     424                async_answer_0(callid, EHANGUP);
    426425                return;
    427426        }
     
    429428        fs_va = as_get_mappable_page(comm_size);
    430429        if (fs_va == NULL) {
    431                 ipc_answer_0(callid, EHANGUP);
     430                async_answer_0(callid, EHANGUP);
    432431                return;
    433432        }
     
    441440                case IPC_M_PHONE_HUNGUP:
    442441                        /* The other side has hung up. */
    443                         ipc_answer_0(callid, EOK);
     442                        async_answer_0(callid, EOK);
    444443                        return;
    445444                case BD_READ_BLOCKS:
     
    464463                        break;
    465464                case BD_GET_BLOCK_SIZE:
    466                         ipc_answer_1(callid, EOK, block_size);
     465                        async_answer_1(callid, EOK, block_size);
    467466                        continue;
    468467                case BD_GET_NUM_BLOCKS:
    469                         ipc_answer_2(callid, EOK, LOWER32(part->length),
     468                        async_answer_2(callid, EOK, LOWER32(part->length),
    470469                            UPPER32(part->length));
    471470                        continue;
     
    474473                        break;
    475474                }
    476                 ipc_answer_0(callid, retval);
     475                async_answer_0(callid, retval);
    477476        }
    478477}
Note: See TracChangeset for help on using the changeset viewer.