Index: Makefile
===================================================================
--- Makefile	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ Makefile	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -41,5 +41,5 @@
 CONFIG_HEADER = config.h
 
-.PHONY: all precheck cscope autotool config_auto config_default config distclean clean
+.PHONY: all precheck cscope autotool config_default config distclean clean
 
 all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
@@ -66,9 +66,5 @@
 
 config_default: $(CONFIG_RULES)
-ifeq ($(HANDS_OFF),y)
-	$(CONFIG) $< hands-off $(PROFILE)
-else
-	$(CONFIG) $< default $(PROFILE)
-endif
+	$(CONFIG) $< default
 
 config: $(CONFIG_RULES)
Index: tools/config.py
===================================================================
--- tools/config.py	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ tools/config.py	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -3,5 +3,4 @@
 # Copyright (c) 2006 Ondrej Palkovsky
 # Copyright (c) 2009 Martin Decky
-# Copyright (c) 2010 Jiri Svoboda
 # All rights reserved.
 #
@@ -41,11 +40,11 @@
 import xtui
 
-RULES_FILE = sys.argv[1]
+INPUT = sys.argv[1]
 MAKEFILE = 'Makefile.config'
 MACROS = 'config.h'
-PRESETS_DIR = 'defaults'
-
-def read_config(fname, config):
-	"Read saved values from last configuration run or a preset file"
+PRECONF = 'defaults'
+
+def read_defaults(fname, defaults):
+	"Read saved values from last configuration run"
 	
 	inf = open(fname, 'r')
@@ -53,18 +52,18 @@
 	for line in inf:
 		res = re.match(r'^(?:#!# )?([^#]\w*)\s*=\s*(.*?)\s*$', line)
-		if res:
-			config[res.group(1)] = res.group(2)
+		if (res):
+			defaults[res.group(1)] = res.group(2)
 	
 	inf.close()
 
-def check_condition(text, config, rules):
+def check_condition(text, defaults, ask_names):
 	"Check that the condition specified on input line is True (only CNF and DNF is supported)"
 	
 	ctype = 'cnf'
 	
-	if (')|' in text) or ('|(' in text):
+	if ((')|' in text) or ('|(' in text)):
 		ctype = 'dnf'
 	
-	if ctype == 'cnf':
+	if (ctype == 'cnf'):
 		conds = text.split('&')
 	else:
@@ -72,23 +71,23 @@
 	
 	for cond in conds:
-		if cond.startswith('(') and cond.endswith(')'):
+		if (cond.startswith('(')) and (cond.endswith(')')):
 			cond = cond[1:-1]
 		
-		inside = check_inside(cond, config, ctype)
+		inside = check_inside(cond, defaults, ctype)
 		
 		if (ctype == 'cnf') and (not inside):
 			return False
 		
-		if (ctype == 'dnf') and inside:
+		if (ctype == 'dnf') and (inside):
 			return True
 	
-	if ctype == 'cnf':
+	if (ctype == 'cnf'):
 		return True
 	return False
 
-def check_inside(text, config, ctype):
+def check_inside(text, defaults, ctype):
 	"Check for condition"
 	
-	if ctype == 'cnf':
+	if (ctype == 'cnf'):
 		conds = text.split('|')
 	else:
@@ -97,5 +96,5 @@
 	for cond in conds:
 		res = re.match(r'^(.*?)(!?=)(.*)$', cond)
-		if not res:
+		if (not res):
 			raise RuntimeError("Invalid condition: %s" % cond)
 		
@@ -104,12 +103,12 @@
 		condval = res.group(3)
 		
-		if not condname in config:
+		if (not condname in defaults):
 			varval = ''
 		else:
-			varval = config[condname]
+			varval = defaults[condname]
 			if (varval == '*'):
 				varval = 'y'
 		
-		if ctype == 'cnf':
+		if (ctype == 'cnf'):
 			if (oper == '=') and (condval == varval):
 				return True
@@ -124,11 +123,11 @@
 				return False
 	
-	if ctype == 'cnf':
+	if (ctype == 'cnf'):
 		return False
 	
 	return True
 
-def parse_rules(fname, rules):
-	"Parse rules file"
+def parse_config(fname, ask_names):
+	"Parse configuration file"
 	
 	inf = open(fname, 'r')
@@ -139,9 +138,9 @@
 	for line in inf:
 		
-		if line.startswith('!'):
+		if (line.startswith('!')):
 			# Ask a question
 			res = re.search(r'!\s*(?:\[(.*?)\])?\s*([^\s]+)\s*\((.*)\)\s*$', line)
 			
-			if not res:
+			if (not res):
 				raise RuntimeError("Weird line: %s" % line)
 			
@@ -150,10 +149,10 @@
 			vartype = res.group(3)
 			
-			rules.append((varname, vartype, name, choices, cond))
+			ask_names.append((varname, vartype, name, choices, cond))
 			name = ''
 			choices = []
 			continue
 		
-		if line.startswith('@'):
+		if (line.startswith('@')):
 			# Add new line into the 'choices' array
 			res = re.match(r'@\s*(?:\[(.*?)\])?\s*"(.*?)"\s*(.*)$', line)
@@ -165,10 +164,10 @@
 			continue
 		
-		if line.startswith('%'):
+		if (line.startswith('%')):
 			# Name of the option
 			name = line[1:].strip()
 			continue
 		
-		if line.startswith('#') or (line == '\n'):
+		if ((line.startswith('#')) or (line == '\n')):
 			# Comment or empty line
 			continue
@@ -182,5 +181,5 @@
 	"Return '*' if yes, ' ' if no"
 	
-	if default == 'y':
+	if (default == 'y'):
 		return '*'
 	
@@ -200,5 +199,5 @@
 	cnt = 0
 	for key, val in choices:
-		if (default) and (key == default):
+		if ((default) and (key == default)):
 			position = cnt
 		
@@ -208,135 +207,22 @@
 	(button, value) = xtui.choice_window(screen, name, 'Choose value', options, position)
 	
-	if button == 'cancel':
+	if (button == 'cancel'):
 		return None
 	
 	return choices[value][0]
 
-## Infer and verify configuration values.
-#
-# Augment @a config with values that can be inferred, purge invalid ones
-# and verify that all variables have a value (previously specified or inferred).
-#
-# @param config Configuration to work on
-# @param rules  Rules
-#
-# @return True if configuration is complete and valid, False
-#         otherwise.
-#
-def infer_verify_choices(config, rules):
-	"Infer and verify configuration values."
-	
-	for rule in rules:
-		varname, vartype, name, choices, cond = rule
-		
-		if cond and (not check_condition(cond, config, rules)):
-			continue
-		
-		if not varname in config:
-			value = None
-		else:
-			value = config[varname]
-		
-		if not validate_rule_value(rule, value):
-			value = None
-		
-		default = get_default_rule(rule)
-		if default != None:
-			config[varname] = default
-		
-		if not varname in config:
+def check_choices(defaults, ask_names):
+	"Check whether all accessible variables have a default"
+	
+	for varname, vartype, name, choices, cond in ask_names:
+		if ((cond) and (not check_condition(cond, defaults, ask_names))):
+			continue
+		
+		if (not varname in defaults):
 			return False
 	
 	return True
 
-## Get default value from a rule.
-def get_default_rule(rule):
-	varname, vartype, name, choices, cond = rule
-	
-	default = None
-	
-	if vartype == 'choice':
-		# If there is just one option, use it
-		if len(choices) == 1:
-			default = choices[0][0]
-	elif vartype == 'y':
-		default = '*'
-	elif vartype == 'n':
-		default = 'n'
-	elif vartype == 'y/n':
-		default = 'y'
-	elif vartype == 'n/y':
-		default = 'n'
-	else:
-		raise RuntimeError("Unknown variable type: %s" % vartype)
-	
-	return default
-
-## Get option from a rule.
-#
-# @param rule  Rule for a variable
-# @param value Current value of the variable
-#
-# @return Option (string) to ask or None which means not to ask.
-#
-def get_rule_option(rule, value):
-	varname, vartype, name, choices, cond = rule
-	
-	option = None
-	
-	if vartype == 'choice':
-		# If there is just one option, don't ask
-		if len(choices) != 1:
-			if (value == None):
-				option = "?     %s --> " % name
-			else:
-				option = "      %s [%s] --> " % (name, value)
-	elif vartype == 'y':
-		pass
-	elif vartype == 'n':
-		pass
-	elif vartype == 'y/n':
-		option = "  <%s> %s " % (yes_no(value), name)
-	elif vartype == 'n/y':
-		option ="  <%s> %s " % (yes_no(value), name)
-	else:
-		raise RuntimeError("Unknown variable type: %s" % vartype)
-	
-	return option
-
-## Check if variable value is valid.
-#
-# @param rule  Rule for the variable
-# @param value Value of the variable
-#
-# @return True if valid, False if not valid.
-#
-def validate_rule_value(rule, value):
-	varname, vartype, name, choices, cond = rule
-	
-	if value == None:
-		return True
-	
-	if vartype == 'choice':
-		if not value in [choice[0] for choice in choices]:
-			return False
-	elif vartype == 'y':
-		if value != 'y':
-			return False
-	elif vartype == 'n':
-		if value != 'n':
-			return False
-	elif vartype == 'y/n':
-		if not value in ['y', 'n']:
-			return False
-	elif vartype == 'n/y':
-		if not value in ['y', 'n']:
-			return False
-	else:
-		raise RuntimeError("Unknown variable type: %s" % vartype)
-	
-	return True
-
-def create_output(mkname, mcname, config, rules):
+def create_output(mkname, mcname, defaults, ask_names):
 	"Create output configuration"
 	
@@ -352,7 +238,7 @@
 		sys.stderr.write("failed\n")
 	
-	if len(version) == 3:
+	if (len(version) == 3):
 		revision = version[1]
-		if version[0] != 1:
+		if (version[0] != 1):
 			revision += 'M'
 		revision += ' (%s)' % version[2]
@@ -373,26 +259,26 @@
 	defs = 'CONFIG_DEFS ='
 	
-	for varname, vartype, name, choices, cond in rules:
-		if cond and (not check_condition(cond, config, rules)):
-			continue
-		
-		if not varname in config:
-			value = ''
+	for varname, vartype, name, choices, cond in ask_names:
+		if ((cond) and (not check_condition(cond, defaults, ask_names))):
+			continue
+		
+		if (not varname in defaults):
+			default = ''
 		else:
-			value = config[varname]
-			if (value == '*'):
-				value = 'y'
-		
-		outmk.write('# %s\n%s = %s\n\n' % (name, varname, value))
-		
-		if vartype in ["y", "n", "y/n", "n/y"]:
-			if value == "y":
+			default = defaults[varname]
+			if (default == '*'):
+				default = 'y'
+		
+		outmk.write('# %s\n%s = %s\n\n' % (name, varname, default))
+		
+		if ((vartype == "y") or (vartype == "n") or (vartype == "y/n") or (vartype == "n/y")):
+			if (default == "y"):
 				outmc.write('/* %s */\n#define %s\n\n' % (name, varname))
 				defs += ' -D%s' % varname
 		else:
-			outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, value, varname, value))
-			defs += ' -D%s=%s -D%s_%s' % (varname, value, varname, value)
-	
-	if revision is not None:
+			outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, default, varname, default))
+			defs += ' -D%s=%s -D%s_%s' % (varname, default, varname, default)
+	
+	if (revision is not None):
 		outmk.write('REVISION = %s\n' % revision)
 		outmc.write('#define REVISION %s\n' % revision)
@@ -413,7 +299,5 @@
 	return list
 
-## Ask user to choose a configuration profile.
-#
-def choose_profile(root, fname, screen, config):
+def read_preconfigured(root, fname, screen, defaults):
 	options = []
 	opt2path = {}
@@ -425,5 +309,5 @@
 		canon = os.path.join(path, fname)
 		
-		if os.path.isdir(path) and os.path.exists(canon) and os.path.isfile(canon):
+		if ((os.path.isdir(path)) and (os.path.exists(canon)) and (os.path.isfile(canon))):
 			subprofile = False
 			
@@ -433,91 +317,44 @@
 				subcanon = os.path.join(subpath, fname)
 				
-				if os.path.isdir(subpath) and os.path.exists(subcanon) and os.path.isfile(subcanon):
+				if ((os.path.isdir(subpath)) and (os.path.exists(subcanon)) and (os.path.isfile(subcanon))):
 					subprofile = True
 					options.append("%s (%s)" % (name, subname))
-					opt2path[cnt] = [name, subname]
+					opt2path[cnt] = (canon, subcanon)
 					cnt += 1
 			
-			if not subprofile:
+			if (not subprofile):
 				options.append(name)
-				opt2path[cnt] = [name]
+				opt2path[cnt] = (canon, None)
 				cnt += 1
 	
 	(button, value) = xtui.choice_window(screen, 'Load preconfigured defaults', 'Choose configuration profile', options, None)
 	
-	if button == 'cancel':
+	if (button == 'cancel'):
 		return None
 	
-	return opt2path[value]
-
-## Read presets from a configuration profile.
-#
-# @param profile Profile to load from (a list of string components)
-# @param config  Output configuration
-#
-def read_presets(profile, config):
-	path = os.path.join(PRESETS_DIR, profile[0], MAKEFILE)
-	read_config(path, config)
-	
-	if len(profile) > 1:
-		path = os.path.join(PRESETS_DIR, profile[0], profile[1], MAKEFILE)
-		read_config(path, config)
-
-## Parse profile name (relative OS path) into a list of components.
-#
-# @param profile_name Relative path (using OS separator)
-# @return             List of components
-#
-def parse_profile_name(profile_name):
-	profile = []
-	
-	head, tail = os.path.split(profile_name)
-	if head != '':
-		profile.append(head)
-	
-	profile.append(tail)
-	return profile
+	read_defaults(opt2path[value][0], defaults)
+	if (opt2path[value][1] != None):
+		read_defaults(opt2path[value][1], defaults)
 
 def main():
-	profile = None
-	config = {}
-	rules = []
-	
-	# Parse rules file
-	parse_rules(RULES_FILE, rules)
-	
-	# Input configuration file can be specified on command line
-	# otherwise configuration from previous run is used.
-	if len(sys.argv) >= 4:
-		profile = parse_profile_name(sys.argv[3])
-		read_presets(profile, config)
-	elif os.path.exists(MAKEFILE):
-		read_config(MAKEFILE, config)
-	
-	# Default mode: check values and regenerate configuration files
-	if (len(sys.argv) >= 3) and (sys.argv[2] == 'default'):
-		if (infer_verify_choices(config, rules)):
-			create_output(MAKEFILE, MACROS, config, rules)
+	defaults = {}
+	ask_names = []
+	
+	# Parse configuration file
+	parse_config(INPUT, ask_names)
+	
+	# Read defaults from previous run
+	if os.path.exists(MAKEFILE):
+		read_defaults(MAKEFILE, defaults)
+	
+	# Default mode: only check defaults and regenerate configuration
+	if ((len(sys.argv) >= 3) and (sys.argv[2] == 'default')):
+		if (check_choices(defaults, ask_names)):
+			create_output(MAKEFILE, MACROS, defaults, ask_names)
 			return 0
 	
-	# Hands-off mode: check values and regenerate configuration files,
-	# but no interactive fallback
-	if (len(sys.argv) >= 3) and (sys.argv[2] == 'hands-off'):
-		# We deliberately test sys.argv >= 4 because we do not want
-		# to read implicitly any possible previous run configuration
-		if len(sys.argv) < 4:
-			sys.stderr.write("Configuration error: No presets specified\n")
-			return 2
-		
-		if (infer_verify_choices(config, rules)):
-			create_output(MAKEFILE, MACROS, config, rules)
-			return 0
-		
-		sys.stderr.write("Configuration error: The presets are ambiguous\n")
-		return 1
-	
-	# Check mode: only check configuration
-	if (len(sys.argv) >= 3) and (sys.argv[2] == 'check'):
-		if infer_verify_choices(config, rules):
+	# Check mode: only check defaults
+	if ((len(sys.argv) >= 3) and (sys.argv[2] == 'check')):
+		if (check_choices(defaults, ask_names)):
 			return 0
 		return 1
@@ -529,8 +366,8 @@
 		while True:
 			
-			# Cancel out all values which have to be deduced
-			for varname, vartype, name, choices, cond in rules:
-				if (vartype == 'y') and (varname in config) and (config[varname] == '*'):
-					config[varname] = None
+			# Cancel out all defaults which have to be deduced
+			for varname, vartype, name, choices, cond in ask_names:
+				if ((vartype == 'y') and (varname in defaults) and (defaults[varname] == '*')):
+					defaults[varname] = None
 			
 			options = []
@@ -540,32 +377,50 @@
 			options.append("  --- Load preconfigured defaults ... ")
 			
-			for rule in rules:
-				varname, vartype, name, choices, cond = rule
-				
-				if cond and (not check_condition(cond, config, rules)):
+			for varname, vartype, name, choices, cond in ask_names:
+				
+				if ((cond) and (not check_condition(cond, defaults, ask_names))):
 					continue
 				
-				if varname == selname:
+				if (varname == selname):
 					position = cnt
 				
-				if not varname in config:
-					value = None
+				if (not varname in defaults):
+					default = None
 				else:
-					value = config[varname]
-				
-				if not validate_rule_value(rule, value):
-					value = None
-				
-				default = get_default_rule(rule)
-				if default != None:
-					if value == None:
-						value = default
-					config[varname] = value
-				
-				option = get_rule_option(rule, value)
-				if option != None:
-					options.append(option)
+					default = defaults[varname]
+				
+				if (vartype == 'choice'):
+					# Check if the default is an acceptable value
+					if ((default) and (not default in [choice[0] for choice in choices])):
+						default = None
+						defaults.pop(varname)
+					
+					# If there is just one option, use it
+					if (len(choices) == 1):
+						defaults[varname] = choices[0][0]
+						continue
+					
+					if (default == None):
+						options.append("?     %s --> " % name)
+					else:
+						options.append("      %s [%s] --> " % (name, default))
+				elif (vartype == 'y'):
+					defaults[varname] = '*'
+					continue
+				elif (vartype == 'n'):
+					defaults[varname] = 'n'
+					continue
+				elif (vartype == 'y/n'):
+					if (default == None):
+						default = 'y'
+						defaults[varname] = default
+					options.append("  <%s> %s " % (yes_no(default), name))
+				elif (vartype == 'n/y'):
+					if (default == None):
+						default = 'n'
+						defaults[varname] = default
+					options.append("  <%s> %s " % (yes_no(default), name))
 				else:
-					continue
+					raise RuntimeError("Unknown variable type: %s" % vartype)
 				
 				opt2row[cnt] = (varname, vartype, name, choices)
@@ -578,9 +433,9 @@
 			(button, value) = xtui.choice_window(screen, 'HelenOS configuration', 'Choose configuration option', options, position)
 			
-			if button == 'cancel':
+			if (button == 'cancel'):
 				return 'Configuration canceled'
 			
-			if button == 'done':
-				if (infer_verify_choices(config, rules)):
+			if (button == 'done'):
+				if (check_choices(defaults, ask_names)):
 					break
 				else:
@@ -588,33 +443,31 @@
 					continue
 			
-			if value == 0:
-				profile = choose_profile(PRESETS_DIR, MAKEFILE, screen, config)
-				if profile != None:
-					read_presets(profile, config)
+			if (value == 0):
+				read_preconfigured(PRECONF, MAKEFILE, screen, defaults)
 				position = 1
 				continue
 			
 			position = None
-			if not value in opt2row:
+			if (not value in opt2row):
 				raise RuntimeError("Error selecting value: %s" % value)
 			
 			(selname, seltype, name, choices) = opt2row[value]
 			
-			if not selname in config:
-				value = None
+			if (not selname in defaults):
+					default = None
 			else:
-				value = config[selname]
-			
-			if seltype == 'choice':
-				config[selname] = subchoice(screen, name, choices, value)
-			elif (seltype == 'y/n') or (seltype == 'n/y'):
-				if config[selname] == 'y':
-					config[selname] = 'n'
+				default = defaults[selname]
+			
+			if (seltype == 'choice'):
+				defaults[selname] = subchoice(screen, name, choices, default)
+			elif ((seltype == 'y/n') or (seltype == 'n/y')):
+				if (defaults[selname] == 'y'):
+					defaults[selname] = 'n'
 				else:
-					config[selname] = 'y'
+					defaults[selname] = 'y'
 	finally:
 		xtui.screen_done(screen)
 	
-	create_output(MAKEFILE, MACROS, config, rules)
+	create_output(MAKEFILE, MACROS, defaults, ask_names)
 	return 0
 
Index: uspace/app/netecho/print_error.c
===================================================================
--- uspace/app/netecho/print_error.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/app/netecho/print_error.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -164,5 +164,5 @@
 	case EDESTADDRREQ:
 		fprintf(output, "Destination address required (%d) error", error_code);
-	case EAGAIN:
+	case TRY_AGAIN:
 		fprintf(output, "Try again (%d) error", error_code);
 	default:
Index: uspace/lib/c/generic/adt/char_map.c
===================================================================
--- uspace/lib/c/generic/adt/char_map.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/lib/c/generic/adt/char_map.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -90,8 +90,8 @@
 	}
 
-	map->items[map->next]->c = *identifier;
-	identifier++;
-	map->next++;
-	if ((length > 1) || ((length == 0) && *identifier)) {
+	map->items[map->next]->c = * identifier;
+	++ identifier;
+	++ map->next;
+	if ((length > 1) || ((length == 0) && (*identifier))) {
 		map->items[map->next - 1]->value = CHAR_MAP_NULL;
 		return char_map_add_item(map->items[map->next - 1], identifier,
@@ -142,13 +142,14 @@
     const int value)
 {
-	if (char_map_is_valid(map) && identifier && (length || *identifier)) {
+	if (char_map_is_valid(map) && (identifier) &&
+	    ((length) || (*identifier))) {
 		int index;
 
-		for (index = 0; index < map->next; index++) {
+		for (index = 0; index < map->next; ++ index) {
 			if (map->items[index]->c != *identifier)
 				continue;
 				
-			identifier++;
-			if((length > 1) || ((length == 0) && *identifier)) {
+			++ identifier;
+			if((length > 1) || ((length == 0) && (*identifier))) {
 				return char_map_add(map->items[index],
 				    identifier, length ? length - 1 : 0, value);
@@ -177,5 +178,5 @@
 
 		map->magic = 0;
-		for (index = 0; index < map->next; index++)
+		for (index = 0; index < map->next; ++index)
 			char_map_destroy(map->items[index]);
 
@@ -206,10 +207,10 @@
 		return NULL;
 
-	if (length || *identifier) {
+	if (length || (*identifier)) {
 		int index;
 
-		for (index = 0; index < map->next; index++) {
+		for (index = 0; index < map->next; ++index) {
 			if (map->items[index]->c == *identifier) {
-				identifier++;
+				++identifier;
 				if (length == 1)
 					return map->items[index];
Index: uspace/lib/c/include/adt/generic_field.h
===================================================================
--- uspace/lib/c/include/adt/generic_field.h	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/lib/c/include/adt/generic_field.h	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -91,5 +91,5 @@
 			} \
 			field->items[field->next] = value; \
-			field->next++; \
+			++field->next; \
 			field->items[field->next] = NULL; \
 			return field->next - 1; \
@@ -108,5 +108,5 @@
 			int index; \
 			field->magic = 0; \
-			for (index = 0; index < field->next; index++) { \
+			for (index = 0; index < field->next; ++ index) { \
 				if (field->items[index]) \
 					free(field->items[index]); \
Index: uspace/lib/c/include/errno.h
===================================================================
--- uspace/lib/c/include/errno.h	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/lib/c/include/errno.h	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -83,6 +83,8 @@
 #define ENOTCONN	(-10057)
 
-/** The requested operation was not performed. Try again later. */
-#define EAGAIN		(-11002)
+/** The requested operation was not performed.
+ *  Try again later.
+ */
+#define TRY_AGAIN	(-11002)
 
 /** No data.
Index: uspace/lib/c/include/ipc/vfs.h
===================================================================
--- uspace/lib/c/include/ipc/vfs.h	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/lib/c/include/ipc/vfs.h	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -36,7 +36,6 @@
 #define LIBC_IPC_VFS_H_
 
+#include <sys/types.h>
 #include <ipc/ipc.h>
-#include <sys/types.h>
-#include <bool.h>
 
 #define FS_NAME_MAXLEN  20
@@ -56,6 +55,4 @@
 	/** Unique identifier of the fs. */
 	char name[FS_NAME_MAXLEN + 1];
-	bool concurrent_read_write;
-	bool write_retains_size;
 } vfs_info_t;
 
Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/lib/drv/generic/driver.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -418,5 +418,5 @@
 		goto failure;
 
-	return EOK;
+	goto leave;
 
 failure:
@@ -431,4 +431,5 @@
 	}
 
+leave:
 	return rc;
 }
Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/devman/devman.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -766,4 +766,7 @@
 		start_driver(drv);
 	}
+	fibril_mutex_unlock(&drv->driver_mutex);
+	
+	fibril_mutex_lock(&drv->driver_mutex);
 	bool is_running = drv->state == DRIVER_RUNNING;
 	fibril_mutex_unlock(&drv->driver_mutex);
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/devman/main.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -246,9 +246,9 @@
 
 	/*
-	 * Try to find a suitable driver and assign it to the device.  We do
-	 * not want to block the current fibril that is used for processing
-	 * incoming calls: we will launch a separate fibril to handle the
-	 * driver assigning. That is because assign_driver can actually include
-	 * task spawning which could take some time.
+	 * Try to find suitable driver and assign it to the device.
+	 * We do not want to block current fibril that is used to processing
+	 * incoming calls: we will launch a separate fibril to handle
+	 * the driver assigning. That is because assign_driver can actually
+	 * include task spawning which could take some time.
 	 */
 	fid_t assign_fibril = fibril_create(assign_driver_fibril, node);
Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/devman/match.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -46,5 +46,5 @@
 	if (str_cmp(driver->id, device->id) == 0) {
 		/*
-		 * The strings match, return the product of their scores.
+		 * The strings matches, return their score multiplied.
 		 */
 		return driver->score * device->score;
@@ -66,5 +66,5 @@
 	
 	/*
-	 * Go through all pairs, return the highest score obtained.
+	 * Go through all pairs, return the highest score obtainetd.
 	 */
 	int highest_score = 0;
Index: uspace/srv/fs/devfs/devfs.c
===================================================================
--- uspace/srv/fs/devfs/devfs.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/fs/devfs/devfs.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -53,6 +53,4 @@
 static vfs_info_t devfs_vfs_info = {
 	.name = NAME,
-	.concurrent_read_write = false,
-	.write_retains_size = false,
 };
 
Index: uspace/srv/fs/fat/fat.c
===================================================================
--- uspace/srv/fs/fat/fat.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/fs/fat/fat.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -52,6 +52,4 @@
 vfs_info_t fat_vfs_info = {
 	.name = NAME,
-	.concurrent_read_write = false,
-	.write_retains_size = false,	
 };
 
Index: uspace/srv/fs/tmpfs/tmpfs.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/fs/tmpfs/tmpfs.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -57,6 +57,4 @@
 vfs_info_t tmpfs_vfs_info = {
 	.name = NAME,
-	.concurrent_read_write = false,
-	.write_retains_size = false,
 };
 
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/net/il/arp/arp.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -72,7 +72,4 @@
 #define NAME  "arp"
 
-/** Number of microseconds to wait for an ARP reply. */
-#define ARP_TRANS_WAIT	1000000
-
 /** ARP global data. */
 arp_globals_t arp_globals;
@@ -80,27 +77,5 @@
 DEVICE_MAP_IMPLEMENT(arp_cache, arp_device_t);
 INT_MAP_IMPLEMENT(arp_protos, arp_proto_t);
-GENERIC_CHAR_MAP_IMPLEMENT(arp_addr, arp_trans_t);
-
-static void arp_clear_trans(arp_trans_t *trans)
-{
-	if (trans->hw_addr) {
-		free(trans->hw_addr);
-		trans->hw_addr = NULL;
-	}
-	fibril_condvar_broadcast(&trans->cv);
-}
-
-static void arp_clear_addr(arp_addr_t *addresses)
-{
-	int count;
-	arp_trans_t *trans;
-
-	for (count = arp_addr_count(addresses) - 1; count >= 0; count--) {
-		trans = arp_addr_items_get_index(&addresses->values, count);
-		if (trans)
-			arp_clear_trans(trans);
-	}
-}
-
+GENERIC_CHAR_MAP_IMPLEMENT(arp_addr, measured_string_t);
 
 /** Clears the device specific data.
@@ -121,5 +96,4 @@
 			if (proto->addr_data)
 				free(proto->addr_data);
-			arp_clear_addr(&proto->addresses);
 			arp_addr_destroy(&proto->addresses);
 		}
@@ -133,5 +107,5 @@
 	arp_device_t *device;
 
-	fibril_mutex_lock(&arp_globals.lock);
+	fibril_rwlock_write_lock(&arp_globals.lock);
 	for (count = arp_cache_count(&arp_globals.cache) - 1; count >= 0;
 	    count--) {
@@ -146,5 +120,5 @@
 	}
 	arp_cache_clear(&arp_globals.cache);
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	printf("Cache cleaned\n");
 	return EOK;
@@ -156,22 +130,18 @@
 	arp_device_t *device;
 	arp_proto_t *proto;
-	arp_trans_t *trans;
-
-	fibril_mutex_lock(&arp_globals.lock);
+
+	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
 	if (!device) {
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
 	proto = arp_protos_find(&device->protos, protocol);
 	if (!proto) {
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
-	trans = arp_addr_find(&proto->addresses, address->value, address->length);
-	if (trans)
-		arp_clear_trans(trans);
 	arp_addr_exclude(&proto->addresses, address->value, address->length);
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	return EOK;
 }
@@ -182,13 +152,13 @@
 	arp_device_t *device;
 
-	fibril_mutex_lock(&arp_globals.lock);
+	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
 	if (!device) {
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
 	arp_clear_device(device);
 	printf("Device %d cleared\n", device_id);
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	return EOK;
 }
@@ -251,5 +221,5 @@
 	int rc;
 
-	fibril_mutex_lock(&arp_globals.lock);
+	fibril_rwlock_write_lock(&arp_globals.lock);
 
 	/* An existing device? */
@@ -259,5 +229,5 @@
 		if (device->service != service) {
 			printf("Device %d already exists\n", device->device_id);
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			return EEXIST;
 		}
@@ -271,5 +241,5 @@
 			rc = arp_proto_create(&proto, protocol, address);
 			if (rc != EOK) {
-				fibril_mutex_unlock(&arp_globals.lock);
+				fibril_rwlock_write_unlock(&arp_globals.lock);
 				return rc;
 			}
@@ -277,5 +247,5 @@
 			    proto);
 			if (index < 0) {
-				fibril_mutex_unlock(&arp_globals.lock);
+				fibril_rwlock_write_unlock(&arp_globals.lock);
 				free(proto);
 				return index;
@@ -292,5 +262,5 @@
 		device = (arp_device_t *) malloc(sizeof(arp_device_t));
 		if (!device) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			return ENOMEM;
 		}
@@ -299,5 +269,5 @@
 		rc = arp_protos_initialize(&device->protos);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device);
 			return rc;
@@ -305,5 +275,5 @@
 		rc = arp_proto_create(&proto, protocol, address);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device);
 			return rc;
@@ -311,5 +281,5 @@
 		index = arp_protos_add(&device->protos, proto->service, proto);
 		if (index < 0) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
@@ -323,5 +293,5 @@
 		    arp_globals.client_connection);
 		if (device->phone < 0) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
@@ -333,5 +303,5 @@
 		    &device->packet_dimension);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
@@ -343,5 +313,5 @@
 		    &device->addr_data);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
@@ -353,5 +323,5 @@
 		    &device->broadcast_addr, &device->broadcast_data);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device->addr);
 			free(device->addr_data);
@@ -364,5 +334,5 @@
 		    device);
 		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device->addr);
 			free(device->addr_data);
@@ -377,5 +347,5 @@
 		    device->service, protocol);
 	}
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	
 	return EOK;
@@ -393,9 +363,9 @@
 	int rc;
 
-	fibril_mutex_initialize(&arp_globals.lock);
-	fibril_mutex_lock(&arp_globals.lock);
+	fibril_rwlock_initialize(&arp_globals.lock);
+	fibril_rwlock_write_lock(&arp_globals.lock);
 	arp_globals.client_connection = client_connection;
 	rc = arp_cache_initialize(&arp_globals.cache);
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	
 	return rc;
@@ -413,12 +383,12 @@
 	arp_device_t *device;
 
-	fibril_mutex_lock(&arp_globals.lock);
+	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
 	if (!device) {
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
 	device->packet_dimension.content = mtu;
-	fibril_mutex_unlock(&arp_globals.lock);
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	printf("arp - device %d changed mtu to %zu\n\n", device_id, mtu);
 	return EOK;
@@ -451,5 +421,5 @@
 	arp_device_t *device;
 	arp_proto_t *proto;
-	arp_trans_t *trans;
+	measured_string_t *hw_source;
 	uint8_t *src_hw;
 	uint8_t *src_proto;
@@ -482,13 +452,13 @@
 	des_hw = src_proto + header->protocol_length;
 	des_proto = des_hw + header->hardware_length;
-	trans = arp_addr_find(&proto->addresses, (char *) src_proto,
+	hw_source = arp_addr_find(&proto->addresses, (char *) src_proto,
 	    CONVERT_SIZE(uint8_t, char, header->protocol_length));
 	/* Exists? */
-	if (trans && trans->hw_addr) {
-		if (trans->hw_addr->length != CONVERT_SIZE(uint8_t, char,
+	if (hw_source) {
+		if (hw_source->length != CONVERT_SIZE(uint8_t, char,
 		    header->hardware_length)) {
 			return EINVAL;
 		}
-		memcpy(trans->hw_addr->value, src_hw, trans->hw_addr->length);
+		memcpy(hw_source->value, src_hw, hw_source->length);
 	}
 	/* Is my protocol address? */
@@ -500,27 +470,16 @@
 	    proto->addr->length)) {
 		/* Not already updated? */
-		if (!trans) {
-			trans = (arp_trans_t *) malloc(sizeof(arp_trans_t));
-			if (!trans)
+		if (!hw_source) {
+			hw_source = measured_string_create_bulk((char *) src_hw,
+			    CONVERT_SIZE(uint8_t, char,
+			    header->hardware_length));
+			if (!hw_source)
 				return ENOMEM;
-			trans->hw_addr = NULL;
-			fibril_condvar_initialize(&trans->cv);
+
 			rc = arp_addr_add(&proto->addresses, (char *) src_proto,
-			    CONVERT_SIZE(uint8_t, char, header->protocol_length),
-			    trans);
-			if (rc != EOK) {
-				/* The generic char map has already freed trans! */
+			    CONVERT_SIZE(uint8_t, char,
+			    header->protocol_length), hw_source);
+			if (rc != EOK)
 				return rc;
-			}
-		}
-		if (!trans->hw_addr) {
-			trans->hw_addr = measured_string_create_bulk(
-			    (char *) src_hw, CONVERT_SIZE(uint8_t, char,
-			    header->hardware_length));
-			if (!trans->hw_addr)
-				return ENOMEM;
-
-			/* Notify the fibrils that wait for the translation. */
-			fibril_condvar_broadcast(&trans->cv);
 		}
 		if (ntohs(header->operation) == ARPOP_REQUEST) {
@@ -531,5 +490,5 @@
 			memcpy(src_hw, device->addr->value,
 			    device->packet_dimension.addr_len);
-			memcpy(des_hw, trans->hw_addr->value,
+			memcpy(des_hw, hw_source->value,
 			    header->hardware_length);
 			
@@ -557,51 +516,36 @@
  * @param[in] protocol	The protocol service.
  * @param[in] target	The target protocol address.
- * @param[out] translation Where the hardware address of the target is stored.
- * @return		EOK on success.
- * @return		EAGAIN if the caller should try again.
- * @return		Other error codes in case of error.
- */
-static int
+ * @return		The hardware address of the target.
+ * @return		NULL if the target parameter is NULL.
+ * @return		NULL if the device is not found.
+ * @return		NULL if the device packet is too small to send a
+ *			request.
+ * @return		NULL if the hardware address is not found in the cache.
+ */
+static measured_string_t *
 arp_translate_message(device_id_t device_id, services_t protocol,
-    measured_string_t *target, measured_string_t **translation)
+    measured_string_t *target)
 {
 	arp_device_t *device;
 	arp_proto_t *proto;
-	arp_trans_t *trans;
+	measured_string_t *addr;
 	size_t length;
 	packet_t *packet;
 	arp_header_t *header;
-	bool retry = false;
-	int rc;
-
-restart:
-	if (!target || !translation)
-		return EBADMEM;
+
+	if (!target)
+		return NULL;
 
 	device = arp_cache_find(&arp_globals.cache, device_id);
 	if (!device)
-		return ENOENT;
+		return NULL;
 
 	proto = arp_protos_find(&device->protos, protocol);
 	if (!proto || (proto->addr->length != target->length))
-		return ENOENT;
-
-	trans = arp_addr_find(&proto->addresses, target->value, target->length);
-	if (trans) {
-		if (trans->hw_addr) {
-			*translation = trans->hw_addr;
-			return EOK;
-		}
-		if (retry)
-			return EAGAIN;
-		rc = fibril_condvar_wait_timeout(&trans->cv, &arp_globals.lock,
-		    ARP_TRANS_WAIT);
-		if (rc == ETIMEOUT)
-			return ENOENT;
-		retry = true;
-		goto restart;
-	}
-	if (retry)
-		return EAGAIN;
+		return NULL;
+
+	addr = arp_addr_find(&proto->addresses, target->value, target->length);
+	if (addr)
+		return addr;
 
 	/* ARP packet content size = header + (address + translation) * 2 */
@@ -609,5 +553,5 @@
 	    CONVERT_SIZE(char, uint8_t, device->addr->length));
 	if (length > device->packet_dimension.content)
-		return ELIMIT;
+		return NULL;
 
 	packet = packet_get_4_remote(arp_globals.net_phone,
@@ -615,10 +559,10 @@
 	    length, device->packet_dimension.suffix);
 	if (!packet)
-		return ENOMEM;
+		return NULL;
 
 	header = (arp_header_t *) packet_suffix(packet, length);
 	if (!header) {
 		pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
-		return ENOMEM;
+		return NULL;
 	}
 
@@ -639,32 +583,13 @@
 	memcpy(((uint8_t *) header) + length, target->value, target->length);
 
-	rc = packet_set_addr(packet, (uint8_t *) device->addr->value,
+	if (packet_set_addr(packet, (uint8_t *) device->addr->value,
 	    (uint8_t *) device->broadcast_addr->value,
-	    CONVERT_SIZE(char, uint8_t, device->addr->length));
-	if (rc != EOK) {
+	    CONVERT_SIZE(char, uint8_t, device->addr->length)) != EOK) {
 		pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
-		return rc;
+		return NULL;
 	}
 
 	nil_send_msg(device->phone, device_id, packet, SERVICE_ARP);
-
-	trans = (arp_trans_t *) malloc(sizeof(arp_trans_t));
-	if (!trans)
-		return ENOMEM;
-	trans->hw_addr = NULL;
-	fibril_condvar_initialize(&trans->cv);
-	rc = arp_addr_add(&proto->addresses, target->value, target->length,
-	    trans);
-	if (rc != EOK) {
-		/* The generic char map has already freed trans! */
-		return rc;
-	}
-	
-	rc = fibril_condvar_wait_timeout(&trans->cv, &arp_globals.lock,
-	    ARP_TRANS_WAIT);
-	if (rc == ETIMEOUT)
-		return ENOENT;
-	retry = true;
-	goto restart;
+	return NULL;
 }
 
@@ -717,19 +642,15 @@
 			return rc;
 		
-		fibril_mutex_lock(&arp_globals.lock);
-		rc = arp_translate_message(IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), address, &translation);
+		fibril_rwlock_read_lock(&arp_globals.lock);
+		translation = arp_translate_message(IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), address);
 		free(address);
 		free(data);
-		if (rc != EOK) {
-			fibril_mutex_unlock(&arp_globals.lock);
-			return rc;
-		}
 		if (!translation) {
-			fibril_mutex_unlock(&arp_globals.lock);
+			fibril_rwlock_read_unlock(&arp_globals.lock);
 			return ENOENT;
 		}
 		rc = measured_strings_reply(translation, 1);
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_read_unlock(&arp_globals.lock);
 		return rc;
 
@@ -761,5 +682,5 @@
 			return rc;
 		
-		fibril_mutex_lock(&arp_globals.lock);
+		fibril_rwlock_read_lock(&arp_globals.lock);
 		do {
 			next = pq_detach(packet);
@@ -771,5 +692,5 @@
 			packet = next;
 		} while (packet);
-		fibril_mutex_unlock(&arp_globals.lock);
+		fibril_rwlock_read_unlock(&arp_globals.lock);
 		
 		return EOK;
Index: uspace/srv/net/il/arp/arp.h
===================================================================
--- uspace/srv/net/il/arp/arp.h	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/net/il/arp/arp.h	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -65,9 +65,4 @@
 typedef struct arp_proto arp_proto_t;
 
-/** Type definition of the ARP address translation record.
- * @see arp_trans
- */
-typedef struct arp_trans arp_trans_t;
-
 /** ARP address map.
  *
@@ -75,5 +70,5 @@
  * @see generic_char_map.h
  */
-GENERIC_CHAR_MAP_DECLARE(arp_addr, arp_trans_t);
+GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
 
 /** ARP address cache.
@@ -94,9 +89,9 @@
 struct arp_device {
 	/** Actual device hardware address. */
-	measured_string_t *addr;
+	measured_string_t * addr;
 	/** Actual device hardware address data. */
 	char *addr_data;
 	/** Broadcast device hardware address. */
-	measured_string_t *broadcast_addr;
+	measured_string_t * broadcast_addr;
 	/** Broadcast device hardware address data. */
 	char *broadcast_data;
@@ -134,5 +129,5 @@
 	int net_phone;
 	/** Safety lock. */
-	fibril_mutex_t lock;
+	fibril_rwlock_t lock;
 };
 
@@ -149,18 +144,6 @@
 };
 
-/** ARP address translation record. */
-struct arp_trans {
-	/**
-	 * Hardware address for the translation. NULL denotes an incomplete
-	 * record with possible waiters.
-	 */ 
-	measured_string_t *hw_addr;
-	/** Condition variable used for waiting for completion of the record. */
-	fibril_condvar_t cv;
-};
-
 #endif
 
 /** @}
  */
-
Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/vfs/vfs.h	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -172,5 +172,4 @@
 
 extern fs_handle_t fs_name_to_handle(char *, bool);
-extern vfs_info_t *fs_handle_to_info(fs_handle_t);
 
 extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *,
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/vfs/vfs_ops.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -781,5 +781,4 @@
 static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read)
 {
-	vfs_info_t *vi;
 
 	/*
@@ -808,13 +807,9 @@
 	fibril_mutex_lock(&file->lock);
 
-	vi = fs_handle_to_info(file->node->fs_handle);
-	assert(vi);
-
 	/*
 	 * Lock the file's node so that no other client can read/write to it at
-	 * the same time unless the FS supports concurrent reads/writes and its
-	 * write implementation does not modify the file size.
-	 */
-	if (read || (vi->concurrent_read_write && vi->write_retains_size))
+	 * the same time.
+	 */
+	if (read)
 		fibril_rwlock_read_lock(&file->node->contents_rwlock);
 	else
@@ -862,5 +857,5 @@
 	
 	/* Unlock the VFS node. */
-	if (read || (vi->concurrent_read_write && vi->write_retains_size))
+	if (read)
 		fibril_rwlock_read_unlock(&file->node->contents_rwlock);
 	else {
Index: uspace/srv/vfs/vfs_register.c
===================================================================
--- uspace/srv/vfs/vfs_register.c	(revision 4006447f76b2458440272197d0fda72d4caecbe8)
+++ uspace/srv/vfs/vfs_register.c	(revision 463e73487913f21bac827e1a143dfeb4e9d442ae)
@@ -333,27 +333,4 @@
 }
 
-/** Find the VFS info structure.
- *
- * @param handle	FS handle for which the VFS info structure is sought.
- * @return		VFS info structure on success or NULL otherwise.
- */
-vfs_info_t *fs_handle_to_info(fs_handle_t handle)
-{
-	vfs_info_t *info = NULL;
-	link_t *cur;
-
-	fibril_mutex_lock(&fs_head_lock);
-	for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
-		fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link);
-		if (fs->fs_handle == handle) { 
-			info = &fs->vfs_info;
-			break;
-		}
-	}
-	fibril_mutex_unlock(&fs_head_lock);
-
-	return info;
-}
-
 /**
  * @}
