summaryrefslogtreecommitdiff
path: root/devio
diff options
context:
space:
mode:
Diffstat (limited to 'devio')
-rw-r--r--devio/devio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/devio/devio.c b/devio/devio.c
index 11b41f70..d0f2b9fb 100644
--- a/devio/devio.c
+++ b/devio/devio.c
@@ -233,11 +233,12 @@ int trivfs_allow_open = O_READ | O_WRITE;
void
trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st)
{
- struct dev *dev = cred->po->hook;
+ struct open *open = cred->po->hook;
- if (dev)
+ if (open)
/* An open device. */
{
+ struct dev *dev = open->dev;
vm_size_t size = dev->size;
if (dev->block_size > 1)