Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision c1694b6b243b360b5f1fbf0629b5e7d4f7f4a515)
+++ uspace/srv/devman/match.c	(revision 071a1ddbcc6bb2b9c6f3c1a3acc865f1f23b5fe0)
@@ -202,15 +202,16 @@
 	struct stat st;
 	
-	fd = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ);
-	if (fd < 0) {
+	int rc = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ, &fd);
+	if (rc != EOK) {
 		log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to open `%s' for reading: %s.",
-		    conf_path, str_error(errno));
+		    conf_path, str_error(rc));
 		goto cleanup;
 	}
 	opened = true;
 	
-	if (vfs_stat(fd, &st) != EOK) {
+	rc = vfs_stat(fd, &st);
+	if (rc != EOK) {
 		log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to fstat %d: %s.", fd,
-		    str_error(errno));
+		    str_error(rc));
 		goto cleanup;
 	}
@@ -230,8 +231,8 @@
 	
 	size_t read_bytes;
-	int rc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &read_bytes);
+	rc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &read_bytes);
 	if (rc != EOK) {
 		log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to read file '%s': %s.", conf_path,
-		    str_error(errno));
+		    str_error(rc));
 		goto cleanup;
 	}
