File: s390x_dump.c

package info (click to toggle)
crash 3.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 16,220 kB
  • ctags: 5,827
  • sloc: ansic: 62,500; makefile: 1,827
file content (95 lines) | stat: -rwxr-xr-x 1,808 bytes parent folder | download
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* s390x_dump.c - core analysis suite
 *
 * Copyright (C) 2001, 2002 Mission Critical Linux, Inc.
 *
 * 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.
 *
 * CVS: $Revision: 1.4 $ $Date: 2002/01/29 20:52:26 $
 */
#include "defs.h"
#include <asm/page.h>
#include "ibm_common.h"

static gzFile s390x_gzfp;

int 
is_s390x_dump(char *file)  
{
        return FALSE;
}

gzFile
s390x_dump_init(char *file)
{
        if ((s390x_gzfp = gzopen(file, "r+")) == NULL) {
                if ((s390x_gzfp = gzopen(file, "r")) == NULL)
                        return NULL;
        }

        return s390x_gzfp;
}

int
read_s390x_dumpfile(int fd, void *bufptr, int cnt, ulong addr, ulong paddr)
{
        paddr += S390_DUMP_HEADER_SIZE;

        if (gzseek(s390x_gzfp, paddr, SEEK_SET) != paddr)
                return SEEK_ERROR;

        if (gzread(s390x_gzfp, bufptr, cnt) != cnt)
                return READ_ERROR;

        return READ_ERROR;
}

int
write_s390x_dumpfile(int fd, void *bufptr, int cnt, ulong addr, ulong paddr)
{
	return WRITE_ERROR;
}

uint
s390x_page_size(void)
{
        return PAGE_SIZE;
}

int 
s390x_memory_used(void) 
{
	return 0;
}

int 
s390x_free_memory(void) 
{
	return 0;
}

int 
s390x_memory_dump(FILE *fp)
{
	return 0;
}

ulong
get_s390x_panic_task(void)
{
        return BADVAL;
}

void 
get_s390x_panicmsg(char *buf)
{
        return;
}