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


Ignore:
Timestamp:
2011-03-30T13:19:28Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3fddb55
Parents:
4265fd4
Message:

devman refuse to register same function twice

File:
1 edited

Legend:

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

    r4265fd4 r0876062  
    243243        }
    244244       
     245        /* Check that function with same name is not there already. */
     246        if (find_fun_node_in_device(pdev, fun_name) != NULL) {
     247                fibril_rwlock_write_unlock(&tree->rwlock);
     248                async_answer_0(callid, EEXISTS);
     249                printf(NAME ": Warning, driver tried to register `%s' twice.\n",
     250                    fun_name);
     251                free(fun_name);
     252                return;
     253        }
     254
    245255        fun_node_t *fun = create_fun_node();
    246256        if (!insert_fun_node(&device_tree, fun, fun_name, pdev)) {
Note: See TracChangeset for help on using the changeset viewer.