forked from crash-utility/crash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
va_server.h
67 lines (51 loc) · 2.21 KB
/
va_server.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* va_server.h - kernel crash dump file translation library
*
* Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
* Copyright (C) 2002, 2003, 2004, 2005 David Anderson
* Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 10/99, Dave Winchell, Initial release for kernel crash dump support.
* 11/12/99, Dave Winchell, Add support for in memory dumps.
*/
#include "vas_crash.h"
extern int vas_page_size;
extern u_long vas_base_va;
int va_server_init(char *crash_file, u_long *start, u_long *end, u_long *stride);
int va_server_init_v1(char *crash_file, u_long *start, u_long *end, u_long *stride);
int vas_lseek(u_long position, int whence);
int vas_lseek_v1(u_long position, int whence);
size_t vas_read(void *buf_in, size_t count);
size_t vas_read_v1(void *buf_in, size_t count);
size_t vas_write(void *buf_in, size_t count);
size_t vas_write_v1(void *buf_in, size_t count);
void vas_free_data(u_long va);
void vas_free_data_v1(u_long va);
/* in-memory formats */
struct map_hdr {
struct crash_map_entry *map; /* array of map entries */
int blk_size; /* blocksize for this map */
};
struct map_hdr_v1 {
u_long start_va;
u_long end_va;
struct crash_map_entry_v1 *map; /* array of map entries */
int map_entries; /* entries in array pointed to by map */
u_long va_per_entry; /* va covered by each map_entry */
int blk_offset; /* add this to start_blk in map_entry
* this allows relocation of compressed data
* while using original maps
*/
int blk_size; /* blocksize for this map */
struct map_hdr_v1 *next;
};
extern int clean_exit(int);