source: trunk/packages/xen-3.1/xen-3.1/tools/libfsimage/common/fsimage.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 1.7 KB
Line 
1/*
2 * Permission is hereby granted, free of charge, to any person obtaining a copy
3 * of this software and associated documentation files (the "Software"), to
4 * deal in the Software without restriction, including without limitation the
5 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6 * sell copies of the Software, and to permit persons to whom the Software is
7 * furnished to do so, subject to the following conditions:
8 *
9 * The above copyright notice and this permission notice shall be included in
10 * all copies or substantial portions of the Software.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 * DEALINGS IN THE SOFTWARE.
19 *
20 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
21 * Use is subject to license terms.
22 */
23
24#ifndef _FSIMAGE_H
25#define _FSIMAGE_H
26
27#ifdef __cplusplus
28extern C {
29#endif
30
31#include <sys/types.h>
32#include <stdint.h>
33#include <unistd.h>
34
35typedef struct fsi fsi_t;
36typedef struct fsi_file fsi_file_t;
37
38fsi_t *fsi_open_fsimage(const char *, uint64_t, const char *);
39void fsi_close_fsimage(fsi_t *);
40
41int fsi_file_exists(fsi_t *, const char *);
42fsi_file_t *fsi_open_file(fsi_t *, const char *);
43int fsi_close_file(fsi_file_t *);
44
45ssize_t fsi_read_file(fsi_file_t *, void *, size_t);
46ssize_t fsi_pread_file(fsi_file_t *, void *, size_t, uint64_t);
47
48#ifdef __cplusplus
49};
50#endif
51
52#endif /* _FSIMAGE_H */
Note: See TracBrowser for help on using the repository browser.