Changeset df747b9c in mainline for uspace/srv/devman/main.c


Ignore:
Timestamp:
2010-04-23T11:30:25Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5af21c5
Parents:
a78fa2a
Message:

added device states (usable, invalid, not present, not initialized); add_device driver callback method returns integer (errno) instead of bool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/main.c

    ra78fa2a rdf747b9c  
    309309                        driver = dev->parent->drv;             
    310310                }
    311         } else {
     311        } else if (DEVICE_USABLE == dev->state) {
    312312                driver = dev->drv;             
     313                assert(NULL != driver);
    313314        }
    314315       
    315316        if (NULL == driver) {   
    316                 printf(NAME ": devman_forward error - no driver to connect to.\n", handle);
     317                printf(NAME ": devman_forward error - the device is not in usable state.\n", handle);
    317318                ipc_answer_0(iid, ENOENT);
    318319                return;
     
    331332                return;
    332333        }
    333         printf(NAME ": devman_forward: forward connection to device %s to driver %s with phone %d.\n",
    334                 dev->pathname, driver->name, driver->phone);
     334        printf(NAME ": devman_forward: forward connection to device %s to driver %s.\n", dev->pathname, driver->name);
    335335        ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE);     
    336336}
Note: See TracChangeset for help on using the changeset viewer.