summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-07-15 16:16:36 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-07-15 16:16:36 +0000
commitda807b786126e1088cfe45bf022caf6c54c09a91 (patch)
treeecefb1aa2ead7e0fdd657abad5126973df0e6f37 /libdiskfs
parent383f290b1a9399443a1f97bf7714172fc55ada78 (diff)
Formerly fsys-getroot.c.~12~
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/fsys-getroot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 687d4192..cce1dda5 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -101,9 +101,12 @@ diskfs_S_fsys_getroot (fsys_t controlport,
char pathbuf[diskfs_root_node->dn_stat.st_size + 1];
int amt;
- error = diskfs_node_rdwr (diskfs_root_node, pathbuf, 0,
- diskfs_root_node->dn_stat.st_size, 0,
- 0, &amt);
+ if (diskfs_read_symlink_hook)
+ error = (*diskfs_read_symlink_hook) (diskfs_root_node, pathbuf);
+ if (!diskfs_read_symlink_hook || error == EINVAL)
+ error = diskfs_node_rdwr (diskfs_root_node, pathbuf, 0,
+ diskfs_root_node->dn_stat.st_size, 0,
+ 0, &amt);
pathbuf[amt] = '\0';
mutex_unlock (&diskfs_root_node->lock);