[Glibc-bsd-commits] r4988 - in trunk/freebsd-glue: debian include include/sys src
Robert Millan
rmh at alioth.debian.org
Wed Oct 2 23:10:13 UTC 2013
Author: rmh
Date: 2013-10-02 23:10:13 +0000 (Wed, 02 Oct 2013)
New Revision: 4988
Added:
trunk/freebsd-glue/include/fstab.h
trunk/freebsd-glue/include/sys/socket.h
trunk/freebsd-glue/src/fstab.c
trunk/freebsd-glue/src/socket.c
Modified:
trunk/freebsd-glue/debian/changelog
trunk/freebsd-glue/src/Makefile
Log:
Implement setfib, setfstab (as ENOSYS stub) and getfstab (with hardcoded return value).
Modified: trunk/freebsd-glue/debian/changelog
===================================================================
--- trunk/freebsd-glue/debian/changelog 2013-10-02 23:04:27 UTC (rev 4987)
+++ trunk/freebsd-glue/debian/changelog 2013-10-02 23:10:13 UTC (rev 4988)
@@ -1,6 +1,8 @@
freebsd-glue (0.1.6) UNRELEASED; urgency=low
* Define __FreeBSD_version as __FreeBSD_kernel_version when available.
+ * Implement setfib, setfstab (as ENOSYS stub) and getfstab (with
+ hardcoded return value).
-- Robert Millan <rmh at debian.org> Wed, 02 Oct 2013 23:41:17 +0200
Added: trunk/freebsd-glue/include/fstab.h
===================================================================
--- trunk/freebsd-glue/include/fstab.h (rev 0)
+++ trunk/freebsd-glue/include/fstab.h 2013-10-02 23:10:13 UTC (rev 4988)
@@ -0,0 +1,14 @@
+#include_next <fstab.h>
+
+#ifndef _FSTAB_H_
+#define _FSTAB_H_
+
+#include <sys/cdefs.h>
+#define _PATH_FSTAB "/etc/fstab"
+
+__BEGIN_DECLS
+void setfstab(const char *);
+const char *getfstab (void);
+__END_DECLS
+
+#endif /* !_FSTAB_H_ */
Added: trunk/freebsd-glue/include/sys/socket.h
===================================================================
--- trunk/freebsd-glue/include/sys/socket.h (rev 0)
+++ trunk/freebsd-glue/include/sys/socket.h 2013-10-02 23:10:13 UTC (rev 4988)
@@ -0,0 +1,12 @@
+#include_next <sys/socket.h>
+
+#ifndef _FREEBSD_SYS_SOCKET_H_
+#define _FREEBSD_SYS_SOCKET_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int setfib(int fib);
+__END_DECLS
+
+#endif
Modified: trunk/freebsd-glue/src/Makefile
===================================================================
--- trunk/freebsd-glue/src/Makefile 2013-10-02 23:04:27 UTC (rev 4987)
+++ trunk/freebsd-glue/src/Makefile 2013-10-02 23:10:13 UTC (rev 4988)
@@ -2,6 +2,7 @@
SRCS= \
exec.c \
feature_present.c \
+ fstab.c \
getosreldate.c \
random.c \
trimdomain.c \
@@ -13,6 +14,7 @@
SRCS+= \
disklabel.c \
linkaddr.c \
+ socket.c \
${NULL}
.endif
Added: trunk/freebsd-glue/src/fstab.c
===================================================================
--- trunk/freebsd-glue/src/fstab.c (rev 0)
+++ trunk/freebsd-glue/src/fstab.c 2013-10-02 23:10:13 UTC (rev 4988)
@@ -0,0 +1,15 @@
+#include <fstab.h>
+#include <err.h>
+#include <errno.h>
+#include <string.h> /* strerror */
+
+void
+setfstab (const char *file)
+{
+ warn ("setfstab: %s", strerror (ENOSYS));
+}
+
+const char *getfstab (void)
+{
+ return _PATH_FSTAB;
+}
Added: trunk/freebsd-glue/src/socket.c
===================================================================
--- trunk/freebsd-glue/src/socket.c (rev 0)
+++ trunk/freebsd-glue/src/socket.c 2013-10-02 23:10:13 UTC (rev 4988)
@@ -0,0 +1,9 @@
+#include <sys/socket.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+
+int
+setfib (int fib)
+{
+ return syscall (SYS_setfib, fib);
+}
More information about the Glibc-bsd-commits
mailing list