Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/lib/librumphijack Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/4acdab938d80
branches: netbsd-8
changeset: 434694:4acdab938d80
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 28 18:53:06 2018 +0000
description:
Pull up following revision(s) (requested by maya in ticket #594):
lib/librumphijack/hijack.c: revision 1.123
since ln(1) now uses linkat(2) provide a dumb wrapper.
diffstat:
lib/librumphijack/hijack.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r fff097fedaf7 -r 4acdab938d80 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Tue Feb 27 09:08:22 2018 +0000
+++ b/lib/librumphijack/hijack.c Wed Feb 28 18:53:06 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.122 2017/02/16 08:08:01 ozaki-r Exp $ */
+/* $NetBSD: hijack.c,v 1.122.4.1 2018/02/28 18:53:06 martin Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -34,7 +34,7 @@
#include <rump/rumpuser_port.h>
#if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.122 2017/02/16 08:08:01 ozaki-r Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.122.4.1 2018/02/28 18:53:06 martin Exp $");
#endif
#include <sys/param.h>
@@ -163,6 +163,9 @@
#ifdef HAVE___QUOTACTL
DUALCALL_QUOTACTL,
#endif
+#ifdef __NetBSD__
+ DUALCALL_LINKAT,
+#endif
DUALCALL__NUM
};
@@ -379,6 +382,9 @@
{ DUALCALL_QUOTACTL, "__quotactl", RSYS_NAME(__QUOTACTL) },
#endif /* HAVE___QUOTACTL */
+#ifdef __NetBSD__
+ { DUALCALL_LINKAT, "linkat", RSYS_NAME(LINKAT) },
+#endif
};
#undef S
@@ -1271,6 +1277,19 @@
return op(from, to);
}
+#ifdef __NetBSD__
+int
+linkat(int fromfd, const char *from, int tofd, const char *to, int flags)
+{
+ if (fromfd != AT_FDCWD || tofd != AT_FDCWD
+ || flags != AT_SYMLINK_FOLLOW)
+ return ENOSYS;
+
+ return moveish(from, to,
+ GETSYSCALL(rump, LINK), GETSYSCALL(host, LINK));
+}
+#endif
+
int
link(const char *from, const char *to)
{
Home |
Main Index |
Thread Index |
Old Index