ktrdump.c (135842) | ktrdump.c (146466) |
---|---|
1/*- 2 * Copyright (c) 2002 Jake Burkholder 3 * Copyright (c) 2004 Robert Watson 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Jake Burkholder 3 * Copyright (c) 2004 Robert Watson 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/usr.bin/ktrdump/ktrdump.c 135842 2004-09-27 05:56:57Z julian $"); | 29__FBSDID("$FreeBSD: head/usr.bin/ktrdump/ktrdump.c 146466 2005-05-21 09:55:10Z ru $"); |
30 31#include <sys/types.h> 32#include <sys/ktr.h> 33#include <sys/mman.h> 34#include <sys/stat.h> 35 36#include <err.h> 37#include <fcntl.h> 38#include <kvm.h> 39#include <limits.h> 40#include <nlist.h> 41#include <stdint.h> 42#include <stdio.h> 43#include <stdlib.h> 44#include <string.h> 45#include <unistd.h> 46 47#define SBUFLEN 128 48#define USAGE \ | 30 31#include <sys/types.h> 32#include <sys/ktr.h> 33#include <sys/mman.h> 34#include <sys/stat.h> 35 36#include <err.h> 37#include <fcntl.h> 38#include <kvm.h> 39#include <limits.h> 40#include <nlist.h> 41#include <stdint.h> 42#include <stdio.h> 43#include <stdlib.h> 44#include <string.h> 45#include <unistd.h> 46 47#define SBUFLEN 128 48#define USAGE \ |
49 "usage: ktrdump [-c] [-f] [-q] [-r] [-t] [-e execfile] [-i ktrfile ] [-m corefile] [-o outfile]" | 49 "usage: ktrdump [-cfqrt] [-e execfile] [-i ktrfile] [-m corefile] [-o outfile]" |
50 51extern char *optarg; 52extern int optind; 53 54static void usage(void); 55 56static struct nlist nl[] = { 57 { "_ktr_version" }, --- 222 unchanged lines hidden (view full) --- 280 } 281 282 return (0); 283} 284 285static void 286usage(void) 287{ | 50 51extern char *optarg; 52extern int optind; 53 54static void usage(void); 55 56static struct nlist nl[] = { 57 { "_ktr_version" }, --- 222 unchanged lines hidden (view full) --- 280 } 281 282 return (0); 283} 284 285static void 286usage(void) 287{ |
288 errx(1, USAGE); | 288 289 fprintf(stderr, USAGE); 290 exit(1); |
289} | 291} |