diff options
author | marcel <marcel@FreeBSD.org> | 1999-08-12 19:53:33 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-08-12 19:53:33 +0000 |
commit | 3e18cc5fc9b7df6f643049d0e22df34b1c600992 (patch) | |
tree | 1d60ae6850595dd2d53b6b94afb64e68494cc437 /sys/compat | |
parent | 0fdfbcb26fcbbbc9307c76219303fa31833e0d4a (diff) | |
download | FreeBSD-src-3e18cc5fc9b7df6f643049d0e22df34b1c600992.zip FreeBSD-src-3e18cc5fc9b7df6f643049d0e22df34b1c600992.tar.gz |
Use a wrapper for the link syscall that does name translations.
PR: 12749
Submitted by: Boris Nikolaus <boris@cs.tu-berlin.de>
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_file.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 49b054f..ded59f9 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.26 1999/05/11 19:54:19 phk Exp $ + * $Id: linux_file.c,v 1.27 1999/07/18 14:31:01 phk Exp $ */ #include "opt_compat.h" @@ -827,3 +827,22 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args) return truncate(p, &bsd); } +int +linux_link(struct proc *p, struct linux_link_args *args) +{ + struct link_args bsd; + caddr_t sg; + + sg = stackgap_init(); + CHECKALTEXIST(p, &sg, args->path); + CHECKALTCREAT(p, &sg, args->to); + +#ifdef DEBUG + printf("Linux-emul(%d): link(%s, %s)\n", p->p_pid, args->path, args->to); +#endif + + bsd.path = args->path; + bsd.link = args->to; + + return link(p, &bsd); +} |