Index: uspace/lib/c/generic/bd.c
===================================================================
--- uspace/lib/c/generic/bd.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,221 +1,0 @@
-/*
- * Copyright (c) 2012 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/**
- * @file
- * @brief Block device client interface
- */
-
-#include <async.h>
-#include <assert.h>
-#include <bd.h>
-#include <errno.h>
-#include <ipc/bd.h>
-#include <ipc/services.h>
-#include <loc.h>
-#include <macros.h>
-#include <stdlib.h>
-#include <offset.h>
-
-static void bd_cb_conn(ipc_call_t *icall, void *arg);
-
-errno_t bd_open(async_sess_t *sess, bd_t **rbd)
-{
-	bd_t *bd = calloc(1, sizeof(bd_t));
-	if (bd == NULL)
-		return ENOMEM;
-
-	bd->sess = sess;
-
-	async_exch_t *exch = async_exchange_begin(sess);
-
-	port_id_t port;
-	errno_t rc = async_create_callback_port(exch, INTERFACE_BLOCK_CB, 0, 0,
-	    bd_cb_conn, bd, &port);
-
-	async_exchange_end(exch);
-
-	if (rc != EOK)
-		goto error;
-
-	*rbd = bd;
-	return EOK;
-
-error:
-	if (bd != NULL)
-		free(bd);
-
-	return rc;
-}
-
-void bd_close(bd_t *bd)
-{
-	/* XXX Synchronize with bd_cb_conn */
-	free(bd);
-}
-
-errno_t bd_read_blocks(bd_t *bd, aoff64_t ba, size_t cnt, void *data, size_t size)
-{
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_3(exch, BD_READ_BLOCKS, LOWER32(ba),
-	    UPPER32(ba), cnt, &answer);
-	errno_t rc = async_data_read_start(exch, data, size);
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-errno_t bd_read_toc(bd_t *bd, uint8_t session, void *buf, size_t size)
-{
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, BD_READ_TOC, session, &answer);
-	errno_t rc = async_data_read_start(exch, buf, size);
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-errno_t bd_write_blocks(bd_t *bd, aoff64_t ba, size_t cnt, const void *data,
-    size_t size)
-{
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_3(exch, BD_WRITE_BLOCKS, LOWER32(ba),
-	    UPPER32(ba), cnt, &answer);
-	errno_t rc = async_data_write_start(exch, data, size);
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-errno_t bd_sync_cache(bd_t *bd, aoff64_t ba, size_t cnt)
-{
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	errno_t rc = async_req_3_0(exch, BD_SYNC_CACHE, LOWER32(ba),
-	    UPPER32(ba), cnt);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-errno_t bd_get_block_size(bd_t *bd, size_t *rbsize)
-{
-	sysarg_t bsize;
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	errno_t rc = async_req_0_1(exch, BD_GET_BLOCK_SIZE, &bsize);
-	async_exchange_end(exch);
-
-	if (rc != EOK)
-		return rc;
-
-	*rbsize = bsize;
-	return EOK;
-}
-
-errno_t bd_get_num_blocks(bd_t *bd, aoff64_t *rnb)
-{
-	sysarg_t nb_l;
-	sysarg_t nb_h;
-	async_exch_t *exch = async_exchange_begin(bd->sess);
-
-	errno_t rc = async_req_0_2(exch, BD_GET_NUM_BLOCKS, &nb_l, &nb_h);
-	async_exchange_end(exch);
-
-	if (rc != EOK)
-		return rc;
-
-	*rnb = (aoff64_t) MERGE_LOUP32(nb_l, nb_h);
-	return EOK;
-}
-
-static void bd_cb_conn(ipc_call_t *icall, void *arg)
-{
-	bd_t *bd = (bd_t *)arg;
-
-	(void)bd;
-
-	while (true) {
-		ipc_call_t call;
-		async_get_call(&call);
-
-		if (!ipc_get_imethod(&call)) {
-			async_answer_0(&call, EOK);
-			return;
-		}
-
-		switch (ipc_get_imethod(&call)) {
-		default:
-			async_answer_0(&call, ENOTSUP);
-		}
-	}
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/bd_srv.c
===================================================================
--- uspace/lib/c/generic/bd_srv.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,288 +1,0 @@
-/*
- * Copyright (c) 2012 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/**
- * @file
- * @brief Block device server stub
- */
-#include <errno.h>
-#include <ipc/bd.h>
-#include <macros.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include <bd_srv.h>
-
-static void bd_read_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	aoff64_t ba;
-	size_t cnt;
-	void *buf;
-	size_t size;
-	errno_t rc;
-
-	ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call));
-	cnt = ipc_get_arg3(call);
-
-	ipc_call_t rcall;
-	if (!async_data_read_receive(&rcall, &size)) {
-		async_answer_0(call, EINVAL);
-		return;
-	}
-
-	buf = malloc(size);
-	if (buf == NULL) {
-		async_answer_0(&rcall, ENOMEM);
-		async_answer_0(call, ENOMEM);
-		return;
-	}
-
-	if (srv->srvs->ops->read_blocks == NULL) {
-		async_answer_0(&rcall, ENOTSUP);
-		async_answer_0(call, ENOTSUP);
-		free(buf);
-		return;
-	}
-
-	rc = srv->srvs->ops->read_blocks(srv, ba, cnt, buf, size);
-	if (rc != EOK) {
-		async_answer_0(&rcall, ENOMEM);
-		async_answer_0(call, ENOMEM);
-		free(buf);
-		return;
-	}
-
-	async_data_read_finalize(&rcall, buf, size);
-
-	free(buf);
-	async_answer_0(call, EOK);
-}
-
-static void bd_read_toc_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	uint8_t session;
-	void *buf;
-	size_t size;
-	errno_t rc;
-
-	session = ipc_get_arg1(call);
-
-	ipc_call_t rcall;
-	if (!async_data_read_receive(&rcall, &size)) {
-		async_answer_0(call, EINVAL);
-		return;
-	}
-
-	buf = malloc(size);
-	if (buf == NULL) {
-		async_answer_0(&rcall, ENOMEM);
-		async_answer_0(call, ENOMEM);
-		return;
-	}
-
-	if (srv->srvs->ops->read_toc == NULL) {
-		async_answer_0(&rcall, ENOTSUP);
-		async_answer_0(call, ENOTSUP);
-		free(buf);
-		return;
-	}
-
-	rc = srv->srvs->ops->read_toc(srv, session, buf, size);
-	if (rc != EOK) {
-		async_answer_0(&rcall, ENOMEM);
-		async_answer_0(call, ENOMEM);
-		free(buf);
-		return;
-	}
-
-	async_data_read_finalize(&rcall, buf, size);
-
-	free(buf);
-	async_answer_0(call, EOK);
-}
-
-static void bd_sync_cache_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	aoff64_t ba;
-	size_t cnt;
-	errno_t rc;
-
-	ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call));
-	cnt = ipc_get_arg3(call);
-
-	if (srv->srvs->ops->sync_cache == NULL) {
-		async_answer_0(call, ENOTSUP);
-		return;
-	}
-
-	rc = srv->srvs->ops->sync_cache(srv, ba, cnt);
-	async_answer_0(call, rc);
-}
-
-static void bd_write_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	aoff64_t ba;
-	size_t cnt;
-	void *data;
-	size_t size;
-	errno_t rc;
-
-	ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call));
-	cnt = ipc_get_arg3(call);
-
-	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
-	if (rc != EOK) {
-		async_answer_0(call, rc);
-		return;
-	}
-
-	if (srv->srvs->ops->write_blocks == NULL) {
-		async_answer_0(call, ENOTSUP);
-		return;
-	}
-
-	rc = srv->srvs->ops->write_blocks(srv, ba, cnt, data, size);
-	free(data);
-	async_answer_0(call, rc);
-}
-
-static void bd_get_block_size_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	errno_t rc;
-	size_t block_size;
-
-	if (srv->srvs->ops->get_block_size == NULL) {
-		async_answer_0(call, ENOTSUP);
-		return;
-	}
-
-	rc = srv->srvs->ops->get_block_size(srv, &block_size);
-	async_answer_1(call, rc, block_size);
-}
-
-static void bd_get_num_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
-{
-	errno_t rc;
-	aoff64_t num_blocks;
-
-	if (srv->srvs->ops->get_num_blocks == NULL) {
-		async_answer_0(call, ENOTSUP);
-		return;
-	}
-
-	rc = srv->srvs->ops->get_num_blocks(srv, &num_blocks);
-	async_answer_2(call, rc, LOWER32(num_blocks), UPPER32(num_blocks));
-}
-
-static bd_srv_t *bd_srv_create(bd_srvs_t *srvs)
-{
-	bd_srv_t *srv;
-
-	srv = calloc(1, sizeof(bd_srv_t));
-	if (srv == NULL)
-		return NULL;
-
-	srv->srvs = srvs;
-	return srv;
-}
-
-void bd_srvs_init(bd_srvs_t *srvs)
-{
-	srvs->ops = NULL;
-	srvs->sarg = NULL;
-}
-
-errno_t bd_conn(ipc_call_t *icall, bd_srvs_t *srvs)
-{
-	bd_srv_t *srv;
-	errno_t rc;
-
-	/* Accept the connection */
-	async_accept_0(icall);
-
-	srv = bd_srv_create(srvs);
-	if (srv == NULL)
-		return ENOMEM;
-
-	async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE);
-	if (sess == NULL)
-		return ENOMEM;
-
-	srv->client_sess = sess;
-
-	rc = srvs->ops->open(srvs, srv);
-	if (rc != EOK)
-		return rc;
-
-	while (true) {
-		ipc_call_t call;
-		async_get_call(&call);
-		sysarg_t method = ipc_get_imethod(&call);
-
-		if (!method) {
-			/* The other side has hung up */
-			async_answer_0(&call, EOK);
-			break;
-		}
-
-		switch (method) {
-		case BD_READ_BLOCKS:
-			bd_read_blocks_srv(srv, &call);
-			break;
-		case BD_READ_TOC:
-			bd_read_toc_srv(srv, &call);
-			break;
-		case BD_SYNC_CACHE:
-			bd_sync_cache_srv(srv, &call);
-			break;
-		case BD_WRITE_BLOCKS:
-			bd_write_blocks_srv(srv, &call);
-			break;
-		case BD_GET_BLOCK_SIZE:
-			bd_get_block_size_srv(srv, &call);
-			break;
-		case BD_GET_NUM_BLOCKS:
-			bd_get_num_blocks_srv(srv, &call);
-			break;
-		default:
-			async_answer_0(&call, EINVAL);
-		}
-	}
-
-	rc = srvs->ops->close(srv);
-	free(srv);
-
-	return rc;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/capa.c
===================================================================
--- uspace/lib/c/generic/capa.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ uspace/lib/c/generic/capa.c	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
@@ -34,7 +34,9 @@
  */
 
+#include <assert.h>
 #include <capa.h>
 #include <errno.h>
 #include <imath.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <str.h>
Index: uspace/lib/c/generic/device/led_dev.c
===================================================================
--- uspace/lib/c/generic/device/led_dev.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <errno.h>
-#include <async.h>
-#include <io/pixel.h>
-#include <ipc/dev_iface.h>
-#include <device/led_dev.h>
-
-errno_t led_dev_color_set(async_sess_t *sess, pixel_t pixel)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-
-	aid_t req = async_send_2(exch, DEV_IFACE_ID(LED_DEV_IFACE),
-	    LED_DEV_COLOR_SET, (sysarg_t) pixel, NULL);
-
-	async_exchange_end(exch);
-
-	errno_t rc;
-	async_wait_for(req, &rc);
-
-	return (errno_t) rc;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/devman.c
===================================================================
--- uspace/lib/c/generic/devman.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,734 +1,0 @@
-/*
- * Copyright (c) 2007 Josef Cejka
- * Copyright (c) 2013 Jiri Svoboda
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <adt/list.h>
-#include <str.h>
-#include <ipc/services.h>
-#include <ns.h>
-#include <ipc/devman.h>
-#include <devman.h>
-#include <fibril_synch.h>
-#include <async.h>
-#include <errno.h>
-#include <stdlib.h>
-
-static FIBRIL_MUTEX_INITIALIZE(devman_driver_block_mutex);
-static FIBRIL_MUTEX_INITIALIZE(devman_client_block_mutex);
-
-static FIBRIL_MUTEX_INITIALIZE(devman_driver_mutex);
-static FIBRIL_MUTEX_INITIALIZE(devman_client_mutex);
-
-static async_sess_t *devman_driver_block_sess = NULL;
-static async_sess_t *devman_client_block_sess = NULL;
-
-static async_sess_t *devman_driver_sess = NULL;
-static async_sess_t *devman_client_sess = NULL;
-
-static void clone_session(fibril_mutex_t *mtx, async_sess_t *src,
-    async_sess_t **dst)
-{
-	fibril_mutex_lock(mtx);
-
-	if ((*dst == NULL) && (src != NULL))
-		*dst = src;
-
-	fibril_mutex_unlock(mtx);
-}
-
-/** Start an async exchange on the devman session (blocking).
- *
- * @param iface Device manager interface to choose
- *
- * @return New exchange.
- *
- */
-async_exch_t *devman_exchange_begin_blocking(iface_t iface)
-{
-	switch (iface) {
-	case INTERFACE_DDF_DRIVER:
-		fibril_mutex_lock(&devman_driver_block_mutex);
-
-		while (devman_driver_block_sess == NULL) {
-			clone_session(&devman_driver_mutex, devman_driver_sess,
-			    &devman_driver_block_sess);
-
-			if (devman_driver_block_sess == NULL)
-				devman_driver_block_sess =
-				    service_connect_blocking(SERVICE_DEVMAN,
-				    INTERFACE_DDF_DRIVER, 0, NULL);
-		}
-
-		fibril_mutex_unlock(&devman_driver_block_mutex);
-
-		clone_session(&devman_driver_mutex, devman_driver_block_sess,
-		    &devman_driver_sess);
-
-		return async_exchange_begin(devman_driver_block_sess);
-	case INTERFACE_DDF_CLIENT:
-		fibril_mutex_lock(&devman_client_block_mutex);
-
-		while (devman_client_block_sess == NULL) {
-			clone_session(&devman_client_mutex, devman_client_sess,
-			    &devman_client_block_sess);
-
-			if (devman_client_block_sess == NULL)
-				devman_client_block_sess =
-				    service_connect_blocking(SERVICE_DEVMAN,
-				    INTERFACE_DDF_CLIENT, 0, NULL);
-		}
-
-		fibril_mutex_unlock(&devman_client_block_mutex);
-
-		clone_session(&devman_client_mutex, devman_client_block_sess,
-		    &devman_client_sess);
-
-		return async_exchange_begin(devman_client_block_sess);
-	default:
-		return NULL;
-	}
-}
-
-/** Start an async exchange on the devman session.
- *
- * @param iface Device manager interface to choose
- *
- * @return New exchange.
- *
- */
-async_exch_t *devman_exchange_begin(iface_t iface)
-{
-	switch (iface) {
-	case INTERFACE_DDF_DRIVER:
-		fibril_mutex_lock(&devman_driver_mutex);
-
-		if (devman_driver_sess == NULL)
-			devman_driver_sess =
-			    service_connect(SERVICE_DEVMAN,
-			    INTERFACE_DDF_DRIVER, 0, NULL);
-
-		fibril_mutex_unlock(&devman_driver_mutex);
-
-		if (devman_driver_sess == NULL)
-			return NULL;
-
-		return async_exchange_begin(devman_driver_sess);
-	case INTERFACE_DDF_CLIENT:
-		fibril_mutex_lock(&devman_client_mutex);
-
-		if (devman_client_sess == NULL)
-			devman_client_sess =
-			    service_connect(SERVICE_DEVMAN,
-			    INTERFACE_DDF_CLIENT, 0, NULL);
-
-		fibril_mutex_unlock(&devman_client_mutex);
-
-		if (devman_client_sess == NULL)
-			return NULL;
-
-		return async_exchange_begin(devman_client_sess);
-	default:
-		return NULL;
-	}
-}
-
-/** Finish an async exchange on the devman session.
- *
- * @param exch Exchange to be finished.
- *
- */
-void devman_exchange_end(async_exch_t *exch)
-{
-	async_exchange_end(exch);
-}
-
-/** Register running driver with device manager. */
-errno_t devman_driver_register(const char *name)
-{
-	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-
-	ipc_call_t answer;
-	aid_t req = async_send_2(exch, DEVMAN_DRIVER_REGISTER, 0, 0, &answer);
-	errno_t retval = async_data_write_start(exch, name, str_size(name));
-
-	devman_exchange_end(exch);
-
-	if (retval != EOK) {
-		async_forget(req);
-		return retval;
-	}
-
-	exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
-	async_connect_to_me(exch, INTERFACE_ANY, 0, 0);
-	devman_exchange_end(exch);
-
-	async_wait_for(req, &retval);
-	return retval;
-}
-
-/** Add function to a device.
- *
- * Request devman to add a new function to the specified device owned by
- * this driver task.
- *
- * @param name      Name of the new function
- * @param ftype     Function type, fun_inner or fun_exposed
- * @param match_ids Match IDs (should be empty for fun_exposed)
- * @param devh      Devman handle of the device
- * @param funh      Place to store handle of the new function
- *
- * @return EOK on success or an error code.
- *
- */
-errno_t devman_add_function(const char *name, fun_type_t ftype,
-    match_id_list_t *match_ids, devman_handle_t devh, devman_handle_t *funh)
-{
-	unsigned long match_count = list_count(&match_ids->ids);
-	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-
-	ipc_call_t answer;
-	aid_t req = async_send_3(exch, DEVMAN_ADD_FUNCTION, (sysarg_t) ftype,
-	    devh, match_count, &answer);
-	errno_t retval = async_data_write_start(exch, name, str_size(name));
-	if (retval != EOK) {
-		devman_exchange_end(exch);
-		async_forget(req);
-		return retval;
-	}
-
-	list_foreach(match_ids->ids, link, match_id_t, match_id) {
-		ipc_call_t answer2;
-		aid_t req2 = async_send_1(exch, DEVMAN_ADD_MATCH_ID,
-		    match_id->score, &answer2);
-		retval = async_data_write_start(exch, match_id->id,
-		    str_size(match_id->id));
-		if (retval != EOK) {
-			devman_exchange_end(exch);
-			async_forget(req2);
-			async_forget(req);
-			return retval;
-		}
-
-		async_wait_for(req2, &retval);
-		if (retval != EOK) {
-			devman_exchange_end(exch);
-			async_forget(req);
-			return retval;
-		}
-	}
-
-	devman_exchange_end(exch);
-
-	async_wait_for(req, &retval);
-	if (retval == EOK) {
-		if (funh != NULL)
-			*funh = (int) ipc_get_arg1(&answer);
-	} else {
-		if (funh != NULL)
-			*funh = -1;
-	}
-
-	return retval;
-}
-
-errno_t devman_add_device_to_category(devman_handle_t devman_handle,
-    const char *cat_name)
-{
-	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, DEVMAN_ADD_DEVICE_TO_CATEGORY,
-	    devman_handle, &answer);
-	errno_t retval = async_data_write_start(exch, cat_name,
-	    str_size(cat_name));
-
-	devman_exchange_end(exch);
-
-	if (retval != EOK) {
-		async_forget(req);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-	return retval;
-}
-
-async_sess_t *devman_device_connect(devman_handle_t handle, unsigned int flags)
-{
-	async_sess_t *sess;
-
-	if (flags & IPC_FLAG_BLOCKING)
-		sess = service_connect_blocking(SERVICE_DEVMAN,
-		    INTERFACE_DEVMAN_DEVICE, handle, NULL);
-	else
-		sess = service_connect(SERVICE_DEVMAN,
-		    INTERFACE_DEVMAN_DEVICE, handle, NULL);
-
-	return sess;
-}
-
-/** Remove function from device.
- *
- * Request devman to remove function owned by this driver task.
- * @param funh      Devman handle of the function
- *
- * @return EOK on success or an error code.
- */
-errno_t devman_remove_function(devman_handle_t funh)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-	retval = async_req_1_0(exch, DEVMAN_REMOVE_FUNCTION, (sysarg_t) funh);
-	devman_exchange_end(exch);
-
-	return retval;
-}
-
-errno_t devman_drv_fun_online(devman_handle_t funh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_ONLINE, funh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-errno_t devman_drv_fun_offline(devman_handle_t funh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_OFFLINE, funh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-async_sess_t *devman_parent_device_connect(devman_handle_t handle,
-    unsigned int flags)
-{
-	async_sess_t *sess;
-
-	if (flags & IPC_FLAG_BLOCKING)
-		sess = service_connect_blocking(SERVICE_DEVMAN,
-		    INTERFACE_DEVMAN_PARENT, handle, NULL);
-	else
-		sess = service_connect(SERVICE_DEVMAN,
-		    INTERFACE_DEVMAN_PARENT, handle, NULL);
-
-	return sess;
-}
-
-errno_t devman_fun_get_handle(const char *pathname, devman_handle_t *handle,
-    unsigned int flags)
-{
-	async_exch_t *exch;
-
-	if (flags & IPC_FLAG_BLOCKING)
-		exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
-	else {
-		exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-		if (exch == NULL)
-			return ENOMEM;
-	}
-
-	ipc_call_t answer;
-	aid_t req = async_send_2(exch, DEVMAN_DEVICE_GET_HANDLE, flags, 0,
-	    &answer);
-	errno_t retval = async_data_write_start(exch, pathname,
-	    str_size(pathname));
-
-	devman_exchange_end(exch);
-
-	if (retval != EOK) {
-		async_forget(req);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = (devman_handle_t) -1;
-
-		return retval;
-	}
-
-	if (handle != NULL)
-		*handle = (devman_handle_t) ipc_get_arg1(&answer);
-
-	return retval;
-}
-
-static errno_t devman_get_str_internal(sysarg_t method, sysarg_t arg1,
-    sysarg_t arg2, sysarg_t *r1, char *buf, size_t buf_size)
-{
-	async_exch_t *exch;
-	ipc_call_t dreply;
-	size_t act_size;
-	errno_t dretval;
-
-	exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
-
-	ipc_call_t answer;
-	aid_t req = async_send_2(exch, method, arg1, arg2, &answer);
-	aid_t dreq = async_data_read(exch, buf, buf_size - 1, &dreply);
-	async_wait_for(dreq, &dretval);
-
-	devman_exchange_end(exch);
-
-	if (dretval != EOK) {
-		async_forget(req);
-		return dretval;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		return retval;
-	}
-
-	if (r1 != NULL)
-		*r1 = ipc_get_arg1(&answer);
-	act_size = ipc_get_arg2(&dreply);
-	assert(act_size <= buf_size - 1);
-	buf[act_size] = '\0';
-
-	return EOK;
-}
-
-errno_t devman_fun_get_path(devman_handle_t handle, char *buf, size_t buf_size)
-{
-	return devman_get_str_internal(DEVMAN_FUN_GET_PATH, handle, 0, NULL,
-	    buf, buf_size);
-}
-
-errno_t devman_fun_get_match_id(devman_handle_t handle, size_t index, char *buf,
-    size_t buf_size, unsigned int *rscore)
-{
-	errno_t rc;
-	sysarg_t score = 0;
-
-	rc = devman_get_str_internal(DEVMAN_FUN_GET_MATCH_ID, handle, index,
-	    &score, buf, buf_size);
-	if (rc != EOK)
-		return rc;
-
-	*rscore = score;
-	return rc;
-}
-
-errno_t devman_fun_get_name(devman_handle_t handle, char *buf, size_t buf_size)
-{
-	return devman_get_str_internal(DEVMAN_FUN_GET_NAME, handle, 0, NULL,
-	    buf, buf_size);
-}
-
-errno_t devman_fun_get_driver_name(devman_handle_t handle, char *buf, size_t buf_size)
-{
-	return devman_get_str_internal(DEVMAN_FUN_GET_DRIVER_NAME, handle, 0,
-	    NULL, buf, buf_size);
-}
-
-errno_t devman_fun_online(devman_handle_t funh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_ONLINE, funh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-errno_t devman_fun_offline(devman_handle_t funh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_OFFLINE, funh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-static errno_t devman_get_handles_once(sysarg_t method, sysarg_t arg1,
-    devman_handle_t *handle_buf, size_t buf_size, size_t *act_size)
-{
-	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, method, arg1, &answer);
-	errno_t rc = async_data_read_start(exch, handle_buf, buf_size);
-
-	devman_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		return retval;
-	}
-
-	*act_size = ipc_get_arg1(&answer);
-	return EOK;
-}
-
-/** Get list of handles.
- *
- * Returns an allocated array of handles.
- *
- * @param method	IPC method
- * @param arg1		IPC argument 1
- * @param data		Place to store pointer to array of handles
- * @param count		Place to store number of handles
- * @return 		EOK on success or an error code
- */
-static errno_t devman_get_handles_internal(sysarg_t method, sysarg_t arg1,
-    devman_handle_t **data, size_t *count)
-{
-	devman_handle_t *handles;
-	size_t act_size;
-	size_t alloc_size;
-	errno_t rc;
-
-	*data = NULL;
-	act_size = 0;	/* silence warning */
-
-	rc = devman_get_handles_once(method, arg1, NULL, 0,
-	    &act_size);
-	if (rc != EOK)
-		return rc;
-
-	alloc_size = act_size;
-	handles = malloc(alloc_size);
-	if (handles == NULL)
-		return ENOMEM;
-
-	while (true) {
-		rc = devman_get_handles_once(method, arg1, handles, alloc_size,
-		    &act_size);
-		if (rc != EOK)
-			return rc;
-
-		if (act_size <= alloc_size)
-			break;
-
-		alloc_size *= 2;
-		free(handles);
-
-		handles = malloc(alloc_size);
-		if (handles == NULL)
-			return ENOMEM;
-	}
-
-	*count = act_size / sizeof(devman_handle_t);
-	*data = handles;
-	return EOK;
-}
-
-errno_t devman_fun_get_child(devman_handle_t funh, devman_handle_t *devh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_GET_CHILD,
-	    funh, devh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-errno_t devman_dev_get_functions(devman_handle_t devh, devman_handle_t **funcs,
-    size_t *count)
-{
-	return devman_get_handles_internal(DEVMAN_DEV_GET_FUNCTIONS,
-	    devh, funcs, count);
-}
-
-errno_t devman_dev_get_parent(devman_handle_t devh, devman_handle_t *funh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_1(exch, DEVMAN_DEV_GET_PARENT,
-	    devh, funh);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-errno_t devman_fun_sid_to_handle(service_id_t sid, devman_handle_t *handle)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_SID_TO_HANDLE,
-	    sid, handle);
-
-	devman_exchange_end(exch);
-	return retval;
-}
-
-errno_t devman_get_drivers(devman_handle_t **drvs,
-    size_t *count)
-{
-	return devman_get_handles_internal(DEVMAN_GET_DRIVERS, 0, drvs, count);
-}
-
-errno_t devman_driver_get_devices(devman_handle_t drvh, devman_handle_t **devs,
-    size_t *count)
-{
-	return devman_get_handles_internal(DEVMAN_DRIVER_GET_DEVICES,
-	    drvh, devs, count);
-}
-
-errno_t devman_driver_get_handle(const char *drvname, devman_handle_t *handle)
-{
-	async_exch_t *exch;
-
-	exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	ipc_call_t answer;
-	aid_t req = async_send_0(exch, DEVMAN_DRIVER_GET_HANDLE, &answer);
-	errno_t retval = async_data_write_start(exch, drvname,
-	    str_size(drvname));
-
-	devman_exchange_end(exch);
-
-	if (retval != EOK) {
-		async_forget(req);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = (devman_handle_t) -1;
-
-		return retval;
-	}
-
-	if (handle != NULL)
-		*handle = (devman_handle_t) ipc_get_arg1(&answer);
-
-	return retval;
-}
-
-errno_t devman_driver_get_match_id(devman_handle_t handle, size_t index, char *buf,
-    size_t buf_size, unsigned int *rscore)
-{
-	errno_t rc;
-	sysarg_t score = 0;
-
-	rc = devman_get_str_internal(DEVMAN_DRIVER_GET_MATCH_ID, handle, index,
-	    &score, buf, buf_size);
-	if (rc != EOK)
-		return rc;
-
-	*rscore = score;
-	return rc;
-}
-
-errno_t devman_driver_get_name(devman_handle_t handle, char *buf, size_t buf_size)
-{
-	return devman_get_str_internal(DEVMAN_DRIVER_GET_NAME, handle, 0, NULL,
-	    buf, buf_size);
-}
-
-errno_t devman_driver_get_state(devman_handle_t drvh, driver_state_t *rstate)
-{
-	sysarg_t state;
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t rc = async_req_1_1(exch, DEVMAN_DRIVER_GET_STATE, drvh,
-	    &state);
-
-	devman_exchange_end(exch);
-	if (rc != EOK)
-		return rc;
-
-	*rstate = state;
-	return rc;
-}
-
-errno_t devman_driver_load(devman_handle_t drvh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_LOAD, drvh);
-
-	devman_exchange_end(exch);
-	return rc;
-}
-
-errno_t devman_driver_unload(devman_handle_t drvh)
-{
-	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
-	if (exch == NULL)
-		return ENOMEM;
-
-	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_UNLOAD, drvh);
-
-	devman_exchange_end(exch);
-	return rc;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/io/chardev.c
===================================================================
--- uspace/lib/c/generic/io/chardev.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,223 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * Copyright (c) 2017 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/**
- * @file
- * @brief Character device client interface
- */
-
-#include <errno.h>
-#include <mem.h>
-#include <io/chardev.h>
-#include <ipc/chardev.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-/** Open character device.
- *
- * @param sess Session with the character device
- * @param rchardev Place to store pointer to the new character device structure
- *
- * @return EOK on success, ENOMEM if out of memory, EIO on I/O error
- */
-errno_t chardev_open(async_sess_t *sess, chardev_t **rchardev)
-{
-	chardev_t *chardev;
-
-	chardev = calloc(1, sizeof(chardev_t));
-	if (chardev == NULL)
-		return ENOMEM;
-
-	chardev->sess = sess;
-	*rchardev = chardev;
-
-	/* EIO might be used in a future implementation */
-	return EOK;
-}
-
-/** Close character device.
- *
- * Frees the character device structure. The underlying session is
- * not affected.
- *
- * @param chardev Character device or @c NULL
- */
-void chardev_close(chardev_t *chardev)
-{
-	free(chardev);
-}
-
-/** Read from character device.
- *
- * Read as much data as is available from character device up to @a size
- * bytes into @a buf. On success EOK is returned and at least one byte
- * is read (if no byte is available the function blocks). The number
- * of bytes read is stored in @a *nread.
- *
- * On error a non-zero error code is returned and @a *nread is filled with
- * the number of bytes that were successfully transferred.
- *
- * @param chardev Character device
- * @param buf Destination buffer
- * @param size Maximum number of bytes to read
- * @param nread Place to store actual number of bytes read
- * @param flags @c chardev_f_nonblock to return immediately even if no
- *              bytes are available
- *
- * @return EOK on success or non-zero error code
- */
-errno_t chardev_read(chardev_t *chardev, void *buf, size_t size, size_t *nread,
-    chardev_flags_t flags)
-{
-	async_exch_t *exch = async_exchange_begin(chardev->sess);
-
-	if (size > DATA_XFER_LIMIT) {
-		/* This should not hurt anything. */
-		size = DATA_XFER_LIMIT;
-	}
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, CHARDEV_READ, flags, &answer);
-	errno_t rc = async_data_read_start(exch, buf, size);
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		*nread = 0;
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		*nread = 0;
-		return retval;
-	}
-
-	*nread = ipc_get_arg2(&answer);
-	/* In case of partial success, ARG1 contains the error code */
-	return (errno_t) ipc_get_arg1(&answer);
-
-}
-
-/** Write up to DATA_XFER_LIMIT bytes to character device.
- *
- * Write up to @a size or DATA_XFER_LIMIT bytes from @a data to character
- * device. On success EOK is returned, bytes were written and @a *nwritten
- * is set to min(@a size, DATA_XFER_LIMIT)
- *
- * On error a non-zero error code is returned and @a *nwritten is filled with
- * the number of bytes that were successfully transferred.
- *
- * @param chardev Character device
- * @param buf Destination buffer
- * @param size Maximum number of bytes to read
- * @param nwritten Place to store actual number of bytes written
- *
- * @return EOK on success or non-zero error code
- */
-static errno_t chardev_write_once(chardev_t *chardev, const void *data,
-    size_t size, size_t *nwritten)
-{
-	async_exch_t *exch = async_exchange_begin(chardev->sess);
-	ipc_call_t answer;
-	aid_t req;
-	errno_t rc;
-
-	/* Break down large transfers */
-	if (size > DATA_XFER_LIMIT)
-		size = DATA_XFER_LIMIT;
-
-	req = async_send_0(exch, CHARDEV_WRITE, &answer);
-	rc = async_data_write_start(exch, data, size);
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		*nwritten = 0;
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-	if (retval != EOK) {
-		*nwritten = 0;
-		return retval;
-	}
-
-	*nwritten = ipc_get_arg2(&answer);
-	/* In case of partial success, ARG1 contains the error code */
-	return (errno_t) ipc_get_arg1(&answer);
-}
-
-/** Write to character device.
- *
- * Write @a size bytes from @a data to character device. On success EOK
- * is returned, all bytes were written and @a *nwritten is set to @a size.
- *
- * On error a non-zero error code is returned and @a *nwritten is filled with
- * the number of bytes that were successfully transferred.
- *
- * @param chardev Character device
- * @param buf Destination buffer
- * @param size Maximum number of bytes to read
- * @param nwritten Place to store actual number of bytes written
- *
- * @return EOK on success or non-zero error code
- */
-errno_t chardev_write(chardev_t *chardev, const void *data, size_t size,
-    size_t *nwritten)
-{
-	size_t nw;
-	size_t p;
-	errno_t rc;
-
-	p = 0;
-	while (p < size) {
-		rc = chardev_write_once(chardev, data + p, size - p, &nw);
-		/* nw is always valid, we can have partial success */
-		p += nw;
-
-		if (rc != EOK) {
-			/* We can return partial success */
-			*nwritten = p;
-			return rc;
-		}
-	}
-
-	*nwritten = p;
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/io/chardev_srv.c
===================================================================
--- uspace/lib/c/generic/io/chardev_srv.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,190 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/**
- * @file
- * @brief Character device server stub
- */
-#include <errno.h>
-#include <io/chardev_srv.h>
-#include <ipc/chardev.h>
-#include <macros.h>
-#include <stdlib.h>
-#include <stddef.h>
-
-static chardev_srv_t *chardev_srv_create(chardev_srvs_t *);
-
-static void chardev_read_srv(chardev_srv_t *srv, ipc_call_t *icall)
-{
-	void *buf;
-	size_t size;
-	size_t nread;
-	chardev_flags_t flags;
-	errno_t rc;
-
-	flags = ipc_get_arg1(icall);
-
-	ipc_call_t call;
-	if (!async_data_read_receive(&call, &size)) {
-		async_answer_0(icall, EINVAL);
-		return;
-	}
-
-	buf = malloc(size);
-	if (buf == NULL) {
-		async_answer_0(&call, ENOMEM);
-		async_answer_0(icall, ENOMEM);
-		return;
-	}
-
-	if (srv->srvs->ops->read == NULL) {
-		async_answer_0(&call, ENOTSUP);
-		async_answer_0(icall, ENOTSUP);
-		free(buf);
-		return;
-	}
-
-	rc = srv->srvs->ops->read(srv, buf, size, &nread, flags);
-	if (rc != EOK && nread == 0) {
-		async_answer_0(&call, rc);
-		async_answer_0(icall, rc);
-		free(buf);
-		return;
-	}
-
-	async_data_read_finalize(&call, buf, nread);
-
-	free(buf);
-	async_answer_2(icall, EOK, (sysarg_t) rc, nread);
-}
-
-static void chardev_write_srv(chardev_srv_t *srv, ipc_call_t *icall)
-{
-	void *data;
-	size_t size;
-	size_t nwr;
-	errno_t rc;
-
-	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
-	if (rc != EOK) {
-		async_answer_0(icall, rc);
-		return;
-	}
-
-	if (srv->srvs->ops->write == NULL) {
-		async_answer_0(icall, ENOTSUP);
-		return;
-	}
-
-	rc = srv->srvs->ops->write(srv, data, size, &nwr);
-	free(data);
-	if (rc != EOK && nwr == 0) {
-		async_answer_0(icall, rc);
-		return;
-	}
-
-	async_answer_2(icall, EOK, (sysarg_t) rc, nwr);
-}
-
-static chardev_srv_t *chardev_srv_create(chardev_srvs_t *srvs)
-{
-	chardev_srv_t *srv;
-
-	srv = calloc(1, sizeof(chardev_srv_t));
-	if (srv == NULL)
-		return NULL;
-
-	srv->srvs = srvs;
-	return srv;
-}
-
-void chardev_srvs_init(chardev_srvs_t *srvs)
-{
-	srvs->ops = NULL;
-	srvs->sarg = NULL;
-}
-
-errno_t chardev_conn(ipc_call_t *icall, chardev_srvs_t *srvs)
-{
-	chardev_srv_t *srv;
-	errno_t rc;
-
-	/* Accept the connection */
-	async_accept_0(icall);
-
-	srv = chardev_srv_create(srvs);
-	if (srv == NULL)
-		return ENOMEM;
-
-	if (srvs->ops->open != NULL) {
-		rc = srvs->ops->open(srvs, srv);
-		if (rc != EOK)
-			return rc;
-	}
-
-	while (true) {
-		ipc_call_t call;
-		async_get_call(&call);
-		sysarg_t method = ipc_get_imethod(&call);
-
-		if (!method) {
-			/* The other side has hung up */
-			async_answer_0(&call, EOK);
-			break;
-		}
-
-		switch (method) {
-		case CHARDEV_READ:
-			chardev_read_srv(srv, &call);
-			break;
-		case CHARDEV_WRITE:
-			chardev_write_srv(srv, &call);
-			break;
-		default:
-			if (srv->srvs->ops->def_handler != NULL)
-				srv->srvs->ops->def_handler(srv, &call);
-			else
-				async_answer_0(&call, ENOTSUP);
-		}
-	}
-
-	if (srvs->ops->close != NULL)
-		rc = srvs->ops->close(srv);
-	else
-		rc = EOK;
-
-	free(srv);
-
-	return rc;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/io/label.c
===================================================================
--- uspace/lib/c/generic/io/label.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,105 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file Volume service API
- */
-
-#include <errno.h>
-#include <io/label.h>
-#include <stdlib.h>
-#include <str.h>
-
-/** Format label type as string.
- *
- * @param ltype Label type
- * @param rstr Place to return pointer to newly allocated string
- * @return EOK on success, ENOMEM if out of memory
- */
-int label_type_format(label_type_t ltype, char **rstr)
-{
-	const char *sltype;
-	char *s;
-
-	sltype = NULL;
-	switch (ltype) {
-	case lt_none:
-		sltype = "None";
-		break;
-	case lt_mbr:
-		sltype = "MBR";
-		break;
-	case lt_gpt:
-		sltype = "GPT";
-		break;
-	}
-
-	s = str_dup(sltype);
-	if (s == NULL)
-		return ENOMEM;
-
-	*rstr = s;
-	return EOK;
-}
-
-/** Format partition kind as string.
- *
- * @param pkind Partition kind
- * @param rstr Place to return pointer to newly allocated string
- * @return EOK on success, ENOMEM if out of memory
- */
-int label_pkind_format(label_pkind_t pkind, char **rstr)
-{
-	const char *spkind;
-	char *s;
-
-	spkind = NULL;
-	switch (pkind) {
-	case lpk_primary:
-		spkind = "Primary";
-		break;
-	case lpk_extended:
-		spkind = "Extended";
-		break;
-	case lpk_logical:
-		spkind = "Logical";
-		break;
-	}
-
-	s = str_dup(spkind);
-	if (s == NULL)
-		return ENOMEM;
-
-	*rstr = s;
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/io/serial.c
===================================================================
--- uspace/lib/c/generic/io/serial.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,105 +1,0 @@
-/*
- * Copyright (c) 2017 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <async.h>
-#include <errno.h>
-#include <io/serial.h>
-#include <ipc/serial_ctl.h>
-#include <ipc/services.h>
-#include <stdlib.h>
-
-/** Open serial port device.
- *
- * @param sess Session with the serial port device
- * @param rchardev Place to store pointer to the new serial port device structure
- *
- * @return EOK on success, ENOMEM if out of memory, EIO on I/O error
- */
-errno_t serial_open(async_sess_t *sess, serial_t **rserial)
-{
-	serial_t *serial;
-
-	serial = calloc(1, sizeof(serial_t));
-	if (serial == NULL)
-		return ENOMEM;
-
-	serial->sess = sess;
-	*rserial = serial;
-
-	return EOK;
-}
-
-/** Close serial port device.
- *
- * Frees the serial port device structure. The underlying session is
- * not affected.
- *
- * @param serial Serial port device or @c NULL
- */
-void serial_close(serial_t *serial)
-{
-	free(serial);
-}
-
-/** Set serial port communication properties. */
-errno_t serial_set_comm_props(serial_t *serial, unsigned rate,
-    serial_parity_t parity, unsigned datab, unsigned stopb)
-{
-	async_exch_t *exch = async_exchange_begin(serial->sess);
-
-	errno_t rc = async_req_4_0(exch, SERIAL_SET_COM_PROPS, rate, parity,
-	    datab, stopb);
-
-	async_exchange_end(exch);
-	return rc;
-}
-
-/** Get serial port communication properties. */
-errno_t serial_get_comm_props(serial_t *serial, unsigned *rrate,
-    serial_parity_t *rparity, unsigned *rdatab, unsigned *rstopb)
-{
-	async_exch_t *exch = async_exchange_begin(serial->sess);
-	sysarg_t rate, parity, datab, stopb;
-
-	errno_t rc = async_req_0_4(exch, SERIAL_GET_COM_PROPS, &rate, &parity,
-	    &datab, &stopb);
-
-	async_exchange_end(exch);
-	if (rc != EOK)
-		return rc;
-
-	*rrate = rate;
-	*rparity = parity;
-	*rdatab = datab;
-	*rstopb = stopb;
-
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/irc.c
===================================================================
--- uspace/lib/c/generic/irc.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,159 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <assert.h>
-#include <async.h>
-#include <errno.h>
-#include <fibril.h>
-#include <ipc/irc.h>
-#include <ipc/services.h>
-#include <irc.h>
-#include <loc.h>
-#include <stdlib.h>
-#include <sysinfo.h>
-
-static async_sess_t *irc_sess;
-
-/** Connect to IRC service.
- *
- * @return	EOK on success, EIO on failure
- */
-static errno_t irc_init(void)
-{
-	category_id_t irc_cat;
-	service_id_t *svcs;
-	size_t count;
-	errno_t rc;
-
-	assert(irc_sess == NULL);
-	rc = loc_category_get_id("irc", &irc_cat, IPC_FLAG_BLOCKING);
-	if (rc != EOK)
-		return EIO;
-
-	while (true) {
-		rc = loc_category_get_svcs(irc_cat, &svcs, &count);
-		if (rc != EOK)
-			return EIO;
-
-		if (count > 0)
-			break;
-
-		free(svcs);
-
-		// XXX This is just a temporary hack
-		fibril_usleep(500 * 1000);
-	}
-
-	irc_sess = loc_service_connect(svcs[0], INTERFACE_IRC,
-	    IPC_FLAG_BLOCKING);
-	free(svcs);
-
-	if (irc_sess == NULL)
-		return EIO;
-
-	return EOK;
-}
-
-/** Enable interrupt.
- *
- * Allow interrupt delivery.
- *
- * @param irq	IRQ number
- */
-errno_t irc_enable_interrupt(int irq)
-{
-	errno_t rc;
-
-	if (irc_sess == NULL) {
-		rc = irc_init();
-		if (rc != EOK)
-			return rc;
-	}
-
-	async_exch_t *exch = async_exchange_begin(irc_sess);
-	rc = async_req_1_0(exch, IRC_ENABLE_INTERRUPT, irq);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-/** Disable interrupt.
- *
- * Disallow interrupt delivery.
- *
- * @param irq	IRQ number
- */
-errno_t irc_disable_interrupt(int irq)
-{
-	errno_t rc;
-
-	if (irc_sess == NULL) {
-		rc = irc_init();
-		if (rc != EOK)
-			return rc;
-	}
-
-	async_exch_t *exch = async_exchange_begin(irc_sess);
-	rc = async_req_1_0(exch, IRC_DISABLE_INTERRUPT, irq);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-/** Clear interrupt.
- *
- * Clear/acknowledge interrupt in interrupt controller so that
- * another interrupt can be delivered.
- *
- * @param irq	IRQ number
- */
-errno_t irc_clear_interrupt(int irq)
-{
-	errno_t rc;
-
-	if (irc_sess == NULL) {
-		rc = irc_init();
-		if (rc != EOK)
-			return rc;
-	}
-
-	async_exch_t *exch = async_exchange_begin(irc_sess);
-	rc = async_req_1_0(exch, IRC_CLEAR_INTERRUPT, irq);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/pci.c
===================================================================
--- uspace/lib/c/generic/pci.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,225 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file PCI control service API
- */
-
-#include <abi/ipc/interfaces.h>
-#include <errno.h>
-#include <ipc/devman.h>
-#include <ipc/services.h>
-#include <ipc/pci.h>
-#include <loc.h>
-#include <pci.h>
-#include <stdlib.h>
-#include <types/pci.h>
-
-/** Open PCI service.
- *
- * @param svc_id PCI sevice ID
- * @param rpci   Place to store pointer to PCI service object.
- *
- * @return EOK on success, ENOMEM if out of memory, EIO if service
- *         cannot be contacted.
- */
-errno_t pci_open(service_id_t svc_id, pci_t **rpci)
-{
-	pci_t *pci;
-	errno_t rc;
-
-	pci = calloc(1, sizeof(pci_t));
-	if (pci == NULL) {
-		rc = ENOMEM;
-		goto error;
-	}
-
-	pci->sess = loc_service_connect(svc_id, INTERFACE_PCI, 0);
-	if (pci->sess == NULL) {
-		rc = EIO;
-		goto error;
-	}
-
-	*rpci = pci;
-	return EOK;
-error:
-	free(pci);
-	return rc;
-}
-
-/** Close PCI service.
- *
- * @param pci PCI service object or @c NULL
- */
-void pci_close(pci_t *pci)
-{
-	if (pci == NULL)
-		return;
-
-	async_hangup(pci->sess);
-	free(pci);
-}
-
-/** Get list of IDs into a buffer of fixed size.
- *
- * @param pci      PCI service
- * @param method   IPC method
- * @param arg1     First argument
- * @param id_buf   Buffer to store IDs
- * @param buf_size Buffer size
- * @param act_size Place to store actual size of complete data.
- *
- * @return EOK on success or an error code.
- */
-static errno_t pci_get_ids_once(pci_t *pci, sysarg_t method, sysarg_t arg1,
-    sysarg_t *id_buf, size_t buf_size, size_t *act_size)
-{
-	async_exch_t *exch = async_exchange_begin(pci->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, method, arg1, &answer);
-	errno_t rc = async_data_read_start(exch, id_buf, buf_size);
-
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		return retval;
-	}
-
-	*act_size = ipc_get_arg1(&answer);
-	return EOK;
-}
-
-/** Get list of IDs.
- *
- * Returns an allocated array of service IDs.
- *
- * @param pci    PCI service
- * @param method IPC method
- * @param arg1   IPC argument 1
- * @param data   Place to store pointer to array of IDs
- * @param count  Place to store number of IDs
- * @return       EOK on success or an error code
- */
-static errno_t pci_get_ids_internal(pci_t *pci, sysarg_t method, sysarg_t arg1,
-    sysarg_t **data, size_t *count)
-{
-	*data = NULL;
-	*count = 0;
-
-	size_t act_size = 0;
-	errno_t rc = pci_get_ids_once(pci, method, arg1, NULL, 0, &act_size);
-	if (rc != EOK)
-		return rc;
-
-	size_t alloc_size = act_size;
-	service_id_t *ids = malloc(alloc_size);
-	if (ids == NULL)
-		return ENOMEM;
-
-	while (true) {
-		rc = pci_get_ids_once(pci, method, arg1, ids, alloc_size,
-		    &act_size);
-		if (rc != EOK)
-			return rc;
-
-		if (act_size <= alloc_size)
-			break;
-
-		alloc_size = act_size;
-		service_id_t *tmp = realloc(ids, alloc_size);
-		if (tmp == NULL) {
-			free(ids);
-			return ENOMEM;
-		}
-		ids = tmp;
-	}
-
-	*count = act_size / sizeof(service_id_t);
-	*data = ids;
-	return EOK;
-}
-
-/** Get list of PCI devices as array of devman handles.
- *
- * @param pci PCI service
- * @param data Place to store pointer to array
- * @param count Place to store length of array (number of entries)
- *
- * @return EOK on success or an error code
- */
-errno_t pci_get_devices(pci_t *pci, devman_handle_t **data, size_t *count)
-{
-	return pci_get_ids_internal(pci, PCI_GET_DEVICES, 0, data, count);
-}
-
-extern errno_t pci_dev_get_info(pci_t *, devman_handle_t, pci_dev_info_t *);
-
-/** Get PCI device information.
- *
- * @param pci PCI service
- * @param dev_handle Device handle
- * @param info Place to store device information
- * @return EOK on success or an error code
- */
-errno_t pci_dev_get_info(pci_t *pci, devman_handle_t dev_handle,
-    pci_dev_info_t *info)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(pci->sess);
-	aid_t req = async_send_1(exch, PCI_DEV_GET_INFO, dev_handle, &answer);
-
-	errno_t rc = async_data_read_start(exch, info, sizeof(pci_dev_info_t));
-	async_exchange_end(exch);
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/time.c
===================================================================
--- uspace/lib/c/generic/time.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ uspace/lib/c/generic/time.c	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
@@ -47,4 +47,5 @@
 #include <stdint.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 #include <assert.h>
Index: uspace/lib/c/generic/vbd.c
===================================================================
--- uspace/lib/c/generic/vbd.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,364 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file Virtual Block Device client API
- */
-
-#include <abi/ipc/interfaces.h>
-#include <errno.h>
-#include <ipc/services.h>
-#include <ipc/vbd.h>
-#include <loc.h>
-#include <macros.h>
-#include <mem.h>
-#include <stdlib.h>
-#include <types/label.h>
-#include <vbd.h>
-
-static errno_t vbd_get_ids_internal(vbd_t *, sysarg_t, sysarg_t, sysarg_t **,
-    size_t *);
-
-errno_t vbd_create(vbd_t **rvbd)
-{
-	vbd_t *vbd;
-	service_id_t vbd_svcid;
-	errno_t rc;
-
-	vbd = calloc(1, sizeof(vbd_t));
-	if (vbd == NULL) {
-		rc = ENOMEM;
-		goto error;
-	}
-
-	rc = loc_service_get_id(SERVICE_NAME_VBD, &vbd_svcid,
-	    IPC_FLAG_BLOCKING);
-	if (rc != EOK) {
-		rc = EIO;
-		goto error;
-	}
-
-	vbd->sess = loc_service_connect(vbd_svcid, INTERFACE_VBD,
-	    IPC_FLAG_BLOCKING);
-	if (vbd->sess == NULL) {
-		rc = EIO;
-		goto error;
-	}
-
-	*rvbd = vbd;
-	return EOK;
-error:
-	free(vbd);
-	return rc;
-}
-
-void vbd_destroy(vbd_t *vbd)
-{
-	if (vbd == NULL)
-		return;
-
-	async_hangup(vbd->sess);
-	free(vbd);
-}
-
-/** Get list of partitions as array of service IDs.
- *
- * @param vbd Virtual block device service
- * @param data Place to store pointer to array
- * @param count Place to store length of array (number of entries)
- *
- * @return EOK on success or an error code
- */
-errno_t vbd_get_disks(vbd_t *vbd, service_id_t **data, size_t *count)
-{
-	return vbd_get_ids_internal(vbd, VBD_GET_DISKS, 0, data, count);
-}
-
-/** Get disk information. */
-errno_t vbd_disk_info(vbd_t *vbd, service_id_t sid, vbd_disk_info_t *vinfo)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vbd->sess);
-	aid_t req = async_send_1(exch, VBD_DISK_INFO, sid, &answer);
-	errno_t rc = async_data_read_start(exch, vinfo, sizeof(vbd_disk_info_t));
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-errno_t vbd_label_create(vbd_t *vbd, service_id_t sid, label_type_t ltype)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vbd->sess);
-	retval = async_req_2_0(exch, VBD_LABEL_CREATE, sid, ltype);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-errno_t vbd_label_delete(vbd_t *vbd, service_id_t sid)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vbd->sess);
-	retval = async_req_1_0(exch, VBD_LABEL_DELETE, sid);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** Get list of IDs into a buffer of fixed size.
- *
- * @param vbd      Virtual Block Device
- * @param method   IPC method
- * @param arg1     First argument
- * @param id_buf   Buffer to store IDs
- * @param buf_size Buffer size
- * @param act_size Place to store actual size of complete data.
- *
- * @return EOK on success or an error code.
- */
-static errno_t vbd_get_ids_once(vbd_t *vbd, sysarg_t method, sysarg_t arg1,
-    sysarg_t *id_buf, size_t buf_size, size_t *act_size)
-{
-	async_exch_t *exch = async_exchange_begin(vbd->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, method, arg1, &answer);
-	errno_t rc = async_data_read_start(exch, id_buf, buf_size);
-
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		return retval;
-	}
-
-	*act_size = ipc_get_arg1(&answer);
-	return EOK;
-}
-
-/** Get list of IDs.
- *
- * Returns an allocated array of service IDs.
- *
- * @param vbd    Virtual Block Device
- * @param method IPC method
- * @param arg1   IPC argument 1
- * @param data   Place to store pointer to array of IDs
- * @param count  Place to store number of IDs
- * @return       EOK on success or an error code
- */
-static errno_t vbd_get_ids_internal(vbd_t *vbd, sysarg_t method, sysarg_t arg1,
-    sysarg_t **data, size_t *count)
-{
-	*data = NULL;
-	*count = 0;
-
-	size_t act_size = 0;
-	errno_t rc = vbd_get_ids_once(vbd, method, arg1, NULL, 0, &act_size);
-	if (rc != EOK)
-		return rc;
-
-	size_t alloc_size = act_size;
-	service_id_t *ids = malloc(alloc_size);
-	if (ids == NULL)
-		return ENOMEM;
-
-	while (true) {
-		rc = vbd_get_ids_once(vbd, method, arg1, ids, alloc_size,
-		    &act_size);
-		if (rc != EOK)
-			return rc;
-
-		if (act_size <= alloc_size)
-			break;
-
-		alloc_size = act_size;
-		service_id_t *tmp = realloc(ids, alloc_size);
-		if (tmp == NULL) {
-			free(ids);
-			return ENOMEM;
-		}
-		ids = tmp;
-	}
-
-	*count = act_size / sizeof(service_id_t);
-	*data = ids;
-	return EOK;
-}
-
-/** Get list of disks as array of service IDs.
- *
- * @param vbd   Virtual Block Device
- * @param data  Place to store pointer to array
- * @param count Place to store length of array (number of entries)
- *
- * @return EOK on success or an error code
- */
-errno_t vbd_label_get_parts(vbd_t *vbd, service_id_t disk,
-    service_id_t **data, size_t *count)
-{
-	return vbd_get_ids_internal(vbd, VBD_LABEL_GET_PARTS, disk,
-	    data, count);
-}
-
-errno_t vbd_part_get_info(vbd_t *vbd, vbd_part_id_t part, vbd_part_info_t *pinfo)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vbd->sess);
-	aid_t req = async_send_1(exch, VBD_PART_GET_INFO, part, &answer);
-	errno_t rc = async_data_read_start(exch, pinfo, sizeof(vbd_part_info_t));
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-errno_t vbd_part_create(vbd_t *vbd, service_id_t disk, vbd_part_spec_t *pspec,
-    vbd_part_id_t *rpart)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vbd->sess);
-	aid_t req = async_send_1(exch, VBD_PART_CREATE, disk, &answer);
-	errno_t rc = async_data_write_start(exch, pspec, sizeof(vbd_part_spec_t));
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	*rpart = (vbd_part_id_t)ipc_get_arg1(&answer);
-	return EOK;
-
-}
-
-errno_t vbd_part_delete(vbd_t *vbd, vbd_part_id_t part)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vbd->sess);
-	retval = async_req_1_0(exch, VBD_PART_DELETE, part);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-void vbd_pspec_init(vbd_part_spec_t *pspec)
-{
-	memset(pspec, 0, sizeof(vbd_part_spec_t));
-}
-
-/** Suggest partition type based on partition content.
- *
- * @param vbd   Virtual Block Device
- * @param disk  Disk on which the partition will be created
- * @param pcnt  Partition content
- * @param ptype Place to store suggested partition type
- *
- * @return EOK on success or an error code
- */
-errno_t vbd_suggest_ptype(vbd_t *vbd, service_id_t disk, label_pcnt_t pcnt,
-    label_ptype_t *ptype)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vbd->sess);
-	aid_t req = async_send_2(exch, VBD_SUGGEST_PTYPE, disk, pcnt, &answer);
-	errno_t rc = async_data_read_start(exch, ptype, sizeof(label_ptype_t));
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/vol.c
===================================================================
--- uspace/lib/c/generic/vol.c	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,610 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file Volume service API
- */
-
-#include <abi/ipc/interfaces.h>
-#include <errno.h>
-#include <ipc/services.h>
-#include <ipc/vol.h>
-#include <loc.h>
-#include <stdlib.h>
-#include <str.h>
-#include <vfs/vfs.h>
-#include <vol.h>
-
-/** Create Volume service session.
- *
- * @param rvol Place to store pointer to volume service session.
- * @return     EOK on success, ENOMEM if out of memory, EIO if service
- *             cannot be contacted.
- */
-errno_t vol_create(vol_t **rvol)
-{
-	vol_t *vol;
-	service_id_t vol_svcid;
-	errno_t rc;
-
-	vol = calloc(1, sizeof(vol_t));
-	if (vol == NULL) {
-		rc = ENOMEM;
-		goto error;
-	}
-
-	rc = loc_service_get_id(SERVICE_NAME_VOLSRV, &vol_svcid, 0);
-	if (rc != EOK) {
-		rc = ENOENT;
-		goto error;
-	}
-
-	vol->sess = loc_service_connect(vol_svcid, INTERFACE_VOL, 0);
-	if (vol->sess == NULL) {
-		rc = EIO;
-		goto error;
-	}
-
-	*rvol = vol;
-	return EOK;
-error:
-	free(vol);
-	return rc;
-}
-
-/** Destroy volume service session.
- *
- * @param vol Volume service session
- */
-void vol_destroy(vol_t *vol)
-{
-	if (vol == NULL)
-		return;
-
-	async_hangup(vol->sess);
-	free(vol);
-}
-
-/** Get list of IDs into a buffer of fixed size.
- *
- * @param vol      Volume service
- * @param method   IPC method
- * @param arg1     First argument
- * @param id_buf   Buffer to store IDs
- * @param buf_size Buffer size
- * @param act_size Place to store actual size of complete data.
- *
- * @return EOK on success or an error code.
- */
-static errno_t vol_get_ids_once(vol_t *vol, sysarg_t method, sysarg_t arg1,
-    sysarg_t *id_buf, size_t buf_size, size_t *act_size)
-{
-	async_exch_t *exch = async_exchange_begin(vol->sess);
-
-	ipc_call_t answer;
-	aid_t req = async_send_1(exch, method, arg1, &answer);
-	errno_t rc = async_data_read_start(exch, id_buf, buf_size);
-
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	errno_t retval;
-	async_wait_for(req, &retval);
-
-	if (retval != EOK) {
-		return retval;
-	}
-
-	*act_size = ipc_get_arg1(&answer);
-	return EOK;
-}
-
-/** Get list of IDs.
- *
- * Returns an allocated array of service IDs.
- *
- * @param vol    Volume service
- * @param method IPC method
- * @param arg1   IPC argument 1
- * @param data   Place to store pointer to array of IDs
- * @param count  Place to store number of IDs
- * @return       EOK on success or an error code
- */
-static errno_t vol_get_ids_internal(vol_t *vol, sysarg_t method, sysarg_t arg1,
-    sysarg_t **data, size_t *count)
-{
-	*data = NULL;
-	*count = 0;
-
-	size_t act_size = 0;
-	errno_t rc = vol_get_ids_once(vol, method, arg1, NULL, 0, &act_size);
-	if (rc != EOK)
-		return rc;
-
-	size_t alloc_size = act_size;
-	service_id_t *ids = malloc(alloc_size);
-	if (ids == NULL)
-		return ENOMEM;
-
-	while (true) {
-		rc = vol_get_ids_once(vol, method, arg1, ids, alloc_size,
-		    &act_size);
-		if (rc != EOK)
-			return rc;
-
-		if (act_size <= alloc_size)
-			break;
-
-		alloc_size = act_size;
-		service_id_t *temp = realloc(ids, alloc_size);
-		if (temp == NULL) {
-			free(ids);
-			return ENOMEM;
-		}
-		ids = temp;
-	}
-
-	*count = act_size / sizeof(service_id_t);
-	*data = ids;
-	return EOK;
-}
-
-/** Get list of partitions as array of service IDs.
- *
- * @param vol Volume service
- * @param data Place to store pointer to array
- * @param count Place to store length of array (number of entries)
- *
- * @return EOK on success or an error code
- */
-errno_t vol_get_parts(vol_t *vol, service_id_t **data, size_t *count)
-{
-	return vol_get_ids_internal(vol, VOL_GET_PARTS, 0, data, count);
-}
-
-/** Add partition.
- *
- * After a partition is created (e.g. as a result of deleting a label
- * the dummy partition is created), it can take some (unknown) time
- * until it is discovered.
- *
- * @param vol Volume service
- * @param sid Service ID of the partition
- * @return EOK on success or an error code
- */
-errno_t vol_part_add(vol_t *vol, service_id_t sid)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	retval = async_req_1_0(exch, VOL_PART_ADD, sid);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Get partition information.
- *
- * @param vol Volume service
- * @param sid Service ID of the partition
- * @param vinfo Place to store partition information
- * @return EOK on success or an error code
- */
-errno_t vol_part_info(vol_t *vol, service_id_t sid, vol_part_info_t *vinfo)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_1(exch, VOL_PART_INFO, sid, &answer);
-
-	errno_t rc = async_data_read_start(exch, vinfo, sizeof(vol_part_info_t));
-	async_exchange_end(exch);
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** Unmount partition (and possibly eject the media).
- *
- * @param vol Volume service
- * @param sid Service ID of the partition
- * @return EOK on success or an error code
- */
-errno_t vol_part_eject(vol_t *vol, service_id_t sid)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	retval = async_req_1_0(exch, VOL_PART_EJECT, sid);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Erase partition (to the extent where we will consider it not containing
- * a file system.
- *
- * @param vol Volume service
- * @param sid Service ID of the partition
- * @return EOK on success or an error code
- */
-errno_t vol_part_empty(vol_t *vol, service_id_t sid)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	retval = async_req_1_0(exch, VOL_PART_EMPTY, sid);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Insert volume.
- *
- * This will re-mount the volume if it has been ejected previously.
- *
- * @param vol Volume service
- * @param sid Service ID of the partition
- * @return EOK on success or an error code
- */
-errno_t vol_part_insert(vol_t *vol, service_id_t sid)
-{
-	async_exch_t *exch;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	retval = async_req_1_0(exch, VOL_PART_INSERT, sid);
-	async_exchange_end(exch);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Insert volume by path.
- *
- * @param vol Volume service
- * @param path Filesystem path
- *
- * @return EOK on success or an error code
- */
-errno_t vol_part_insert_by_path(vol_t *vol, const char *path)
-{
-	async_exch_t *exch;
-	ipc_call_t answer;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_0(exch, VOL_PART_INSERT_BY_PATH, &answer);
-
-	retval = async_data_write_start(exch, path, str_size(path));
-	if (retval != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return retval;
-	}
-
-	async_exchange_end(exch);
-	async_wait_for(req, &retval);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Get volume label support.
- *
- * @param vol Volume service
- * @param fstype File system type
- * @param vlsupp Place to store volume label support information
- * @return EOK on success or an error code
- */
-errno_t vol_part_get_lsupp(vol_t *vol, vol_fstype_t fstype,
-    vol_label_supp_t *vlsupp)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_1(exch, VOL_PART_LSUPP, fstype, &answer);
-	errno_t rc = async_data_read_start(exch, vlsupp, sizeof(vol_label_supp_t));
-	async_exchange_end(exch);
-
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** Create file system.
- *
- * @param vol Volume service
- * @param sid Partition service ID
- * @param fstype File system type
- * @param label Volume label
- * @param mountp Mount point
- *
- * @return EOK on success or an error code
- */
-errno_t vol_part_mkfs(vol_t *vol, service_id_t sid, vol_fstype_t fstype,
-    const char *label, const char *mountp)
-{
-	async_exch_t *exch;
-	ipc_call_t answer;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_2(exch, VOL_PART_MKFS, sid, fstype, &answer);
-
-	retval = async_data_write_start(exch, label, str_size(label));
-	if (retval != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return retval;
-	}
-
-	retval = async_data_write_start(exch, mountp, str_size(mountp));
-	if (retval != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return retval;
-	}
-
-	async_exchange_end(exch);
-	async_wait_for(req, &retval);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Set mount point for partition.
- *
- * @param vol Volume service
- * @param sid Partition service ID
- * @param mountp Mount point
- *
- * @return EOK on success or an error code
- */
-errno_t vol_part_set_mountp(vol_t *vol, service_id_t sid,
-    const char *mountp)
-{
-	async_exch_t *exch;
-	ipc_call_t answer;
-	errno_t retval;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_1(exch, VOL_PART_SET_MOUNTP, sid,
-	    &answer);
-
-	retval = async_data_write_start(exch, mountp, str_size(mountp));
-	if (retval != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return retval;
-	}
-
-	async_exchange_end(exch);
-	async_wait_for(req, &retval);
-
-	if (retval != EOK)
-		return retval;
-
-	return EOK;
-}
-
-/** Format file system type as string.
- *
- * @param fstype File system type
- * @param rstr Place to store pointer to newly allocated string
- * @return EOK on success, ENOMEM if out of memory
- */
-errno_t vol_fstype_format(vol_fstype_t fstype, char **rstr)
-{
-	const char *sfstype;
-	char *s;
-
-	sfstype = NULL;
-	switch (fstype) {
-	case fs_exfat:
-		sfstype = "ExFAT";
-		break;
-	case fs_fat:
-		sfstype = "FAT";
-		break;
-	case fs_minix:
-		sfstype = "MINIX";
-		break;
-	case fs_ext4:
-		sfstype = "Ext4";
-		break;
-	case fs_cdfs:
-		sfstype = "ISO 9660";
-		break;
-	}
-
-	s = str_dup(sfstype);
-	if (s == NULL)
-		return ENOMEM;
-
-	*rstr = s;
-	return EOK;
-}
-
-/** Format partition content / file system type as string.
- *
- * @param pcnt Partition content
- * @param fstype File system type
- * @param rstr Place to store pointer to newly allocated string
- * @return EOK on success, ENOMEM if out of memory
- */
-errno_t vol_pcnt_fs_format(vol_part_cnt_t pcnt, vol_fstype_t fstype,
-    char **rstr)
-{
-	int rc;
-	char *s = NULL;
-
-	switch (pcnt) {
-	case vpc_empty:
-		s = str_dup("Empty");
-		if (s == NULL)
-			return ENOMEM;
-		break;
-	case vpc_fs:
-		rc = vol_fstype_format(fstype, &s);
-		if (rc != EOK)
-			return ENOMEM;
-		break;
-	case vpc_unknown:
-		s = str_dup("Unknown");
-		if (s == NULL)
-			return ENOMEM;
-		break;
-	}
-
-	assert(s != NULL);
-	*rstr = s;
-	return EOK;
-}
-
-/** Validate mount point.
- *
- * Verify that mount point is valid. A valid mount point is
- * one of:
- *  - 'Auto'
- *  - 'None'
- *  - /path (string beginning with '/') to an existing directory
- *
- * @return EOK if mount point is in valid, EINVAL if the format is invalid,
- *         ENOENT if the directory does not exist
- */
-errno_t vol_mountp_validate(const char *mountp)
-{
-	errno_t rc;
-	vfs_stat_t stat;
-
-	if (str_cmp(mountp, "Auto") == 0 || str_cmp(mountp, "auto") == 0)
-		return EOK;
-
-	if (str_casecmp(mountp, "None") == 0 || str_cmp(mountp, "none") == 0)
-		return EOK;
-
-	if (mountp[0] == '/') {
-		rc = vfs_stat_path(mountp, &stat);
-		if (rc != EOK || !stat.is_directory)
-			return ENOENT;
-
-		return EOK;
-	}
-
-	return EINVAL;
-}
-
-/** Get list of volumes as array of volume IDs.
- *
- * @param vol Volume service
- * @param data Place to store pointer to array
- * @param count Place to store length of array (number of entries)
- *
- * @return EOK on success or an error code
- */
-errno_t vol_get_volumes(vol_t *vol, volume_id_t **data, size_t *count)
-{
-	return vol_get_ids_internal(vol, VOL_GET_VOLUMES, 0,
-	    (sysarg_t **) data, count);
-}
-
-/** Get volume configuration information.
- *
- * @param vol Volume service
- * @param vid Volume ID
- * @param vinfo Place to store volume configuration information
- * @return EOK on success or an error code
- */
-errno_t vol_info(vol_t *vol, volume_id_t vid, vol_info_t *vinfo)
-{
-	async_exch_t *exch;
-	errno_t retval;
-	ipc_call_t answer;
-
-	exch = async_exchange_begin(vol->sess);
-	aid_t req = async_send_1(exch, VOL_INFO, vid.id, &answer);
-
-	errno_t rc = async_data_read_start(exch, vinfo, sizeof(vol_info_t));
-	async_exchange_end(exch);
-	if (rc != EOK) {
-		async_forget(req);
-		return EIO;
-	}
-
-	async_wait_for(req, &retval);
-	if (retval != EOK)
-		return EIO;
-
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/c/include/bd.h
===================================================================
--- uspace/lib/c/include/bd.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * Copyright (c) 2012 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file Block device client interface
- */
-
-#ifndef _LIBC_BD_H_
-#define _LIBC_BD_H_
-
-#include <async.h>
-#include <offset.h>
-
-typedef struct {
-	async_sess_t *sess;
-} bd_t;
-
-extern errno_t bd_open(async_sess_t *, bd_t **);
-extern void bd_close(bd_t *);
-extern errno_t bd_read_blocks(bd_t *, aoff64_t, size_t, void *, size_t);
-extern errno_t bd_read_toc(bd_t *, uint8_t, void *, size_t);
-extern errno_t bd_write_blocks(bd_t *, aoff64_t, size_t, const void *, size_t);
-extern errno_t bd_sync_cache(bd_t *, aoff64_t, size_t);
-extern errno_t bd_get_block_size(bd_t *, size_t *);
-extern errno_t bd_get_num_blocks(bd_t *, aoff64_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/bd_srv.h
===================================================================
--- uspace/lib/c/include/bd_srv.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- * Copyright (c) 2012 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_BD_SRV_H_
-#define _LIBC_BD_SRV_H_
-
-#include <adt/list.h>
-#include <async.h>
-#include <fibril_synch.h>
-#include <stdbool.h>
-#include <offset.h>
-
-typedef struct bd_ops bd_ops_t;
-
-/** Service setup (per sevice) */
-typedef struct {
-	bd_ops_t *ops;
-	void *sarg;
-} bd_srvs_t;
-
-/** Server structure (per client session) */
-typedef struct {
-	bd_srvs_t *srvs;
-	async_sess_t *client_sess;
-	void *carg;
-} bd_srv_t;
-
-struct bd_ops {
-	errno_t (*open)(bd_srvs_t *, bd_srv_t *);
-	errno_t (*close)(bd_srv_t *);
-	errno_t (*read_blocks)(bd_srv_t *, aoff64_t, size_t, void *, size_t);
-	errno_t (*read_toc)(bd_srv_t *, uint8_t, void *, size_t);
-	errno_t (*sync_cache)(bd_srv_t *, aoff64_t, size_t);
-	errno_t (*write_blocks)(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
-	errno_t (*get_block_size)(bd_srv_t *, size_t *);
-	errno_t (*get_num_blocks)(bd_srv_t *, aoff64_t *);
-};
-
-extern void bd_srvs_init(bd_srvs_t *);
-
-extern errno_t bd_conn(ipc_call_t *, bd_srvs_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/capa.h
===================================================================
--- uspace/lib/c/include/capa.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ uspace/lib/c/include/capa.h	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
@@ -37,10 +37,7 @@
 #define _LIBC_CAPA_H_
 
-#include <adt/list.h>
-#include <loc.h>
+#include <errno.h>
+#include <stddef.h>
 #include <stdint.h>
-#include <types/label.h>
-#include <types/vol.h>
-#include <vbd.h>
 
 /** Capacity unit */
Index: uspace/lib/c/include/device/led_dev.h
===================================================================
--- uspace/lib/c/include/device/led_dev.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_DEVICE_LED_DEV_H_
-#define _LIBC_DEVICE_LED_DEV_H_
-
-#include <async.h>
-#include <io/pixel.h>
-
-typedef enum {
-	LED_DEV_COLOR_SET = 0
-} led_dev_method_t;
-
-extern errno_t led_dev_color_set(async_sess_t *, pixel_t);
-
-#endif
Index: uspace/lib/c/include/devman.h
===================================================================
--- uspace/lib/c/include/devman.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- * Copyright (c) 2009 Jiri Svoboda
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_DEVMAN_H_
-#define _LIBC_DEVMAN_H_
-
-#include <ipc/devman.h>
-#include <ipc/loc.h>
-#include <async.h>
-#include <stdbool.h>
-
-extern async_exch_t *devman_exchange_begin_blocking(iface_t);
-extern async_exch_t *devman_exchange_begin(iface_t);
-extern void devman_exchange_end(async_exch_t *);
-
-extern errno_t devman_driver_register(const char *);
-extern errno_t devman_add_function(const char *, fun_type_t, match_id_list_t *,
-    devman_handle_t, devman_handle_t *);
-extern errno_t devman_remove_function(devman_handle_t);
-extern errno_t devman_drv_fun_online(devman_handle_t);
-extern errno_t devman_drv_fun_offline(devman_handle_t);
-
-extern async_sess_t *devman_device_connect(devman_handle_t, unsigned int);
-extern async_sess_t *devman_parent_device_connect(devman_handle_t,
-    unsigned int);
-
-extern errno_t devman_fun_get_handle(const char *, devman_handle_t *,
-    unsigned int);
-extern errno_t devman_fun_get_child(devman_handle_t, devman_handle_t *);
-extern errno_t devman_dev_get_parent(devman_handle_t, devman_handle_t *);
-extern errno_t devman_dev_get_functions(devman_handle_t, devman_handle_t **,
-    size_t *);
-extern errno_t devman_fun_get_match_id(devman_handle_t, size_t, char *, size_t,
-    unsigned int *);
-extern errno_t devman_fun_get_name(devman_handle_t, char *, size_t);
-extern errno_t devman_fun_get_driver_name(devman_handle_t, char *, size_t);
-extern errno_t devman_fun_get_path(devman_handle_t, char *, size_t);
-extern errno_t devman_fun_online(devman_handle_t);
-extern errno_t devman_fun_offline(devman_handle_t);
-
-extern errno_t devman_add_device_to_category(devman_handle_t, const char *);
-extern errno_t devman_fun_sid_to_handle(service_id_t, devman_handle_t *);
-extern errno_t devman_get_drivers(devman_handle_t **, size_t *);
-extern errno_t devman_driver_get_devices(devman_handle_t, devman_handle_t **,
-    size_t *);
-extern errno_t devman_driver_get_handle(const char *, devman_handle_t *);
-extern errno_t devman_driver_get_match_id(devman_handle_t, size_t, char *, size_t,
-    unsigned int *);
-extern errno_t devman_driver_get_name(devman_handle_t, char *, size_t);
-extern errno_t devman_driver_get_state(devman_handle_t, driver_state_t *);
-extern errno_t devman_driver_load(devman_handle_t);
-extern errno_t devman_driver_unload(devman_handle_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ieee80211/ieee80211.h
===================================================================
--- uspace/lib/c/include/ieee80211/ieee80211.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- * Copyright (c) 2015 Jan Kolarik
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- *  @{
- */
-
-/** @file ieee80211.h
- *  IEEE 802.11 common definitions.
- */
-
-#ifndef _LIBC_IEEE80211_H_
-#define _LIBC_IEEE80211_H_
-
-#include <adt/list.h>
-#include <nic/nic.h>
-#include <time.h>
-
-/** Max length of scan results array. */
-#define IEEE80211_MAX_RESULTS_LENGTH  32
-
-/** Max SSID length including null character. */
-#define IEEE80211_MAX_SSID_LENGTH  35
-
-/** WiFi security authentication method indicator. */
-typedef enum {
-	IEEE80211_SECURITY_OPEN,
-	IEEE80211_SECURITY_WEP,
-	IEEE80211_SECURITY_WPA,
-	IEEE80211_SECURITY_WPA2
-} ieee80211_security_type_t;
-
-/** WiFi security suite indicator. */
-typedef enum {
-	IEEE80211_SECURITY_SUITE_WEP40,
-	IEEE80211_SECURITY_SUITE_WEP104,
-	IEEE80211_SECURITY_SUITE_CCMP,
-	IEEE80211_SECURITY_SUITE_TKIP
-} ieee80211_security_suite_t;
-
-/** WiFi security authentication method indicator. */
-typedef enum {
-	IEEE80211_SECURITY_AUTH_PSK,
-	IEEE80211_SECURITY_AUTH_8021X
-} ieee80211_security_auth_t;
-
-/** Structure for indicating security network security settings. */
-typedef struct {
-	int type;
-	int group_alg;
-	int pair_alg;
-	int auth;
-} ieee80211_security_t;
-
-/** Structure with scan result info. */
-typedef struct {
-	nic_address_t bssid;
-	char ssid[IEEE80211_MAX_SSID_LENGTH];
-	uint8_t channel;
-	ieee80211_security_t security;
-} ieee80211_scan_result_t;
-
-/** Array of scan results info. */
-typedef struct {
-	uint8_t length;
-	ieee80211_scan_result_t results[IEEE80211_MAX_RESULTS_LENGTH];
-} ieee80211_scan_results_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/io/chardev.h
===================================================================
--- uspace/lib/c/include/io/chardev.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * Copyright (c) 2017 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup libc
- * @{
- */
-
-#ifndef _LIBC_IO_CHARDEV_H_
-#define _LIBC_IO_CHARDEV_H_
-
-#include <async.h>
-#include <stddef.h>
-#include <types/io/chardev.h>
-
-typedef struct {
-	async_sess_t *sess;
-} chardev_t;
-
-extern errno_t chardev_open(async_sess_t *, chardev_t **);
-extern void chardev_close(chardev_t *);
-extern errno_t chardev_read(chardev_t *, void *, size_t, size_t *,
-    chardev_flags_t);
-extern errno_t chardev_write(chardev_t *, const void *, size_t, size_t *);
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/c/include/io/chardev_srv.h
===================================================================
--- uspace/lib/c/include/io/chardev_srv.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IO_CHARDEV_SRV_H_
-#define _LIBC_IO_CHARDEV_SRV_H_
-
-#include <adt/list.h>
-#include <async.h>
-#include <fibril_synch.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <types/io/chardev.h>
-
-typedef struct chardev_ops chardev_ops_t;
-
-/** Service setup (per sevice) */
-typedef struct {
-	chardev_ops_t *ops;
-	void *sarg;
-} chardev_srvs_t;
-
-/** Server structure (per client session) */
-typedef struct {
-	chardev_srvs_t *srvs;
-	void *carg;
-} chardev_srv_t;
-
-struct chardev_ops {
-	errno_t (*open)(chardev_srvs_t *, chardev_srv_t *);
-	errno_t (*close)(chardev_srv_t *);
-	errno_t (*read)(chardev_srv_t *, void *, size_t, size_t *,
-	    chardev_flags_t);
-	errno_t (*write)(chardev_srv_t *, const void *, size_t, size_t *);
-	void (*def_handler)(chardev_srv_t *, ipc_call_t *);
-};
-
-extern void chardev_srvs_init(chardev_srvs_t *);
-
-extern errno_t chardev_conn(ipc_call_t *, chardev_srvs_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/io/label.h
===================================================================
--- uspace/lib/c/include/io/label.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2017 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IO_LABEL_H_
-#define _LIBC_IO_LABEL_H_
-
-#include <types/label.h>
-
-extern int label_type_format(label_type_t, char **);
-extern int label_pkind_format(label_pkind_t, char **);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/io/serial.h
===================================================================
--- uspace/lib/c/include/io/serial.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * Copyright (c) 2017 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IO_SERIAL_H_
-#define _LIBC_IO_SERIAL_H_
-
-#include <async.h>
-#include <ipc/serial_ctl.h>
-
-typedef struct {
-	async_sess_t *sess;
-} serial_t;
-
-extern errno_t serial_open(async_sess_t *, serial_t **);
-extern void serial_close(serial_t *);
-extern errno_t serial_set_comm_props(serial_t *, unsigned, serial_parity_t,
-    unsigned, unsigned);
-extern errno_t serial_get_comm_props(serial_t *, unsigned *, serial_parity_t *,
-    unsigned *, unsigned *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/adb.h
===================================================================
--- uspace/lib/c/include/ipc/adb.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2010 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- * @brief ADB device interface.
- */
-
-#ifndef _LIBC_IPC_ADB_H_
-#define _LIBC_IPC_ADB_H_
-
-#include <ipc/common.h>
-
-typedef enum {
-	ADB_REG_WRITE = IPC_FIRST_USER_METHOD
-} adb_request_t;
-
-typedef enum {
-	ADB_REG_NOTIF = IPC_FIRST_USER_METHOD
-} adb_notif_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/bd.h
===================================================================
--- uspace/lib/c/include/ipc/bd.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2009 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IPC_BD_H_
-#define _LIBC_IPC_BD_H_
-
-#include <ipc/common.h>
-
-typedef enum {
-	BD_GET_BLOCK_SIZE = IPC_FIRST_USER_METHOD,
-	BD_GET_NUM_BLOCKS,
-	BD_READ_BLOCKS,
-	BD_SYNC_CACHE,
-	BD_WRITE_BLOCKS,
-	BD_READ_TOC
-} bd_request_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/chardev.h
===================================================================
--- uspace/lib/c/include/ipc/chardev.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- * @brief Character device interface.
- */
-
-#ifndef _LIBC_IPC_CHARDEV_H_
-#define _LIBC_IPC_CHARDEV_H_
-
-#include <ipc/common.h>
-
-typedef enum {
-	CHARDEV_READ = IPC_FIRST_USER_METHOD,
-	CHARDEV_WRITE,
-} chardev_request_t;
-
-enum {
-	CHARDEV_LIMIT = CHARDEV_WRITE + 1
-};
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/devman.h
===================================================================
--- uspace/lib/c/include/ipc/devman.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,186 +1,0 @@
-/*
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup devman
- * @{
- */
-
-#ifndef _LIBC_IPC_DEVMAN_H_
-#define _LIBC_IPC_DEVMAN_H_
-
-#include <ipc/common.h>
-#include <adt/list.h>
-#include <mem.h>
-#include <stdlib.h>
-
-#define DEVMAN_NAME_MAXLEN  256
-
-typedef sysarg_t devman_handle_t;
-
-typedef enum {
-	/** Driver has not been started. */
-	DRIVER_NOT_STARTED = 0,
-
-	/**
-	 * Driver has been started, but has not registered as running and ready
-	 * to receive requests.
-	 */
-	DRIVER_STARTING,
-
-	/** Driver is running and prepared to serve incomming requests. */
-	DRIVER_RUNNING
-} driver_state_t;
-
-typedef enum {
-	/** Invalid value for debugging purposes */
-	fun_invalid = 0,
-	/** Function to which child devices attach */
-	fun_inner,
-	/** Fuction exported to external clients (leaf function) */
-	fun_exposed
-} fun_type_t;
-
-/** Ids of device models used for device-to-driver matching.
- */
-typedef struct match_id {
-	/** Pointers to next and previous ids.
-	 */
-	link_t link;
-	/** Id of device model.
-	 */
-	char *id;
-	/** Relevancy of device-to-driver match.
-	 * The higher is the product of scores specified for the device by the bus driver and by the leaf driver,
-	 * the more suitable is the leaf driver for handling the device.
-	 */
-	unsigned int score;
-} match_id_t;
-
-/** List of ids for matching devices to drivers sorted
- * according to match scores in descending order.
- */
-typedef struct match_id_list {
-	list_t ids;
-} match_id_list_t;
-
-static inline match_id_t *create_match_id(void)
-{
-	match_id_t *id = malloc(sizeof(match_id_t));
-	memset(id, 0, sizeof(match_id_t));
-	return id;
-}
-
-static inline void delete_match_id(match_id_t *id)
-{
-	if (id) {
-		if (NULL != id->id) {
-			free(id->id);
-		}
-		free(id);
-	}
-}
-
-static inline void add_match_id(match_id_list_t *ids, match_id_t *id)
-{
-	match_id_t *mid = NULL;
-	link_t *link = ids->ids.head.next;
-
-	while (link != &ids->ids.head) {
-		mid = list_get_instance(link, match_id_t, link);
-		if (mid->score < id->score) {
-			break;
-		}
-		link = link->next;
-	}
-
-	list_insert_before(&id->link, link);
-}
-
-static inline void init_match_ids(match_id_list_t *id_list)
-{
-	list_initialize(&id_list->ids);
-}
-
-static inline void clean_match_ids(match_id_list_t *ids)
-{
-	link_t *link = NULL;
-	match_id_t *id;
-
-	while (!list_empty(&ids->ids)) {
-		link = list_first(&ids->ids);
-		list_remove(link);
-		id = list_get_instance(link, match_id_t, link);
-		delete_match_id(id);
-	}
-}
-
-typedef enum {
-	DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
-	DEVMAN_ADD_FUNCTION,
-	DEVMAN_ADD_MATCH_ID,
-	DEVMAN_ADD_DEVICE_TO_CATEGORY,
-	DEVMAN_DRV_FUN_ONLINE,
-	DEVMAN_DRV_FUN_OFFLINE,
-	DEVMAN_REMOVE_FUNCTION
-} driver_to_devman_t;
-
-typedef enum {
-	DRIVER_DEV_ADD = IPC_FIRST_USER_METHOD,
-	DRIVER_DEV_REMOVE,
-	DRIVER_DEV_GONE,
-	DRIVER_FUN_ONLINE,
-	DRIVER_FUN_OFFLINE,
-	DRIVER_STOP
-} devman_to_driver_t;
-
-typedef enum {
-	DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD,
-	DEVMAN_DEV_GET_FUNCTIONS,
-	DEVMAN_DEV_GET_PARENT,
-	DEVMAN_FUN_GET_CHILD,
-	DEVMAN_FUN_GET_MATCH_ID,
-	DEVMAN_FUN_GET_NAME,
-	DEVMAN_FUN_GET_DRIVER_NAME,
-	DEVMAN_FUN_ONLINE,
-	DEVMAN_FUN_OFFLINE,
-	DEVMAN_FUN_GET_PATH,
-	DEVMAN_FUN_SID_TO_HANDLE,
-	DEVMAN_GET_DRIVERS,
-	DEVMAN_DRIVER_GET_DEVICES,
-	DEVMAN_DRIVER_GET_HANDLE,
-	DEVMAN_DRIVER_GET_MATCH_ID,
-	DEVMAN_DRIVER_GET_NAME,
-	DEVMAN_DRIVER_GET_STATE,
-	DEVMAN_DRIVER_LOAD,
-	DEVMAN_DRIVER_UNLOAD
-} client_to_devman_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/irc.h
===================================================================
--- uspace/lib/c/include/ipc/irc.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2009 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IPC_IRC_H_
-#define _LIBC_IPC_IRC_H_
-
-#include <ipc/common.h>
-
-typedef enum {
-	IRC_ENABLE_INTERRUPT = IPC_FIRST_USER_METHOD,
-	IRC_DISABLE_INTERRUPT,
-	IRC_CLEAR_INTERRUPT
-} irc_request_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/pci.h
===================================================================
--- uspace/lib/c/include/ipc/pci.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IPC_PCI_H_
-#define _LIBC_IPC_PCI_H_
-
-#include <ipc/common.h>
-
-/** PCI control service requests */
-typedef enum {
-	PCI_GET_DEVICES = IPC_FIRST_USER_METHOD,
-	PCI_DEV_GET_INFO
-} pci_request_t;
-
-#endif
-
-/**
- * @}
- */
Index: uspace/lib/c/include/ipc/serial_ctl.h
===================================================================
--- uspace/lib/c/include/ipc/serial_ctl.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _LIBC_IPC_SERIAL_CTL_H_
-#define _LIBC_IPC_SERIAL_CTL_H_
-
-#include <ipc/chardev.h>
-
-/** IPC methods for getting/setting serial communication properties
- *
- * 1st IPC arg: baud rate
- * 2nd IPC arg: parity
- * 3rd IPC arg: number of bits in one word
- * 4th IPC arg: number of stop bits
- *
- */
-typedef enum {
-	SERIAL_GET_COM_PROPS = CHARDEV_LIMIT,
-	SERIAL_SET_COM_PROPS
-} serial_ctl_t;
-
-typedef enum {
-	SERIAL_NO_PARITY = 0,
-	SERIAL_ODD_PARITY = 1,
-	SERIAL_EVEN_PARITY = 3,
-	SERIAL_MARK_PARITY = 5,
-	SERIAL_SPACE_PARITY = 7
-} serial_parity_t;
-
-#endif
Index: uspace/lib/c/include/ipc/vbd.h
===================================================================
--- uspace/lib/c/include/ipc/vbd.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-
-#ifndef _LIBC_IPC_VBD_H_
-#define _LIBC_IPC_VBD_H_
-
-#include <ipc/common.h>
-
-typedef enum {
-	VBD_GET_DISKS = IPC_FIRST_USER_METHOD,
-	VBD_DISK_INFO,
-	VBD_LABEL_CREATE,
-	VBD_LABEL_DELETE,
-	VBD_LABEL_GET_PARTS,
-	VBD_PART_GET_INFO,
-	VBD_PART_CREATE,
-	VBD_PART_DELETE,
-	VBD_SUGGEST_PTYPE
-} vbd_request_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/ipc/vol.h
===================================================================
--- uspace/lib/c/include/ipc/vol.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-
-#ifndef _LIBC_IPC_VOL_H_
-#define _LIBC_IPC_VOL_H_
-
-#include <ipc/common.h>
-
-#define VOL_LABEL_MAXLEN 63
-#define VOL_MOUNTP_MAXLEN 4096
-
-typedef enum {
-	VOL_GET_PARTS = IPC_FIRST_USER_METHOD,
-	VOL_PART_ADD,
-	VOL_PART_INFO,
-	VOL_PART_EJECT,
-	VOL_PART_EMPTY,
-	VOL_PART_INSERT,
-	VOL_PART_INSERT_BY_PATH,
-	VOL_PART_LSUPP,
-	VOL_PART_MKFS,
-	VOL_PART_SET_MOUNTP,
-	VOL_GET_VOLUMES,
-	VOL_INFO
-} vol_request_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/irc.h
===================================================================
--- uspace/lib/c/include/irc.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_IRC_H_
-#define _LIBC_IRC_H_
-
-extern errno_t irc_enable_interrupt(int);
-extern errno_t irc_disable_interrupt(int);
-extern errno_t irc_clear_interrupt(int);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/nic/eth_phys.h
===================================================================
--- uspace/lib/c/include/nic/eth_phys.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,142 +1,0 @@
-/*
- * Copyright (c) 2011 Radim Vansa
- * Copyright (c) 2011 Jiri Michalec
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _LIBC_NIC_ETH_PHYS_H_
-#define _LIBC_NIC_ETH_PHYS_H_
-
-#include <stdint.h>
-
-/*
- * Definitions of possible supported physical layers
- */
-
-/* Ethernet physical layers */
-#define ETH_OLD          0
-#define ETH_10M          1
-#define ETH_100M         2
-#define ETH_1000M        3
-#define ETH_10G          4
-#define ETH_40G_100G     5
-/* 6, 7 reserved for future use */
-#define ETH_PHYS_LAYERS  8
-
-/* < 10Mbs ethernets */
-#define ETH_EXPERIMENTAL     0x0001
-#define ETH_1BASE5           0x0002
-/* 10Mbs ethernets */
-#define ETH_10BASE5          0x0001
-#define ETH_10BASE2          0x0002
-#define ETH_10BROAD36        0x0004
-#define ETH_STARLAN_10       0x0008
-#define ETH_LATTISNET        0x0010
-#define ETH_10BASE_T         0x0020
-#define ETH_FOIRL            0x0040
-#define ETH_10BASE_FL        0x0080
-#define ETH_10BASE_FB        0x0100
-#define ETH_10BASE_FP        0x0200
-/* 100Mbs (fast) ethernets */
-#define ETH_100BASE_TX       0x0001
-#define ETH_100BASE_T4       0x0002
-#define ETH_100BASE_T2       0x0004
-#define ETH_100BASE_FX       0x0008
-#define ETH_100BASE_SX       0x0010
-#define ETH_100BASE_BX10     0x0020
-#define ETH_100BASE_LX10     0x0040
-#define ETH_100BASE_VG       0x0080
-/* 1000Mbs (gigabit) ethernets */
-#define ETH_1000BASE_T       0x0001
-#define ETH_1000BASE_TX      0x0002
-#define ETH_1000BASE_SX      0x0004
-#define ETH_1000BASE_LX      0x0008
-#define ETH_1000BASE_LH      0x0010
-#define ETH_1000BASE_CX      0x0020
-#define ETH_1000BASE_BX10    0x0040
-#define ETH_1000BASE_LX10    0x0080
-#define ETH_1000BASE_PX10_D  0x0100
-#define ETH_1000BASE_PX10_U  0x0200
-#define ETH_1000BASE_PX20_D  0x0400
-#define ETH_1000BASE_PX20_U  0x0800
-#define ETH_1000BASE_ZX      0x1000
-#define ETH_1000BASE_KX      0x2000
-/* 10Gbs ethernets */
-#define ETH_10GBASE_SR       0x0001
-#define ETH_10GBASE_LX4      0x0002
-#define ETH_10GBASE_LR       0x0004
-#define ETH_10GBASE_ER       0x0008
-#define ETH_10GBASE_SW       0x0010
-#define ETH_10GBASE_LW       0x0020
-#define ETH_10GBASE_EW       0x0040
-#define ETH_10GBASE_CX4      0x0080
-#define ETH_10GBASE_T        0x0100
-#define ETH_10GBASE_LRM      0x0200
-#define ETH_10GBASE_KX4      0x0400
-#define ETH_10GBASE_KR       0x0800
-/* 40Gbs and 100Gbs ethernets */
-#define ETH_40GBASE_SR4      0x0001
-#define ETH_40GBASE_LR4      0x0002
-#define ETH_40GBASE_CR4      0x0004
-#define ETH_40GBASE_KR4      0x0008
-#define ETH_100GBASE_SR10    0x0010
-#define ETH_100GBASE_LR4     0x0020
-#define ETH_100GBASE_ER4     0x0040
-#define ETH_100GBASE_CR10    0x0080
-
-/*
- * Auto-negotiation advertisement options
- */
-
-#define ETH_AUTONEG_10BASE_T_HALF    UINT32_C(0x00000001)
-#define ETH_AUTONEG_10BASE_T_FULL    UINT32_C(0x00000002)
-#define ETH_AUTONEG_100BASE_TX_HALF  UINT32_C(0x00000004)
-#define ETH_AUTONEG_100BASE_T4_HALF  UINT32_C(0x00000008)
-#define ETH_AUTONEG_100BASE_T2_HALF  UINT32_C(0x00000010)
-#define ETH_AUTONEG_100BASE_TX_FULL  UINT32_C(0x00000020)
-#define ETH_AUTONEG_100BASE_T2_FULL  UINT32_C(0x00000040)
-#define ETH_AUTONEG_1000BASE_T_HALF  UINT32_C(0x00000080)
-#define ETH_AUTONEG_1000BASE_T_FULL  UINT32_C(0x00000100)
-
-/** Symetric pause packet (802.3x standard) */
-#define ETH_AUTONEG_PAUSE_SYMETRIC   UINT32_C(0x10000000)
-/** Asymetric pause packet (802.3z standard, gigabit ethernet) */
-#define ETH_AUTONEG_PAUSE_ASYMETRIC  UINT32_C(0x20000000)
-
-#define ETH_AUTONEG_MODE_MASK      UINT32_C(0x0FFFFFFF)
-#define ETH_AUTONEG_FEATURES_MASK  UINT32_C(~(ETH_AUTONEG_MODE_MASK))
-
-#define ETH_AUTONEG_MODES  9
-
-struct eth_autoneg_map {
-	uint32_t value;
-	const char *name;
-};
-
-extern const char *ethernet_names[8][17];
-extern const struct eth_autoneg_map ethernet_autoneg_mapping[ETH_AUTONEG_MODES];
-
-#endif
Index: uspace/lib/c/include/nic/nic.h
===================================================================
--- uspace/lib/c/include/nic/nic.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,476 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * Copyright (c) 2011 Radim Vansa
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-
-/** @file
- * NIC interface definitions.
- */
-
-#ifndef _LIBC_NIC_H_
-#define _LIBC_NIC_H_
-
-#include <nic/eth_phys.h>
-#include <stdbool.h>
-
-/** Ethernet address length. */
-#define ETH_ADDR  6
-
-/** MAC printing format */
-#define PRIMAC  "%02x:%02x:%02x:%02x:%02x:%02x"
-
-/** MAC arguments */
-#define ARGSMAC(__a) \
-	(__a)[0], (__a)[1], (__a)[2], (__a)[3], (__a)[4], (__a)[5]
-
-/* Compare MAC address with specific value */
-#define MAC_EQUALS_VALUE(__a, __a0, __a1, __a2, __a3, __a4, __a5) \
-	((__a)[0] == (__a0) && (__a)[1] == (__a1) && (__a)[2] == (__a2) \
-	&& (__a)[3] == (__a3) && (__a)[4] == (__a4) && (__a)[5] == (__a5))
-
-#define MAC_IS_ZERO(__x) \
-	MAC_EQUALS_VALUE(__x, 0, 0, 0, 0, 0, 0)
-
-/** Max length of any hw nic address (currently only eth) */
-#define NIC_MAX_ADDRESS_LENGTH  16
-
-#define NIC_VENDOR_MAX_LENGTH         64
-#define NIC_MODEL_MAX_LENGTH          64
-#define NIC_PART_NUMBER_MAX_LENGTH    64
-#define NIC_SERIAL_NUMBER_MAX_LENGTH  64
-
-#define NIC_DEFECTIVE_LONG               0x0001
-#define NIC_DEFECTIVE_SHORT              0x0002
-#define NIC_DEFECTIVE_BAD_CRC            0x0010
-#define NIC_DEFECTIVE_BAD_IPV4_CHECKSUM  0x0020
-#define NIC_DEFECTIVE_BAD_IPV6_CHECKSUM  0x0040
-#define NIC_DEFECTIVE_BAD_TCP_CHECKSUM   0x0080
-#define NIC_DEFECTIVE_BAD_UDP_CHECKSUM   0x0100
-
-/**
- * The bitmap uses single bit for each of the 2^12 = 4096 possible VLAN tags.
- * This means its size is 4096/8 = 512 bytes.
- */
-#define NIC_VLAN_BITMAP_SIZE  512
-
-#define NIC_DEVICE_PRINT_FMT  "%x"
-
-/**
- * Structure covering the MAC address.
- */
-typedef struct nic_address {
-	uint8_t address[ETH_ADDR];
-} nic_address_t;
-
-/** Device state. */
-typedef enum nic_device_state {
-	/**
-	 * Device present and stopped. Moving device to this state means to discard
-	 * all settings and WOL virtues, rebooting the NIC to state as if the
-	 * computer just booted (or the NIC was just inserted in case of removable
-	 * NIC).
-	 */
-	NIC_STATE_STOPPED,
-	/**
-	 * If the NIC is in this state no packets (frames) are transmitted nor
-	 * received. However, the settings are not restarted. You can use this state
-	 * to temporarily disable transmition/reception or atomically (with respect
-	 * to incoming/outcoming packets) change frames acceptance etc.
-	 */
-	NIC_STATE_DOWN,
-	/** Device is normally operating. */
-	NIC_STATE_ACTIVE,
-	/** Just a constant to limit the state numbers */
-	NIC_STATE_MAX,
-} nic_device_state_t;
-
-/**
- * Channel operating mode used on the medium.
- */
-typedef enum {
-	NIC_CM_UNKNOWN,
-	NIC_CM_FULL_DUPLEX,
-	NIC_CM_HALF_DUPLEX,
-	NIC_CM_SIMPLEX
-} nic_channel_mode_t;
-
-/**
- * Role for the device (used e.g. for 1000Gb ethernet)
- */
-typedef enum {
-	NIC_ROLE_UNKNOWN,
-	NIC_ROLE_AUTO,
-	NIC_ROLE_MASTER,
-	NIC_ROLE_SLAVE
-} nic_role_t;
-
-/**
- * Current state of the cable in the device
- */
-typedef enum {
-	NIC_CS_UNKNOWN,
-	NIC_CS_PLUGGED,
-	NIC_CS_UNPLUGGED
-} nic_cable_state_t;
-
-/**
- * Result of the requested operation
- */
-typedef enum {
-	/** Successfully disabled */
-	NIC_RESULT_DISABLED,
-	/** Successfully enabled */
-	NIC_RESULT_ENABLED,
-	/** Not supported at all */
-	NIC_RESULT_NOT_SUPPORTED,
-	/** Temporarily not available */
-	NIC_RESULT_NOT_AVAILABLE,
-	/** Result extensions */
-	NIC_RESULT_FIRST_EXTENSION
-} nic_result_t;
-
-/** Device usage statistics. */
-typedef struct nic_device_stats {
-	/** Total packets received (accepted). */
-	unsigned long receive_packets;
-	/** Total packets transmitted. */
-	unsigned long send_packets;
-	/** Total bytes received (accepted). */
-	unsigned long receive_bytes;
-	/** Total bytes transmitted. */
-	unsigned long send_bytes;
-	/** Bad packets received counter. */
-	unsigned long receive_errors;
-	/** Packet transmition problems counter. */
-	unsigned long send_errors;
-	/** Number of frames dropped due to insufficient space in RX buffers */
-	unsigned long receive_dropped;
-	/** Number of frames dropped due to insufficient space in TX buffers */
-	unsigned long send_dropped;
-	/** Total multicast packets received (accepted). */
-	unsigned long receive_multicast;
-	/** Total broadcast packets received (accepted). */
-	unsigned long receive_broadcast;
-	/** The number of collisions due to congestion on the medium. */
-	unsigned long collisions;
-	/** Unicast packets received but not accepted (filtered) */
-	unsigned long receive_filtered_unicast;
-	/** Multicast packets received but not accepted (filtered) */
-	unsigned long receive_filtered_multicast;
-	/** Broadcast packets received but not accepted (filtered) */
-	unsigned long receive_filtered_broadcast;
-
-	/* detailed receive_errors */
-
-	/** Received packet length error counter. */
-	unsigned long receive_length_errors;
-	/** Receiver buffer overflow counter. */
-	unsigned long receive_over_errors;
-	/** Received packet with crc error counter. */
-	unsigned long receive_crc_errors;
-	/** Received frame alignment error counter. */
-	unsigned long receive_frame_errors;
-	/** Receiver fifo overrun counter. */
-	unsigned long receive_fifo_errors;
-	/** Receiver missed packet counter. */
-	unsigned long receive_missed_errors;
-
-	/* detailed send_errors */
-
-	/** Transmitter aborted counter. */
-	unsigned long send_aborted_errors;
-	/** Transmitter carrier errors counter. */
-	unsigned long send_carrier_errors;
-	/** Transmitter fifo overrun counter. */
-	unsigned long send_fifo_errors;
-	/** Transmitter carrier errors counter. */
-	unsigned long send_heartbeat_errors;
-	/** Transmitter window errors counter. */
-	unsigned long send_window_errors;
-
-	/* for cslip etc */
-
-	/** Total compressed packets received. */
-	unsigned long receive_compressed;
-	/** Total compressed packet transmitted. */
-	unsigned long send_compressed;
-} nic_device_stats_t;
-
-/** Errors corresponding to those in the nic_device_stats_t */
-typedef enum {
-	NIC_SEC_BUFFER_FULL,
-	NIC_SEC_ABORTED,
-	NIC_SEC_CARRIER_LOST,
-	NIC_SEC_FIFO_OVERRUN,
-	NIC_SEC_HEARTBEAT,
-	NIC_SEC_WINDOW_ERROR,
-	/* Error encountered during TX but with other type of error */
-	NIC_SEC_OTHER
-} nic_send_error_cause_t;
-
-/** Errors corresponding to those in the nic_device_stats_t */
-typedef enum {
-	NIC_REC_BUFFER_FULL,
-	NIC_REC_LENGTH,
-	NIC_REC_BUFFER_OVERFLOW,
-	NIC_REC_CRC,
-	NIC_REC_FRAME_ALIGNMENT,
-	NIC_REC_FIFO_OVERRUN,
-	NIC_REC_MISSED,
-	/* Error encountered during RX but with other type of error */
-	NIC_REC_OTHER
-} nic_receive_error_cause_t;
-
-/**
- * Information about the NIC that never changes - name, vendor, model,
- * capabilites and so on.
- */
-typedef struct nic_device_info {
-	/* Device identification */
-	char vendor_name[NIC_VENDOR_MAX_LENGTH];
-	char model_name[NIC_MODEL_MAX_LENGTH];
-	char part_number[NIC_PART_NUMBER_MAX_LENGTH];
-	char serial_number[NIC_SERIAL_NUMBER_MAX_LENGTH];
-	uint16_t vendor_id;
-	uint16_t device_id;
-	uint16_t subsystem_vendor_id;
-	uint16_t subsystem_id;
-	/* Device capabilities */
-	uint16_t ethernet_support[ETH_PHYS_LAYERS];
-
-	/** The mask of all modes which the device can advertise
-	 *
-	 *  see ETH_AUTONEG_ macros in nic/eth_phys.h of libc
-	 */
-	uint32_t autoneg_support;
-} nic_device_info_t;
-
-/**
- * Type of the ethernet frame
- */
-typedef enum nic_frame_type {
-	NIC_FRAME_UNICAST,
-	NIC_FRAME_MULTICAST,
-	NIC_FRAME_BROADCAST
-} nic_frame_type_t;
-
-/**
- * Specifies which unicast frames is the NIC receiving.
- */
-typedef enum nic_unicast_mode {
-	NIC_UNICAST_UNKNOWN,
-	/** No unicast frames are received */
-	NIC_UNICAST_BLOCKED,
-	/** Only the frames with this NIC's MAC as destination are received */
-	NIC_UNICAST_DEFAULT,
-	/**
-	 * Both frames with this NIC's MAC and those specified in the list are
-	 * received
-	 */
-	NIC_UNICAST_LIST,
-	/** All unicast frames are received */
-	NIC_UNICAST_PROMISC
-} nic_unicast_mode_t;
-
-typedef enum nic_multicast_mode {
-	NIC_MULTICAST_UNKNOWN,
-	/** No multicast frames are received */
-	NIC_MULTICAST_BLOCKED,
-	/** Frames with multicast addresses specified in this list are received */
-	NIC_MULTICAST_LIST,
-	/** All multicast frames are received */
-	NIC_MULTICAST_PROMISC
-} nic_multicast_mode_t;
-
-typedef enum nic_broadcast_mode {
-	NIC_BROADCAST_UNKNOWN,
-	/** Broadcast frames are dropped */
-	NIC_BROADCAST_BLOCKED,
-	/** Broadcast frames are received */
-	NIC_BROADCAST_ACCEPTED
-} nic_broadcast_mode_t;
-
-/**
- * Structure covering the bitmap with VLAN tags.
- */
-typedef struct nic_vlan_mask {
-	uint8_t bitmap[NIC_VLAN_BITMAP_SIZE];
-} nic_vlan_mask_t;
-
-/* WOL virtue identifier */
-typedef unsigned int nic_wv_id_t;
-
-/**
- * Structure passed as argument for virtue NIC_WV_MAGIC_PACKET.
- */
-typedef struct nic_wv_magic_packet_data {
-	uint8_t password[6];
-} nic_wv_magic_packet_data_t;
-
-/**
- * Structure passed as argument for virtue NIC_WV_DIRECTED_IPV4
- */
-typedef struct nic_wv_ipv4_data {
-	uint8_t address[4];
-} nic_wv_ipv4_data_t;
-
-/**
- * Structure passed as argument for virtue NIC_WV_DIRECTED_IPV6
- */
-typedef struct nic_wv_ipv6_data {
-	uint8_t address[16];
-} nic_wv_ipv6_data_t;
-
-/**
- * WOL virtue types defining the interpretation of data passed to the virtue.
- * Those tagged with S can have only single virtue active at one moment, those
- * tagged with M can have multiple ones.
- */
-typedef enum nic_wv_type {
-	/**
-	 * Used for deletion of the virtue - in this case the mask, data and length
-	 * arguments are ignored.
-	 */
-	NIC_WV_NONE,
-	/** S
-	 * Enabled <=> wakeup upon link change
-	 */
-	NIC_WV_LINK_CHANGE,
-	/** S
-	 * If this virtue is set up, wakeup can be issued by a magic packet frame.
-	 * If the data argument is not NULL, it must contain
-	 * nic_wv_magic_packet_data structure with the SecureOn password.
-	 */
-	NIC_WV_MAGIC_PACKET,
-	/** M
-	 * If the virtue is set up, wakeup can be issued by a frame targeted to
-	 * device with MAC address specified in data. The data must contain
-	 * nic_address_t structure.
-	 */
-	NIC_WV_DESTINATION,
-	/** S
-	 * Enabled <=> wakeup upon receiving broadcast frame
-	 */
-	NIC_WV_BROADCAST,
-	/** S
-	 * Enabled <=> wakeup upon receiving ARP Request
-	 */
-	NIC_WV_ARP_REQUEST,
-	/** M
-	 * If enabled, the wakeup is issued upon receiving frame with an IPv4 packet
-	 * with IPv4 address specified in data. The data must contain
-	 * nic_wv_ipv4_data structure.
-	 */
-	NIC_WV_DIRECTED_IPV4,
-	/** M
-	 * If enabled, the wakeup is issued upon receiving frame with an IPv4 packet
-	 * with IPv6 address specified in data. The data must contain
-	 * nic_wv_ipv6_data structure.
-	 */
-	NIC_WV_DIRECTED_IPV6,
-	/** M
-	 * First length/2 bytes in the argument are interpreted as mask, second
-	 * length/2 bytes are interpreted as content.
-	 * If enabled, the wakeup is issued upon receiving frame where the bytes
-	 * with non-zero value in the mask equal to those in the content.
-	 */
-	NIC_WV_FULL_MATCH,
-	/**
-	 * Dummy value, do not use.
-	 */
-	NIC_WV_MAX
-} nic_wv_type_t;
-
-/**
- * Specifies the interrupt/polling mode used by the driver and NIC
- */
-typedef enum nic_poll_mode {
-	/**
-	 * NIC issues interrupts upon events.
-	 */
-	NIC_POLL_IMMEDIATE,
-	/**
-	 * Some uspace app calls nic_poll_now(...) in order to check the NIC state
-	 * - no interrupts are received from the NIC.
-	 */
-	NIC_POLL_ON_DEMAND,
-	/**
-	 * The driver itself issues a poll request in a periodic manner. It is
-	 * allowed to use hardware timer if the NIC supports it.
-	 */
-	NIC_POLL_PERIODIC,
-	/**
-	 * The driver itself issued a poll request in a periodic manner. The driver
-	 * must create software timer, internal hardware timer of NIC must not be
-	 * used even if the NIC supports it.
-	 */
-	NIC_POLL_SOFTWARE_PERIODIC
-} nic_poll_mode_t;
-
-/**
- * Says if this virtue type is a multi-virtue (there can be multiple virtues of
- * this type at once).
- *
- * @param type
- *
- * @return true or false
- */
-static inline int nic_wv_is_multi(nic_wv_type_t type)
-{
-	switch (type) {
-	case NIC_WV_FULL_MATCH:
-	case NIC_WV_DESTINATION:
-	case NIC_WV_DIRECTED_IPV4:
-	case NIC_WV_DIRECTED_IPV6:
-		return true;
-	default:
-		return false;
-	}
-}
-
-static inline const char *nic_device_state_to_string(nic_device_state_t state)
-{
-	switch (state) {
-	case NIC_STATE_STOPPED:
-		return "stopped";
-	case NIC_STATE_DOWN:
-		return "down";
-	case NIC_STATE_ACTIVE:
-		return "active";
-	default:
-		return "undefined";
-	}
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/pci.h
===================================================================
--- uspace/lib/c/include/pci.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_PCI_H_
-#define _LIBC_PCI_H_
-
-#include <errno.h>
-#include <ipc/devman.h>
-#include <loc.h>
-#include <types/pci.h>
-
-extern errno_t pci_open(service_id_t, pci_t **);
-extern void pci_close(pci_t *);
-extern errno_t pci_get_devices(pci_t *, devman_handle_t **, size_t *);
-extern errno_t pci_dev_get_info(pci_t *, devman_handle_t, pci_dev_info_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/types/io/chardev.h
===================================================================
--- uspace/lib/c/include/types/io/chardev.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup libc
- * @{
- */
-
-#ifndef _LIBC_TYPES_IO_CHARDEV_H_
-#define _LIBC_TYPES_IO_CHARDEV_H_
-
-/** Chardev read/write operation flags */
-typedef enum {
-	/** No flags */
-	chardev_f_none = 0,
-	/** Do not block even if no bytes can be transferred */
-	chardev_f_nonblock = 0x1
-} chardev_flags_t;
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/c/include/types/label.h
===================================================================
--- uspace/lib/c/include/types/label.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_TYPES_LABEL_H_
-#define _LIBC_TYPES_LABEL_H_
-
-#include <types/uuid.h>
-
-/** Partition contents */
-typedef enum {
-	/** Partition is considered empty */
-	ptc_empty = 0,
-	/** Partition contains a recognized filesystem */
-	ptc_fs,
-	/** Partition contains unrecognized data */
-	ptc_unknown
-} label_part_cnt_t;
-
-/** Disk label type */
-typedef enum {
-	/** No label */
-	lt_none,
-	/** BIOS Master Boot Record */
-	lt_mbr,
-	/** UEFI GUID Partition Table */
-	lt_gpt
-} label_type_t;
-
-#define LT_FIRST lt_mbr
-#define LT_LIMIT (lt_gpt + 1)
-
-#define LT_DEFAULT lt_mbr
-
-/** Partition kind */
-typedef enum {
-	/** Primary partition */
-	lpk_primary,
-	/** Extended partition */
-	lpk_extended,
-	/** Logical partition */
-	lpk_logical
-} label_pkind_t;
-
-/** Label flags */
-typedef enum {
-	/** Label supports extended (and logical) partitions */
-	lf_ext_supp = 0x1,
-	/** Partition type is in UUID format (otherwise in small number format) */
-	lf_ptype_uuid = 0x2,
-	/** Currently it is possible to create a primary partition */
-	lf_can_create_pri = 0x4,
-	/** Currently it is possible to create an extended partition */
-	lf_can_create_ext = 0x8,
-	/** Currently it is possible to create a logical partition */
-	lf_can_create_log = 0x10,
-	/** Currently it is possible to delete a partition */
-	lf_can_delete_part = 0x20,
-	/** Currently it is possible to modify a partition */
-	lf_can_modify_part = 0x40
-} label_flags_t;
-
-/** Partition type format */
-typedef enum {
-	/** Small number */
-	lptf_num,
-	/** UUID */
-	lptf_uuid
-} label_pt_fmt;
-
-/** Partition type */
-typedef struct {
-	/** Type format */
-	label_pt_fmt fmt;
-	/** Depending on @c fmt */
-	union {
-		/* Small number */
-		uint8_t num;
-		/** UUID */
-		uuid_t uuid;
-	} t;
-} label_ptype_t;
-
-/** Partition content (used to get partition type suggestion) */
-typedef enum {
-	/** ExFAT */
-	lpc_exfat,
-	/** Ext4 */
-	lpc_ext4,
-	/** FAT12 or FAT16 */
-	lpc_fat12_16,
-	/** FAT32 */
-	lpc_fat32,
-	/** Minix file system */
-	lpc_minix
-} label_pcnt_t;
-
-#define LPC_LIMIT (lpc_minix + 1)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/types/pci.h
===================================================================
--- uspace/lib/c/include/types/pci.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_TYPES_PCI_H_
-#define _LIBC_TYPES_PCI_H_
-
-#include <async.h>
-#include <ipc/devman.h>
-#include <stdint.h>
-
-/** PCI device information */
-typedef struct {
-	/** Devman function handle */
-	devman_handle_t dev_handle;
-	/** Bus number */
-	uint8_t bus_num;
-	/** Device number */
-	uint8_t dev_num;
-	/** Function number */
-	uint8_t fn_num;
-	/** Vendor ID */
-	uint16_t vendor_id;
-	/** Device ID */
-	uint16_t device_id;
-} pci_dev_info_t;
-
-/** PCI service */
-typedef struct {
-	/** Session with PCI control service */
-	async_sess_t *sess;
-} pci_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/types/vol.h
===================================================================
--- uspace/lib/c/include/types/vol.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,107 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_TYPES_VOL_H_
-#define _LIBC_TYPES_VOL_H_
-
-#include <async.h>
-#include <ipc/vfs.h>
-#include <ipc/vol.h>
-#include <stdbool.h>
-
-typedef struct {
-	sysarg_t id;
-} volume_id_t;
-
-typedef enum {
-	/** Partition is empty */
-	vpc_empty,
-	/** Partition contains a recognized filesystem */
-	vpc_fs,
-	/** Partition contains unrecognized data */
-	vpc_unknown
-} vol_part_cnt_t;
-
-/** File system type */
-typedef enum {
-	fs_exfat,
-	fs_fat,
-	fs_minix,
-	fs_ext4,
-	fs_cdfs
-} vol_fstype_t;
-
-#define VOL_FSTYPE_LIMIT (fs_ext4 + 1)
-#define VOL_FSTYPE_DEFAULT fs_ext4
-
-/** Volume service */
-typedef struct vol {
-	/** Volume service session */
-	async_sess_t *sess;
-} vol_t;
-
-/** Partition information */
-typedef struct {
-	/** Partition content type */
-	vol_part_cnt_t pcnt;
-	/** Filesystem type */
-	vol_fstype_t fstype;
-	/** Volume label */
-	char label[VOL_LABEL_MAXLEN + 1];
-	/** Current mount point */
-	char cur_mp[MAX_PATH_LEN + 1]; /* XXX too big */
-	/** Current mount point is automatic */
-	bool cur_mp_auto;
-} vol_part_info_t;
-
-/** Volume configuration information */
-typedef struct {
-	/** Volume identifier */
-	volume_id_t id;
-	/** Volume label */
-	char label[VOL_LABEL_MAXLEN + 1];
-	/** Mount path */
-	char path[MAX_PATH_LEN + 1]; /* XXX too big */
-} vol_info_t;
-
-/** Volume label support */
-typedef struct {
-	/** Volume labels are supported */
-	bool supported;
-} vol_label_supp_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/vbd.h
===================================================================
--- uspace/lib/c/include/vbd.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_VBD_H_
-#define _LIBC_VBD_H_
-
-#include <async.h>
-#include <loc.h>
-#include <types/label.h>
-#include <offset.h>
-
-/** VBD service */
-typedef struct vbd {
-	/** VBD session */
-	async_sess_t *sess;
-} vbd_t;
-
-/** Disk information */
-typedef struct {
-	/** Label type */
-	label_type_t ltype;
-	/** Label flags */
-	label_flags_t flags;
-	/** First block that can be allocated */
-	aoff64_t ablock0;
-	/** Number of blocks that can be allocated */
-	aoff64_t anblocks;
-	/** Block size */
-	size_t block_size;
-	/** Total number of blocks */
-	aoff64_t nblocks;
-} vbd_disk_info_t;
-
-/** Specification of new partition */
-typedef struct {
-	/** Partition index */
-	int index;
-	/** First block */
-	aoff64_t block0;
-	/** Number of blocks */
-	aoff64_t nblocks;
-	/** Number of header blocks (EBR for logical partitions) */
-	aoff64_t hdr_blocks;
-	/** Partition kind */
-	label_pkind_t pkind;
-	/** Partition type */
-	label_ptype_t ptype;
-} vbd_part_spec_t;
-
-/** Partition info */
-typedef struct {
-	/** Partition index */
-	int index;
-	/** Partition kind */
-	label_pkind_t pkind;
-	/** First block */
-	aoff64_t block0;
-	/** Number of blocks */
-	aoff64_t nblocks;
-	/** Service ID */
-	service_id_t svc_id;
-} vbd_part_info_t;
-
-typedef sysarg_t vbd_part_id_t;
-
-extern errno_t vbd_create(vbd_t **);
-extern void vbd_destroy(vbd_t *);
-extern errno_t vbd_get_disks(vbd_t *, service_id_t **, size_t *);
-extern errno_t vbd_disk_info(vbd_t *, service_id_t, vbd_disk_info_t *);
-extern errno_t vbd_label_create(vbd_t *, service_id_t, label_type_t);
-extern errno_t vbd_label_delete(vbd_t *, service_id_t);
-extern errno_t vbd_label_get_parts(vbd_t *, service_id_t, service_id_t **,
-    size_t *);
-extern errno_t vbd_part_get_info(vbd_t *, vbd_part_id_t, vbd_part_info_t *);
-extern errno_t vbd_part_create(vbd_t *, service_id_t, vbd_part_spec_t *,
-    vbd_part_id_t *);
-extern errno_t vbd_part_delete(vbd_t *, vbd_part_id_t);
-extern void vbd_pspec_init(vbd_part_spec_t *);
-extern errno_t vbd_suggest_ptype(vbd_t *, service_id_t, label_pcnt_t,
-    label_ptype_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/vol.h
===================================================================
--- uspace/lib/c/include/vol.h	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef _LIBC_VOL_H_
-#define _LIBC_VOL_H_
-
-#include <async.h>
-#include <errno.h>
-#include <loc.h>
-#include <stdint.h>
-#include <types/label.h>
-#include <types/vol.h>
-
-extern errno_t vol_create(vol_t **);
-extern void vol_destroy(vol_t *);
-extern errno_t vol_get_parts(vol_t *, service_id_t **, size_t *);
-extern errno_t vol_part_add(vol_t *, service_id_t);
-extern errno_t vol_part_info(vol_t *, service_id_t, vol_part_info_t *);
-extern errno_t vol_part_eject(vol_t *, service_id_t);
-extern errno_t vol_part_empty(vol_t *, service_id_t);
-extern errno_t vol_part_insert(vol_t *, service_id_t);
-extern errno_t vol_part_insert_by_path(vol_t *, const char *);
-extern errno_t vol_part_get_lsupp(vol_t *, vol_fstype_t, vol_label_supp_t *);
-extern errno_t vol_part_mkfs(vol_t *, service_id_t, vol_fstype_t, const char *,
-    const char *);
-extern errno_t vol_part_set_mountp(vol_t *, service_id_t, const char *);
-extern errno_t vol_get_volumes(vol_t *, volume_id_t **, size_t *);
-extern errno_t vol_info(vol_t *, volume_id_t, vol_info_t *);
-extern errno_t vol_fstype_format(vol_fstype_t, char **);
-extern errno_t vol_pcnt_fs_format(vol_part_cnt_t, vol_fstype_t, char **);
-extern errno_t vol_mountp_validate(const char *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/meson.build
===================================================================
--- uspace/lib/c/meson.build	(revision fe333f8e6a4c32a9832b4d67fd1626881c62ed41)
+++ uspace/lib/c/meson.build	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
@@ -60,8 +60,6 @@
 src += files(
 	'generic/libc.c',
+	'generic/as.c',
 	'generic/ddi.c',
-	'generic/as.c',
-	'generic/bd.c',
-	'generic/bd_srv.c',
 	'generic/perm.c',
 	'generic/capa.c',
@@ -71,10 +69,8 @@
 	'generic/corecfg.c',
 	'generic/ctype.c',
-	'generic/devman.c',
+	'generic/device/clock_dev.c',
 	'generic/device/hw_res.c',
 	'generic/device/hw_res_parsed.c',
 	'generic/device/pio_window.c',
-	'generic/device/clock_dev.c',
-	'generic/device/led_dev.c',
 	'generic/dirent.c',
 	'generic/dlfcn.c',
@@ -95,4 +91,5 @@
 	'generic/l18n/langs.c',
 	'generic/pcb.c',
+	'generic/pio_trace.c',
 	'generic/smc.c',
 	'generic/task.c',
@@ -101,6 +98,4 @@
 	'generic/io/input.c',
 	'generic/io/io.c',
-	'generic/io/chardev.c',
-	'generic/io/chardev_srv.c',
 	'generic/io/chargrid.c',
 	'generic/io/output.c',
@@ -108,8 +103,6 @@
 	'generic/io/log.c',
 	'generic/io/logctl.c',
-	'generic/io/label.c',
 	'generic/io/kio.c',
 	'generic/io/klog.c',
-	'generic/io/serial.c',
 	'generic/io/snprintf.c',
 	'generic/io/vprintf.c',
@@ -119,5 +112,4 @@
 	'generic/io/console.c',
 	'generic/io/table.c',
-	'generic/irc.c',
 	'generic/irq.c',
 	'generic/ieee_double.c',
@@ -167,11 +159,7 @@
 	'generic/assert.c',
 	'generic/bsearch.c',
-	'generic/pci.c',
-	'generic/pio_trace.c',
 	'generic/qsort.c',
 	'generic/ubsan.c',
 	'generic/uuid.c',
-	'generic/vbd.c',
-	'generic/vol.c',
 )
 
