Index: uspace/srv/fs/devfs/devfs.c
===================================================================
--- uspace/srv/fs/devfs/devfs.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/devfs/devfs.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -80,6 +80,6 @@
 			devfs_open_node(callid, &call);
 			break;
-		case VFS_OUT_DEVICE:
-			devfs_device(callid, &call);
+		case VFS_OUT_STAT:
+			devfs_stat(callid, &call);
 			break;
 		case VFS_OUT_READ:
Index: uspace/srv/fs/devfs/devfs_ops.c
===================================================================
--- uspace/srv/fs/devfs/devfs_ops.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/devfs/devfs_ops.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -44,4 +44,5 @@
 #include <fibril_sync.h>
 #include <adt/hash_table.h>
+#include <sys/stat.h>
 #include "devfs.h"
 #include "devfs_ops.h"
@@ -278,7 +279,32 @@
 }
 
-void devfs_device(ipc_callid_t rid, ipc_call_t *request)
-{
+void devfs_stat(ipc_callid_t rid, ipc_call_t *request)
+{
+	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	
+	ipc_callid_t callid;
+	size_t size;
+	if (!ipc_data_read_receive(&callid, &size) ||
+	    size < sizeof(struct stat)) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+
+	struct stat *stat = malloc(sizeof(struct stat));
+	if (!stat) {
+		ipc_answer_0(callid, ENOMEM);
+		ipc_answer_0(rid, ENOMEM);
+		return;
+	}
+	memset(stat, 0, sizeof(struct stat));
+
+	stat->fs_handle = devfs_reg.fs_handle;
+	stat->dev_handle = dev_handle;
+	stat->index = index;
+	stat->lnkcnt = 1;
+	stat->is_file = (index != 0);
+	stat->size = 0;
 	
 	if (index != 0) {
@@ -289,14 +315,13 @@
 		fibril_mutex_lock(&devices_mutex);
 		link_t *lnk = hash_table_find(&devices, key);
-		if (lnk == NULL) {
-			fibril_mutex_unlock(&devices_mutex);
-			ipc_answer_0(rid, ENOENT);
-			return;
-		}
+		if (lnk != NULL) 
+			stat->devfs_stat.device = (dev_handle_t)index;
 		fibril_mutex_unlock(&devices_mutex);
-		
-		ipc_answer_1(rid, EOK, (ipcarg_t) index);
-	} else
-		ipc_answer_0(rid, ENOTSUP);
+	}
+
+	ipc_data_read_finalize(callid, stat, sizeof(struct stat));
+	ipc_answer_0(rid, EOK);
+
+	free(stat);
 }
 
Index: uspace/srv/fs/devfs/devfs_ops.h
===================================================================
--- uspace/srv/fs/devfs/devfs_ops.h	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/devfs/devfs_ops.h	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -43,5 +43,5 @@
 extern void devfs_lookup(ipc_callid_t, ipc_call_t *);
 extern void devfs_open_node(ipc_callid_t, ipc_call_t *);
-extern void devfs_device(ipc_callid_t, ipc_call_t *);
+extern void devfs_stat(ipc_callid_t, ipc_call_t *);
 extern void devfs_sync(ipc_callid_t, ipc_call_t *);
 extern void devfs_read(ipc_callid_t, ipc_call_t *);
Index: uspace/srv/fs/fat/fat.c
===================================================================
--- uspace/srv/fs/fat/fat.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/fat/fat.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -110,4 +110,7 @@
 			fat_truncate(callid, &call);
 			break;
+		case VFS_OUT_STAT:
+			fat_stat(callid, &call);
+			break;
 		case VFS_OUT_CLOSE:
 			fat_close(callid, &call);
@@ -118,7 +121,4 @@
 		case VFS_OUT_OPEN_NODE:
 			fat_open_node(callid, &call);
-			break;
-		case VFS_OUT_DEVICE:
-			fat_device(callid, &call);
 			break;
 		case VFS_OUT_SYNC:
Index: uspace/srv/fs/fat/fat.h
===================================================================
--- uspace/srv/fs/fat/fat.h	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/fat/fat.h	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -208,8 +208,9 @@
 extern void fat_write(ipc_callid_t, ipc_call_t *);
 extern void fat_truncate(ipc_callid_t, ipc_call_t *);
+extern void fat_stat(ipc_callid_t, ipc_call_t *);
 extern void fat_close(ipc_callid_t, ipc_call_t *);
 extern void fat_destroy(ipc_callid_t, ipc_call_t *);
 extern void fat_open_node(ipc_callid_t, ipc_call_t *);
-extern void fat_device(ipc_callid_t, ipc_call_t *);
+extern void fat_stat(ipc_callid_t, ipc_call_t *);
 extern void fat_sync(ipc_callid_t, ipc_call_t *);
 
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/fat/fat_ops.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -1203,5 +1203,5 @@
 }
 
-void fat_device(ipc_callid_t rid, ipc_call_t *request)
+void fat_stat(ipc_callid_t rid, ipc_call_t *request)
 {
 	ipc_answer_0(rid, ENOTSUP);
Index: uspace/srv/fs/tmpfs/tmpfs.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/tmpfs/tmpfs.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -126,6 +126,6 @@
 			tmpfs_open_node(callid, &call);
 			break;
-		case VFS_OUT_DEVICE:
-			tmpfs_device(callid, &call);
+		case VFS_OUT_STAT:
+			tmpfs_stat(callid, &call);
 			break;
 		case VFS_OUT_SYNC:
Index: uspace/srv/fs/tmpfs/tmpfs.h
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.h	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/tmpfs/tmpfs.h	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -87,8 +87,8 @@
 extern void tmpfs_write(ipc_callid_t, ipc_call_t *);
 extern void tmpfs_truncate(ipc_callid_t, ipc_call_t *);
+extern void tmpfs_stat(ipc_callid_t, ipc_call_t *);
 extern void tmpfs_close(ipc_callid_t, ipc_call_t *);
 extern void tmpfs_destroy(ipc_callid_t, ipc_call_t *);
 extern void tmpfs_open_node(ipc_callid_t, ipc_call_t *);
-extern void tmpfs_device(ipc_callid_t, ipc_call_t *);
 extern void tmpfs_sync(ipc_callid_t, ipc_call_t *);
 
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 4198f9c3ae7988eea2c8a649c01af1be31ded05d)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 852b80130e0f28124d72af653ed0aef959db3053)
@@ -629,5 +629,5 @@
 }
 
-void tmpfs_device(ipc_callid_t rid, ipc_call_t *request)
+void tmpfs_stat(ipc_callid_t rid, ipc_call_t *request)
 {
 	ipc_answer_0(rid, ENOTSUP);
