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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
/* libguestfs generated file
* WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
* ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
*
* Copyright (C) 2009 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
typedef string str<>;
struct guestfs_lvm_int_pv {
string pv_name<>;
opaque pv_uuid[32];
string pv_fmt<>;
hyper pv_size;
hyper dev_size;
hyper pv_free;
hyper pv_used;
string pv_attr<>;
hyper pv_pe_count;
hyper pv_pe_alloc_count;
string pv_tags<>;
hyper pe_start;
hyper pv_mda_count;
hyper pv_mda_free;
};
typedef struct guestfs_lvm_int_pv guestfs_lvm_int_pv_list<>;
struct guestfs_lvm_int_vg {
string vg_name<>;
opaque vg_uuid[32];
string vg_fmt<>;
string vg_attr<>;
hyper vg_size;
hyper vg_free;
string vg_sysid<>;
hyper vg_extent_size;
hyper vg_extent_count;
hyper vg_free_count;
hyper max_lv;
hyper max_pv;
hyper pv_count;
hyper lv_count;
hyper snap_count;
hyper vg_seqno;
string vg_tags<>;
hyper vg_mda_count;
hyper vg_mda_free;
};
typedef struct guestfs_lvm_int_vg guestfs_lvm_int_vg_list<>;
struct guestfs_lvm_int_lv {
string lv_name<>;
opaque lv_uuid[32];
string lv_attr<>;
hyper lv_major;
hyper lv_minor;
hyper lv_kernel_major;
hyper lv_kernel_minor;
hyper lv_size;
hyper seg_count;
string origin<>;
float snap_percent;
float copy_percent;
string move_pv<>;
string lv_tags<>;
string mirror_log<>;
string modules<>;
};
typedef struct guestfs_lvm_int_lv guestfs_lvm_int_lv_list<>;
struct guestfs_mount_args {
string device<>;
string mountpoint<>;
};
struct guestfs_touch_args {
string path<>;
};
struct guestfs_cat_args {
string path<>;
};
struct guestfs_cat_ret {
string content<>;
};
struct guestfs_ll_args {
string directory<>;
};
struct guestfs_ll_ret {
string listing<>;
};
struct guestfs_ls_args {
string directory<>;
};
struct guestfs_ls_ret {
str listing<>;
};
struct guestfs_list_devices_ret {
str devices<>;
};
struct guestfs_list_partitions_ret {
str partitions<>;
};
struct guestfs_pvs_ret {
str physvols<>;
};
struct guestfs_vgs_ret {
str volgroups<>;
};
struct guestfs_lvs_ret {
str logvols<>;
};
struct guestfs_pvs_full_ret {
guestfs_lvm_int_pv_list physvols;
};
struct guestfs_vgs_full_ret {
guestfs_lvm_int_vg_list volgroups;
};
struct guestfs_lvs_full_ret {
guestfs_lvm_int_lv_list logvols;
};
struct guestfs_read_lines_args {
string path<>;
};
struct guestfs_read_lines_ret {
str lines<>;
};
struct guestfs_aug_init_args {
string root<>;
int flags;
};
struct guestfs_aug_defvar_args {
string name<>;
str *expr;
};
struct guestfs_aug_defvar_ret {
int nrnodes;
};
struct guestfs_aug_defnode_args {
string name<>;
string expr<>;
string val<>;
};
struct guestfs_aug_defnode_ret {
int nrnodes;
bool created;
};
struct guestfs_aug_get_args {
string path<>;
};
struct guestfs_aug_get_ret {
string val<>;
};
struct guestfs_aug_set_args {
string path<>;
string val<>;
};
struct guestfs_aug_insert_args {
string path<>;
string label<>;
bool before;
};
struct guestfs_aug_rm_args {
string path<>;
};
struct guestfs_aug_rm_ret {
int nrnodes;
};
struct guestfs_aug_mv_args {
string src<>;
string dest<>;
};
struct guestfs_aug_match_args {
string path<>;
};
struct guestfs_aug_match_ret {
str matches<>;
};
struct guestfs_aug_ls_args {
string path<>;
};
struct guestfs_aug_ls_ret {
str matches<>;
};
struct guestfs_rm_args {
string path<>;
};
struct guestfs_rmdir_args {
string path<>;
};
struct guestfs_rm_rf_args {
string path<>;
};
struct guestfs_mkdir_args {
string path<>;
};
struct guestfs_mkdir_p_args {
string path<>;
};
struct guestfs_chmod_args {
int mode;
string path<>;
};
struct guestfs_chown_args {
int owner;
int group;
string path<>;
};
struct guestfs_exists_args {
string path<>;
};
struct guestfs_exists_ret {
bool existsflag;
};
struct guestfs_is_file_args {
string path<>;
};
struct guestfs_is_file_ret {
bool fileflag;
};
struct guestfs_is_dir_args {
string path<>;
};
struct guestfs_is_dir_ret {
bool dirflag;
};
struct guestfs_pvcreate_args {
string device<>;
};
struct guestfs_vgcreate_args {
string volgroup<>;
str physvols<>;
};
struct guestfs_lvcreate_args {
string logvol<>;
string volgroup<>;
int mbytes;
};
struct guestfs_mkfs_args {
string fstype<>;
string device<>;
};
struct guestfs_sfdisk_args {
string device<>;
int cyls;
int heads;
int sectors;
str lines<>;
};
struct guestfs_write_file_args {
string path<>;
string content<>;
int size;
};
struct guestfs_umount_args {
string pathordevice<>;
};
struct guestfs_mounts_ret {
str devices<>;
};
struct guestfs_file_args {
string path<>;
};
struct guestfs_file_ret {
string description<>;
};
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_TOUCH = 3,
GUESTFS_PROC_CAT = 4,
GUESTFS_PROC_LL = 5,
GUESTFS_PROC_LS = 6,
GUESTFS_PROC_LIST_DEVICES = 7,
GUESTFS_PROC_LIST_PARTITIONS = 8,
GUESTFS_PROC_PVS = 9,
GUESTFS_PROC_VGS = 10,
GUESTFS_PROC_LVS = 11,
GUESTFS_PROC_PVS_FULL = 12,
GUESTFS_PROC_VGS_FULL = 13,
GUESTFS_PROC_LVS_FULL = 14,
GUESTFS_PROC_READ_LINES = 15,
GUESTFS_PROC_AUG_INIT = 16,
GUESTFS_PROC_AUG_CLOSE = 26,
GUESTFS_PROC_AUG_DEFVAR = 17,
GUESTFS_PROC_AUG_DEFNODE = 18,
GUESTFS_PROC_AUG_GET = 19,
GUESTFS_PROC_AUG_SET = 20,
GUESTFS_PROC_AUG_INSERT = 21,
GUESTFS_PROC_AUG_RM = 22,
GUESTFS_PROC_AUG_MV = 23,
GUESTFS_PROC_AUG_MATCH = 24,
GUESTFS_PROC_AUG_SAVE = 25,
GUESTFS_PROC_AUG_LOAD = 27,
GUESTFS_PROC_AUG_LS = 28,
GUESTFS_PROC_RM = 29,
GUESTFS_PROC_RMDIR = 30,
GUESTFS_PROC_RM_RF = 31,
GUESTFS_PROC_MKDIR = 32,
GUESTFS_PROC_MKDIR_P = 33,
GUESTFS_PROC_CHMOD = 34,
GUESTFS_PROC_CHOWN = 35,
GUESTFS_PROC_EXISTS = 36,
GUESTFS_PROC_IS_FILE = 37,
GUESTFS_PROC_IS_DIR = 38,
GUESTFS_PROC_PVCREATE = 39,
GUESTFS_PROC_VGCREATE = 40,
GUESTFS_PROC_LVCREATE = 41,
GUESTFS_PROC_MKFS = 42,
GUESTFS_PROC_SFDISK = 43,
GUESTFS_PROC_WRITE_FILE = 44,
GUESTFS_PROC_UMOUNT = 45,
GUESTFS_PROC_MOUNTS = 46,
GUESTFS_PROC_UMOUNT_ALL = 47,
GUESTFS_PROC_LVM_REMOVE_ALL = 48,
GUESTFS_PROC_FILE = 49,
GUESTFS_PROC_dummy
};
const GUESTFS_MESSAGE_MAX = 4194304;
const GUESTFS_PROGRAM = 0x2000F5F5;
const GUESTFS_PROTOCOL_VERSION = 1;
enum guestfs_message_direction {
GUESTFS_DIRECTION_CALL = 0, /* client -> daemon */
GUESTFS_DIRECTION_REPLY = 1 /* daemon -> client */
};
enum guestfs_message_status {
GUESTFS_STATUS_OK = 0,
GUESTFS_STATUS_ERROR = 1
};
const GUESTFS_ERROR_LEN = 256;
struct guestfs_message_error {
string error<GUESTFS_ERROR_LEN>; /* error message */
};
struct guestfs_message_header {
unsigned prog; /* GUESTFS_PROGRAM */
unsigned vers; /* GUESTFS_PROTOCOL_VERSION */
guestfs_procedure proc; /* GUESTFS_PROC_x */
guestfs_message_direction direction;
unsigned serial; /* message serial number */
guestfs_message_status status;
};
|