Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump Allow device components to create symlinks ...
details: https://anonhg.NetBSD.org/src/rev/cc24ca222f51
branches: trunk
changeset: 338786:cc24ca222f51
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Jun 08 12:16:47 2015 +0000
description:
Allow device components to create symlinks in /dev
e.g. /dev/audio -> audio0
from Robert Millan <rmh%freebsd.org@localhost> via rumpkernel-users
diffstat:
sys/rump/librump/rumpkern/rump.c | 5 +++--
sys/rump/librump/rumpvfs/devnodes.c | 12 ++++++++++--
sys/rump/librump/rumpvfs/rump_vfs_private.h | 3 ++-
3 files changed, 15 insertions(+), 5 deletions(-)
diffs (83 lines):
diff -r 7cb6d7043021 -r cc24ca222f51 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Mon Jun 08 08:21:49 2015 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Mon Jun 08 12:16:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.320 2015/05/20 11:02:54 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.321 2015/06/08 12:16:47 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.320 2015/05/20 11:02:54 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.321 2015/06/08 12:16:47 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -125,6 +125,7 @@
devmajor_t, devminor_t) = (void *)nullop;
int (*rump_vfs_makedevnodes)(dev_t, const char *, char,
devmajor_t, devminor_t, int) = (void *)nullop;
+int (*rump_vfs_makesymlink)(const char *, const char *) = (void *)nullop;
rump_proc_vfs_init_fn rump_proc_vfs_init = (void *)nullop;
rump_proc_vfs_release_fn rump_proc_vfs_release = (void *)nullop;
diff -r 7cb6d7043021 -r cc24ca222f51 sys/rump/librump/rumpvfs/devnodes.c
--- a/sys/rump/librump/rumpvfs/devnodes.c Mon Jun 08 08:21:49 2015 +0000
+++ b/sys/rump/librump/rumpvfs/devnodes.c Mon Jun 08 12:16:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: devnodes.c,v 1.10 2014/06/20 11:27:25 pooka Exp $ */
+/* $NetBSD: devnodes.c,v 1.11 2015/06/08 12:16:47 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.10 2014/06/20 11:27:25 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.11 2015/06/08 12:16:47 pooka Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -87,6 +87,13 @@
return error;
}
+static int
+makesymlink(const char *dst, const char *src)
+{
+
+ return do_sys_symlink(dst, src, UIO_SYSSPACE);
+}
+
enum { NOTEXIST, SAME, DIFFERENT };
static int
doesitexist(const char *path, bool isblk, devmajor_t dmaj, devminor_t dmin)
@@ -177,6 +184,7 @@
rump_vfs_makeonedevnode = makeonedevnode;
rump_vfs_makedevnodes = makedevnodes;
+ rump_vfs_makesymlink = makesymlink;
for (i = 0; i < dcvecsize; i++) {
dc = &dcvec[i];
diff -r 7cb6d7043021 -r cc24ca222f51 sys/rump/librump/rumpvfs/rump_vfs_private.h
--- a/sys/rump/librump/rumpvfs/rump_vfs_private.h Mon Jun 08 08:21:49 2015 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs_private.h Mon Jun 08 12:16:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs_private.h,v 1.18 2014/11/17 14:30:31 pooka Exp $ */
+/* $NetBSD: rump_vfs_private.h,v 1.19 2015/06/08 12:16:47 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -50,6 +50,7 @@
devmajor_t, devminor_t);
extern int (*rump_vfs_makedevnodes)(dev_t, const char *, char,
devmajor_t, devminor_t, int);
+extern int (*rump_vfs_makesymlink)(const char *, const char *);
extern void (*rump_vfs_drainbufs)(int);
extern void (*rump_vfs_fini)(void);
Home |
Main Index |
Thread Index |
Old Index