~ubuntu-branches/ubuntu/hoary/s390-tools/hoary

« back to all changes in this revision

Viewing changes to zipl/include/job.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2004-06-27 18:45:15 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040627184515-ch5tgtkar5lp3bgz
Tags: 1.3.1-2
* zipl:
  - Add support for optional ipl images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * s390-tools/zipl/include/job.h
 
3
 *   Functions and data structures representing the actual 'job' that the
 
4
 *   user wants us to execute.
 
5
 *
 
6
 * Copyright (C) 2001-2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
 
7
 *
 
8
 * Author(s): Carsten Otte <cotte@de.ibm.com>
 
9
 *            Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
 
10
 */
 
11
 
 
12
#ifndef JOB_H
 
13
#define JOB_H
 
14
 
 
15
#include <stdbool.h>
 
16
 
 
17
#include "zipl.h"
 
18
 
 
19
 
 
20
enum job_id {
 
21
        job_print_usage = 1,
 
22
        job_print_version = 2,
 
23
        job_ipl = 3,
 
24
        job_segment = 4,
 
25
        job_dump_partition = 5,
 
26
        job_dump_fs = 6,
 
27
        job_menu = 7,
 
28
        job_ipl_tape = 8
 
29
};
 
30
 
 
31
struct job_ipl_data {
 
32
        char* image;
 
33
        char* parmline;
 
34
        char* ramdisk;
 
35
        address_t image_addr;
 
36
        address_t parm_addr;
 
37
        address_t ramdisk_addr;
 
38
        bool optional;
 
39
        bool ignore;
 
40
};
 
41
 
 
42
struct job_segment_data {
 
43
        char* segment;
 
44
        address_t segment_addr;
 
45
};
 
46
 
 
47
struct job_dump_data {
 
48
        char* device;
 
49
        uint64_t mem;
 
50
};
 
51
 
 
52
struct job_dump_fs_data {
 
53
        char* partition;
 
54
        char* parmline;
 
55
        address_t parm_addr;
 
56
        uint64_t mem;
 
57
};
 
58
 
 
59
struct job_ipl_tape_data {
 
60
        char* device;
 
61
        char* image;
 
62
        char* parmline;
 
63
        char* ramdisk;
 
64
        address_t image_addr;
 
65
        address_t parm_addr;
 
66
        address_t ramdisk_addr;
 
67
};
 
68
 
 
69
 
 
70
union job_menu_entry_data {
 
71
        struct job_ipl_data ipl;
 
72
        struct job_dump_fs_data dump_fs;
 
73
};
 
74
 
 
75
struct job_menu_entry {
 
76
        int pos;
 
77
        char* name;
 
78
        enum job_id id;
 
79
        union job_menu_entry_data data;
 
80
};
 
81
 
 
82
struct job_menu_data {
 
83
        int num;
 
84
        int default_pos;
 
85
        int prompt;
 
86
        int timeout;
 
87
        struct job_menu_entry* entry;
 
88
};
 
89
 
 
90
struct job_data {
 
91
        enum job_id id;
 
92
        char* bootmap_dir;
 
93
        char* name;
 
94
        union {
 
95
                struct job_ipl_data ipl;
 
96
                struct job_menu_data menu;
 
97
                struct job_segment_data segment;
 
98
                struct job_dump_data dump;
 
99
                struct job_dump_fs_data dump_fs;
 
100
                struct job_ipl_tape_data ipl_tape;
 
101
        } data;
 
102
        int noninteractive;
 
103
        int verbose;
 
104
        int add_files;
 
105
        int command_line;
 
106
};
 
107
 
 
108
 
 
109
int job_get(int argc, char* argv[], struct job_data** data);
 
110
void job_free(struct job_data* job);
 
111
 
 
112
#endif /* not JOB_H */