diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-07-14 19:36:39 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-07-14 19:36:39 +0000 |
commit | c58cacaf5126ed6c42c4f5d5d7aa5cfe98e3133c (patch) | |
tree | 3cf730ac0a7861b9f85c90c3d1106997e9390853 /libdiskfs/file-set-trans.c | |
parent | c906f80ab667c97c27b9fdc80e49d2f424455d03 (diff) | |
download | hurd-c58cacaf5126ed6c42c4f5d5d7aa5cfe98e3133c.tar.gz hurd-c58cacaf5126ed6c42c4f5d5d7aa5cfe98e3133c.tar.bz2 hurd-c58cacaf5126ed6c42c4f5d5d7aa5cfe98e3133c.zip |
Formerly file-set-trans.c.~10~
Diffstat (limited to 'libdiskfs/file-set-trans.c')
-rw-r--r-- | libdiskfs/file-set-trans.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c index fa556faf..567ab5fa 100644 --- a/libdiskfs/file-set-trans.c +++ b/libdiskfs/file-set-trans.c @@ -134,9 +134,19 @@ diskfs_S_file_set_translator (struct protid *cred, mutex_unlock (&np->lock); return EINVAL; } - /* Store the argument in the file as the - target of the link */ - diskfs_node_rdwr (np, arg, 0, strlen (arg), 1, cred, 0); + + if (diskfs_create_symlink_hook) + error = (*diskfs_create_symlink_hook)(np, arg); + if (!diskfs_create_symlink_hook || error == EINVAL) + /* Store the argument in the file as the + target of the link */ + error = diskfs_node_rdwr (np, arg, 0, strlen (arg), + 1, cred, 0); + if (error) + { + mutex_unlock (&np->lock); + return error; + } } np->dn_stat.st_mode = (np->dn_stat.st_mode & ~S_IFMT) | newmode; diskfs_node_update (np, 1); |