Index: kernel/generic/src/sysinfo/sysinfo.c
===================================================================
--- kernel/generic/src/sysinfo/sysinfo.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
+++ kernel/generic/src/sysinfo/sysinfo.c	(revision 8565a42398543d14e36b2df6f7a70c6237b458f8)
@@ -64,5 +64,5 @@
 {
 	sysinfo_item_t *item = (sysinfo_item_t *) obj;
-	
+
 	item->name = NULL;
 	item->val_type = SYSINFO_VAL_UNDEFINED;
@@ -70,5 +70,5 @@
 	item->subtree.table = NULL;
 	item->next = NULL;
-	
+
 	return EOK;
 }
@@ -84,8 +84,8 @@
 {
 	sysinfo_item_t *item = (sysinfo_item_t *) obj;
-	
+
 	if (item->name != NULL)
 		free(item->name);
-	
+
 	return 0;
 }
@@ -101,5 +101,5 @@
 	    sizeof(sysinfo_item_t), 0, sysinfo_item_constructor,
 	    sysinfo_item_destructor, SLAB_CACHE_MAGDEFERRED);
-	
+
 	mutex_initialize(&sysinfo_lock, MUTEX_ACTIVE);
 }
@@ -127,19 +127,19 @@
 {
 	assert(subtree != NULL);
-	
+
 	sysinfo_item_t *cur = subtree;
-	
+
 	/* Walk all siblings */
 	while (cur != NULL) {
 		size_t i = 0;
-		
+
 		/* Compare name with path */
 		while ((cur->name[i] != 0) && (name[i] == cur->name[i]))
 			i++;
-		
+
 		/* Check for perfect name and path match */
 		if ((name[i] == 0) && (cur->name[i] == 0))
 			return cur;
-		
+
 		/* Partial match up to the delimiter */
 		if ((name[i] == '.') && (cur->name[i] == 0)) {
@@ -155,5 +155,5 @@
 					**ret = cur->subtree.generator.fn(name + i + 1,
 					    dry_run, cur->subtree.generator.data);
-				
+
 				return NULL;
 			default:
@@ -161,16 +161,16 @@
 				if (ret != NULL)
 					*ret = NULL;
-				
+
 				return NULL;
 			}
 		}
-		
+
 		cur = cur->next;
 	}
-	
+
 	/* Not found, no data generated */
 	if (ret != NULL)
 		*ret = NULL;
-	
+
 	return NULL;
 }
@@ -193,22 +193,22 @@
 {
 	assert(psubtree != NULL);
-	
+
 	if (*psubtree == NULL) {
 		/* No parent */
-		
+
 		size_t i = 0;
-		
+
 		/* Find the first delimiter in name */
 		while ((name[i] != 0) && (name[i] != '.'))
 			i++;
-		
+
 		*psubtree =
 		    (sysinfo_item_t *) slab_alloc(sysinfo_item_cache, 0);
 		assert(*psubtree);
-		
+
 		/* Fill in item name up to the delimiter */
 		(*psubtree)->name = str_ndup(name, i);
 		assert((*psubtree)->name);
-		
+
 		/* Create subtree items */
 		if (name[i] == '.') {
@@ -217,19 +217,19 @@
 			    &((*psubtree)->subtree.table));
 		}
-		
+
 		/* No subtree needs to be created */
 		return *psubtree;
 	}
-	
+
 	sysinfo_item_t *cur = *psubtree;
-	
+
 	/* Walk all siblings */
 	while (cur != NULL) {
 		size_t i = 0;
-		
+
 		/* Compare name with path */
 		while ((cur->name[i] != 0) && (name[i] == cur->name[i]))
 			i++;
-		
+
 		/* Check for perfect name and path match
 		 * -> item is already present.
@@ -237,5 +237,5 @@
 		if ((name[i] == 0) && (cur->name[i] == 0))
 			return cur;
-		
+
 		/* Partial match up to the delimiter */
 		if ((name[i] == '.') && (cur->name[i] == 0)) {
@@ -257,5 +257,5 @@
 			}
 		}
-		
+
 		/* No match and no more siblings to check
 		 * -> create a new sibling item.
@@ -266,15 +266,15 @@
 			while ((name[i] != 0) && (name[i] != '.'))
 				i++;
-			
+
 			sysinfo_item_t *item =
 			    (sysinfo_item_t *) slab_alloc(sysinfo_item_cache, 0);
 			assert(item);
-			
+
 			cur->next = item;
-			
+
 			/* Fill in item name up to the delimiter */
 			item->name = str_ndup(name, i);
 			assert(item->name);
-			
+
 			/* Create subtree items */
 			if (name[i] == '.') {
@@ -283,12 +283,12 @@
 				    &(item->subtree.table));
 			}
-			
+
 			/* No subtree needs to be created */
 			return item;
 		}
-		
+
 		cur = cur->next;
 	}
-	
+
 	/* Unreachable */
 	assert(false);
@@ -309,8 +309,8 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
 	if (item != NULL) {
@@ -318,5 +318,5 @@
 		item->val.val = val;
 	}
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -340,8 +340,8 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
 	if (item != NULL) {
@@ -350,5 +350,5 @@
 		item->val.data.size = size;
 	}
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -368,8 +368,8 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
 	if (item != NULL) {
@@ -378,5 +378,5 @@
 		item->val.gen_val.data = data;
 	}
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -401,8 +401,8 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
 	if (item != NULL) {
@@ -411,5 +411,5 @@
 		item->val.gen_data.data = data;
 	}
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -426,12 +426,12 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
 	if (item != NULL)
 		item->val_type = SYSINFO_VAL_UNDEFINED;
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -451,10 +451,10 @@
 	/* Protect sysinfo tree consistency */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *item = sysinfo_create_path(name, root);
-	
+
 	/* Change the type of the subtree only if it is not already
 	   a fixed subtree */
@@ -464,5 +464,5 @@
 		item->subtree.generator.data = data;
 	}
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -492,5 +492,5 @@
 	for (sysinfo_item_t *cur = root; cur; cur = cur->next) {
 		size_t length;
-		
+
 		if (spaces == 0) {
 			printf("%s", cur->name);
@@ -501,8 +501,8 @@
 			length = str_length(cur->name) + 1;
 		}
-		
+
 		sysarg_t val;
 		size_t size;
-		
+
 		/* Display node value and type */
 		switch (cur->val_type) {
@@ -531,5 +531,5 @@
 			printf("+ %s [unknown]\n", cur->name);
 		}
-		
+
 		/* Recursivelly nest into the subtree */
 		switch (cur->subtree_type) {
@@ -562,10 +562,10 @@
 	   while we are dumping it */
 	mutex_lock(&sysinfo_lock);
-	
+
 	if (root == NULL)
 		sysinfo_dump_internal(global_root, 0);
 	else
 		sysinfo_dump_internal(root, 0);
-	
+
 	mutex_unlock(&sysinfo_lock);
 }
@@ -590,5 +590,5 @@
 	if (root == NULL)
 		root = &global_root;
-	
+
 	/* Try to find the item or generate data */
 	sysinfo_return_t ret;
@@ -596,8 +596,8 @@
 	sysinfo_item_t *item = sysinfo_find_item(name, *root, &ret_ptr,
 	    dry_run);
-	
+
 	if (item != NULL) {
 		/* Item found in the fixed sysinfo tree */
-		
+
 		ret.tag = item->val_type;
 		switch (item->val_type) {
@@ -625,5 +625,5 @@
 		}
 	}
-	
+
 	return ret;
 }
@@ -645,11 +645,11 @@
 	sysinfo_return_t ret;
 	ret.tag = SYSINFO_VAL_UNDEFINED;
-	
+
 	if (size > SYSINFO_MAX_PATH)
 		return ret;
-	
+
 	char *path = (char *) malloc(size + 1, 0);
 	assert(path);
-	
+
 	if ((copy_from_uspace(path, ptr, size + 1) == 0) &&
 	    (path[size] == 0)) {
@@ -662,5 +662,5 @@
 		mutex_unlock(&sysinfo_lock);
 	}
-	
+
 	free(path);
 	return ret;
@@ -686,7 +686,7 @@
 	if (root == NULL)
 		root = &global_root;
-	
+
 	sysinfo_item_t *subtree = NULL;
-	
+
 	if (name[0] != 0) {
 		/* Try to find the item */
@@ -698,8 +698,8 @@
 	} else
 		subtree = *root;
-	
+
 	sysinfo_return_t ret;
 	ret.tag = SYSINFO_VAL_UNDEFINED;
-	
+
 	if (subtree != NULL) {
 		/*
@@ -709,5 +709,5 @@
 		for (sysinfo_item_t *cur = subtree; cur; cur = cur->next)
 			size += str_size(cur->name) + 1;
-		
+
 		if (dry_run) {
 			ret.tag = SYSINFO_VAL_DATA;
@@ -719,5 +719,5 @@
 			if (names == NULL)
 				return ret;
-			
+
 			size_t pos = 0;
 			for (sysinfo_item_t *cur = subtree; cur; cur = cur->next) {
@@ -725,5 +725,5 @@
 				pos += str_size(cur->name) + 1;
 			}
-			
+
 			/* Correct return value */
 			ret.tag = SYSINFO_VAL_DATA;
@@ -732,5 +732,5 @@
 		}
 	}
-	
+
 	return ret;
 }
@@ -754,11 +754,11 @@
 	ret.data.data = NULL;
 	ret.data.size = 0;
-	
+
 	if (size > SYSINFO_MAX_PATH)
 		return ret;
-	
+
 	char *path = (char *) malloc(size + 1, 0);
 	assert(path);
-	
+
 	if ((copy_from_uspace(path, ptr, size + 1) == 0) &&
 	    (path[size] == 0)) {
@@ -771,5 +771,5 @@
 		mutex_unlock(&sysinfo_lock);
 	}
-	
+
 	free(path);
 	return ret;
@@ -794,5 +794,5 @@
 {
 	errno_t rc;
-	
+
 	/*
 	 * Get the keys.
@@ -803,5 +803,5 @@
 	sysinfo_return_t ret =
 	    sysinfo_get_keys_uspace(path_ptr, path_size, true);
-	
+
 	/* Check return data tag */
 	if (ret.tag == SYSINFO_VAL_DATA)
@@ -810,5 +810,5 @@
 	else
 		rc = EINVAL;
-	
+
 	return (sys_errno_t) rc;
 }
@@ -842,9 +842,9 @@
 {
 	errno_t rc;
-	
+
 	/* Get the keys */
 	sysinfo_return_t ret = sysinfo_get_keys_uspace(path_ptr, path_size,
 	    false);
-	
+
 	/* Check return data tag */
 	if (ret.tag == SYSINFO_VAL_DATA) {
@@ -853,9 +853,9 @@
 		if (rc == EOK)
 			rc = copy_to_uspace(size_ptr, &size, sizeof(size));
-		
+
 		free(ret.data.data);
 	} else
 		rc = EINVAL;
-	
+
 	return (sys_errno_t) rc;
 }
@@ -882,5 +882,5 @@
 	 */
 	sysinfo_return_t ret = sysinfo_get_item_uspace(path_ptr, path_size, true);
-	
+
 	/*
 	 * Map generated value types to constant types (user space does
@@ -891,5 +891,5 @@
 	else if (ret.tag == SYSINFO_VAL_FUNCTION_DATA)
 		ret.tag = SYSINFO_VAL_DATA;
-	
+
 	return (sysarg_t) ret.tag;
 }
@@ -913,5 +913,5 @@
 {
 	errno_t rc;
-	
+
 	/*
 	 * Get the item.
@@ -921,5 +921,5 @@
 	 */
 	sysinfo_return_t ret = sysinfo_get_item_uspace(path_ptr, path_size, true);
-	
+
 	/* Only constant or generated numerical value is returned */
 	if ((ret.tag == SYSINFO_VAL_VAL) || (ret.tag == SYSINFO_VAL_FUNCTION_VAL))
@@ -927,5 +927,5 @@
 	else
 		rc = EINVAL;
-	
+
 	return (sys_errno_t) rc;
 }
@@ -949,5 +949,5 @@
 {
 	errno_t rc;
-	
+
 	/*
 	 * Get the item.
@@ -957,5 +957,5 @@
 	 */
 	sysinfo_return_t ret = sysinfo_get_item_uspace(path_ptr, path_size, true);
-	
+
 	/* Only the size of constant or generated binary data is considered */
 	if ((ret.tag == SYSINFO_VAL_DATA) || (ret.tag == SYSINFO_VAL_FUNCTION_DATA))
@@ -964,5 +964,5 @@
 	else
 		rc = EINVAL;
-	
+
 	return (sys_errno_t) rc;
 }
@@ -999,9 +999,9 @@
 {
 	errno_t rc;
-	
+
 	/* Get the item */
 	sysinfo_return_t ret = sysinfo_get_item_uspace(path_ptr, path_size,
 	    false);
-	
+
 	/* Only constant or generated binary data is considered */
 	if ((ret.tag == SYSINFO_VAL_DATA) ||
@@ -1013,9 +1013,9 @@
 	} else
 		rc = EINVAL;
-	
+
 	/* N.B.: The generated binary data should be freed */
 	if ((ret.tag == SYSINFO_VAL_FUNCTION_DATA) && (ret.data.data != NULL))
 		free(ret.data.data);
-	
+
 	return (sys_errno_t) rc;
 }
