PERFORCE change 165639 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Sun Jul 5 16:01:06 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=165639

Change 165639 by trasz at trasz_victim on 2009/07/05 16:00:16

	Make the kernel just a little more bootable.

Affected files ...

.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#25 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_resource.c#13 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/hrl.h#19 edit

Differences ...

==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#25 (text+ko) ====

@@ -86,6 +86,8 @@
 	{ "filedescriptors", HRL_RESOURCE_FILEDESCRIPTORS },
 	{ "sbsize", HRL_RESOURCE_SBSIZE },
 	{ "vmemoryuse", HRL_RESOURCE_VMEMORYUSE },
+	{ "pty", HRL_RESOURCE_PTY },
+	{ "swap", HRL_RESOURCE_SWAP },
 	{ NULL, -1 }};
 
 struct dict actionnames[] = {

==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_resource.c#13 (text+ko) ====

@@ -707,8 +707,13 @@
 		subject = HRL_SUBJECT_USER;
 		id = td->td_ucred->cr_uid;
 		break;
+	case RLIMIT_SWAP:
+		resource = HRL_RESOURCE_SWAP;
+		subject = HRL_SUBJECT_USER;
+		id = td->td_ucred->cr_uid;
+		break;
 	default:
-		panic("hrl_handle_setrlimit: unknown limit");
+		panic("hrl_handle_setrlimit: unknown limit %d", which);
 	}
 
 	if (lim->rlim_cur != RLIM_INFINITY) {

==== //depot/projects/soc2009/trasz_limits/sys/sys/hrl.h#19 (text+ko) ====

@@ -87,7 +87,8 @@
 #define	HRL_RESOURCE_SBSIZE		0x000a
 #define	HRL_RESOURCE_VMEMORYUSE		0x000b
 #define	HRL_RESOURCE_PTY		0x000c
-#define	HRL_RESOURCE_MAX		HRL_RESOURCE_PTY
+#define	HRL_RESOURCE_SWAP		0x000d
+#define	HRL_RESOURCE_MAX		HRL_RESOURCE_SWAP
 
 #define	HRL_ACTION_UNDEFINED		0x0000
 #define	HRL_ACTION_DENY			0x0001


More information about the p4-projects mailing list