From: VMware, Inc <> Date: Thu, 17 Jun 2010 21:32:15 +0000 (-0700) Subject: vmmemctl: remove some old FreeBSD code X-Git-Tag: 2010.06.16-268169~108 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=681824ec0f8aee55db0172cd9e367db7bb68d663;p=thirdparty%2Fopen-vm-tools.git vmmemctl: remove some old FreeBSD code We are not shipping modules for FreeBSD 5 so no need to handle anything lower either. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/modules/freebsd/vmmemctl/os.c b/open-vm-tools/modules/freebsd/vmmemctl/os.c index ec75adc4c..bc6158ca1 100644 --- a/open-vm-tools/modules/freebsd/vmmemctl/os.c +++ b/open-vm-tools/modules/freebsd/vmmemctl/os.c @@ -93,7 +93,7 @@ typedef struct { vm_object_t vmobject; /* vm backing object */ } os_state; -MALLOC_DEFINE(M_VMMEMCTL, "vmmemctl", "vmmemctl metadata"); +MALLOC_DEFINE(M_VMMEMCTL, "vmmemctl", "vmmemctl metadata"); /* * Globals @@ -752,11 +752,8 @@ vmmemctl_load(module_t mod, // IN: Unused return err; } -/* All these interfaces got added in 4.x, so we support 5.0 and above with them */ -#if __FreeBSD_version >= 500000 - -static struct sysctl_oid *oid = NULL; +static struct sysctl_oid *oid; /* *----------------------------------------------------------------------------- @@ -836,34 +833,5 @@ vmmemctl_deinit_sysctl(void) } } -#else - -static void -vmmemctl_init_sysctl(void) -{ - printf("Not providing sysctl for FreeBSD below 5.0\n"); -} - -static void -vmmemctl_deinit_sysctl(void) -{ - printf("Not uninstalling sysctl for FreeBSD below 5.0\n"); -} - -#endif - -/* - * FreeBSD 3.2 does not have DEV_MODULE - */ -#ifndef DEV_MODULE -#define DEV_MODULE(name, evh, arg) \ -static moduledata_t name##_mod = { \ - #name, \ - evh, \ - arg \ -}; \ -DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) -#endif - DEV_MODULE(vmmemctl, vmmemctl_load, NULL);