1/* 2 * Copyright (c) 2007 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23 24#include <stdio.h> 25#include <string.h> 26 27int 28kvm_close(void* kd) 29{ 30 return (0); 31} 32 33char** 34kvm_getargv(void* kd, const void* p, int nchr) 35{ 36 return (0); 37} 38 39char** 40kvm_getenvv(void* kd, const void* p, int nchr) 41{ 42 return (0); 43} 44 45char* 46kvm_geterr(void* kd) 47{ 48 return (0); 49} 50 51int 52kvm_getloadavg(void* kd, double loadagv[], int nelem) 53{ 54 return (-1); 55} 56 57char* 58kvm_getfiles(void* kd, int op, int arg, int* cnt) 59{ 60 if (cnt) *cnt = 0; 61 return (0); 62} 63 64void* 65kvm_getprocs(void* kd, int op, int arg, int* cnt) 66{ 67 if (cnt) *cnt = 0; 68 return (0); 69} 70 71int 72kvm_nlist(void* kd, void* nl) 73{ 74 return (-1); 75} 76 77void* 78kvm_open(const char* execfile, const char* corefile, const char* swapfile, int flags, const char* errstr) 79{ 80 fprintf(stderr, "%s%s/dev/mem: No such file or directory", errstr ? errstr : "", errstr ? ": " : ""); 81 return (0); 82} 83 84void* 85kvm_openfiles(const char* execfile, const char* corefile, const char* swapfile, int flags, char* errout) 86{ 87 if (errout) strcpy(errout, "/dev/mem: No such file or directory"); 88 return (0); 89} 90 91int 92kvm_read(void* kd, unsigned long addr, void* buf, unsigned int nbytes) 93{ 94 return (-1); 95} 96 97int 98kvm_uread(void* kd, void* p, unsigned long uva, void* buf, size_t len) 99{ 100 return (0); 101} 102 103int 104kvm_write(void* kd, unsigned long addr, const void* buf, unsigned int nbytes) 105{ 106 return (0); 107} 108