Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys add /dev/full
details: https://anonhg.NetBSD.org/src/rev/0182cd325b2f
branches: trunk
changeset: 343000:0182cd325b2f
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 17 23:16:46 2016 +0000
description:
add /dev/full
diffstat:
sys/dev/mm.c | 9 +++++++--
sys/sys/conf.h | 3 ++-
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r 1984a3ac9fe1 -r 0182cd325b2f sys/dev/mm.c
--- a/sys/dev/mm.c Sun Jan 17 22:51:32 2016 +0000
+++ b/sys/dev/mm.c Sun Jan 17 23:16:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mm.c,v 1.19 2014/07/25 08:10:35 dholland Exp $ */
+/* $NetBSD: mm.c,v 1.20 2016/01/17 23:17:04 christos Exp $ */
/*-
* Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.19 2014/07/25 08:10:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.20 2016/01/17 23:17:04 christos Exp $");
#include "opt_compat_netbsd.h"
@@ -337,6 +337,11 @@
}
/* Break directly out of the loop. */
return 0;
+ case DEV_FULL:
+ if (uio->uio_rw == UIO_WRITE) {
+ return ENOSPC;
+ }
+ /*FALLTHROUGH*/
#if defined(COMPAT_16) && defined(__arm)
case _DEV_ZERO_oARM:
#endif
diff -r 1984a3ac9fe1 -r 0182cd325b2f sys/sys/conf.h
--- a/sys/sys/conf.h Sun Jan 17 22:51:32 2016 +0000
+++ b/sys/sys/conf.h Sun Jan 17 23:16:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.h,v 1.145 2014/07/25 07:56:14 dholland Exp $ */
+/* $NetBSD: conf.h,v 1.146 2016/01/17 23:16:46 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -235,6 +235,7 @@
#ifdef COMPAT_16
#define _DEV_ZERO_oARM 3 /* reserved: old ARM /dev/zero minor */
#endif
+#define DEV_FULL 11 /* minor device 11 is '\0'/ENOSPC */
#define DEV_ZERO 12 /* minor device 12 is '\0'/rathole */
enum devnode_class {
Home |
Main Index |
Thread Index |
Old Index