kern_environment.c (137394) | kern_environment.c (141616) |
---|---|
1/*- 2 * Copyright (c) 1998 Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * dynamic array of strings later when the VM subsystem is up. 31 * 32 * We make these available through the kenv(2) syscall for userland 33 * and through getenv()/freeenv() setenv() unsetenv() testenv() for 34 * the kernel. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * dynamic array of strings later when the VM subsystem is up. 31 * 32 * We make these available through the kenv(2) syscall for userland 33 * and through getenv()/freeenv() setenv() unsetenv() testenv() for 34 * the kernel. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_environment.c 137394 2004-11-08 18:22:22Z des $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_environment.c 141616 2005-02-10 12:02:37Z phk $"); |
39 40#include "opt_mac.h" 41 42#include <sys/types.h> 43#include <sys/param.h> 44#include <sys/proc.h> 45#include <sys/queue.h> 46#include <sys/lock.h> 47#include <sys/mac.h> 48#include <sys/malloc.h> 49#include <sys/mutex.h> 50#include <sys/kernel.h> 51#include <sys/sx.h> 52#include <sys/systm.h> 53#include <sys/sysent.h> 54#include <sys/sysproto.h> 55#include <sys/libkern.h> 56#include <sys/kenv.h> 57 | 39 40#include "opt_mac.h" 41 42#include <sys/types.h> 43#include <sys/param.h> 44#include <sys/proc.h> 45#include <sys/queue.h> 46#include <sys/lock.h> 47#include <sys/mac.h> 48#include <sys/malloc.h> 49#include <sys/mutex.h> 50#include <sys/kernel.h> 51#include <sys/sx.h> 52#include <sys/systm.h> 53#include <sys/sysent.h> 54#include <sys/sysproto.h> 55#include <sys/libkern.h> 56#include <sys/kenv.h> 57 |
58MALLOC_DEFINE(M_KENV, "kenv", "kernel environment"); | 58static MALLOC_DEFINE(M_KENV, "kenv", "kernel environment"); |
59 60#define KENV_SIZE 512 /* Maximum number of environment strings */ 61 62/* pointer to the static environment */ 63char *kern_envp; 64static char *kernenv_next(char *); 65 66/* dynamic environment variables */ --- 452 unchanged lines hidden --- | 59 60#define KENV_SIZE 512 /* Maximum number of environment strings */ 61 62/* pointer to the static environment */ 63char *kern_envp; 64static char *kernenv_next(char *); 65 66/* dynamic environment variables */ --- 452 unchanged lines hidden --- |