Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumphijack since ln(1) now uses linkat(2) provide a d...
details: https://anonhg.NetBSD.org/src/rev/7a1f411edf89
branches: trunk
changeset: 824487:7a1f411edf89
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 06 19:48:42 2017 +0000
description:
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 06e63e90ca43 -r 7a1f411edf89 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Tue Jun 06 18:08:23 2017 +0000
+++ b/lib/librumphijack/hijack.c Tue Jun 06 19:48:42 2017 +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.123 2017/06/06 19:48:42 christos 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.123 2017/06/06 19:48:42 christos 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