svn_rev_337
This commit is contained in:
parent
9da2b07349
commit
96b3a92454
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue