9
0
Fork 0

svn_rev_337

This commit is contained in:
Sascha Hauer 2007-07-05 18:01:44 +02:00 committed by Sascha Hauer
parent 9da2b07349
commit 96b3a92454
1 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,7 @@ struct dirent* devfs_readdir(struct device_d *_dev, struct dir *dir)
{
struct device_d *dev = dir->priv;
while (dev && !strlen(dev->id))
while (dev && (!strlen(dev->id) || !dev->driver))
dev = dev->next;
if (dev) {
@ -79,6 +79,9 @@ int devfs_stat(struct device_d *_dev, const char *filename, struct stat *s)
if (!dev)
return -ENOENT;
if (!dev->driver)
return -ENXIO;
s->st_mode = S_IFCHR;
s->st_size = dev->size;
if (dev->driver->write)