summaryrefslogtreecommitdiff
path: root/ext2fs/inode.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-31 18:31:10 +0000
committerMiles Bader <miles@gnu.org>1995-10-31 18:31:10 +0000
commit31d2ef03bb923ed6a18330bc7c0d427833a8f62d (patch)
treec076265e41ad736e97fc1ce144fdcb0f358263de /ext2fs/inode.c
parenta6e1cfaa1d3e3d43b1ebd9958dd057ab51d6f358 (diff)
(diskfs_get_translator, diskfs_set_translator):
Only support these if the filesystem's creator-os is `hurd'. (read_disknode): Only check the i_translator field if the filesystem's creator-os is `hurd'.
Diffstat (limited to 'ext2fs/inode.c')
-rw-r--r--ext2fs/inode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index 39e7639c..638e5b15 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -179,7 +179,7 @@ read_disknode (struct node *np)
if (err)
return err;
- np->istranslated = !! di->i_translator;
+ np->istranslated = sblock->s_creator_os == EXT2_OS_HURD && di->i_translator;
if (!fsidset)
{
@@ -464,6 +464,9 @@ diskfs_set_translator (struct node *np, char *name, unsigned namelen,
assert (!diskfs_readonly);
+ if (sblock->s_creator_os != EXT2_OS_HURD)
+ return EOPNOTSUPP;
+
if (namelen + 2 > block_size)
return ENAMETOOLONG;
@@ -533,6 +536,8 @@ diskfs_get_translator (struct node *np, char **namep, unsigned *namelen)
unsigned datalen;
void *transloc;
+ assert (sblock->s_creator_os == EXT2_OS_HURD);
+
err = diskfs_catch_exception ();
if (err)
return err;
@@ -559,4 +564,3 @@ diskfs_shutdown_soft_ports ()
/* Should initiate termination of internally held pager ports
(the only things that should be soft) XXX */
}
-