Revision 33e3963e vl.h

b/vl.h
24 24
#ifndef VL_H
25 25
#define VL_H
26 26

  
27
/* vl.c */
28
void *get_mmap_addr(unsigned long size);
29

  
27 30
/* block.c */
28 31
typedef struct BlockDriverState BlockDriverState;
29 32

  
30
BlockDriverState *bdrv_open(const char *filename);
33
BlockDriverState *bdrv_open(const char *filename, int snapshot);
31 34
void bdrv_close(BlockDriverState *bs);
32 35
int bdrv_read(BlockDriverState *bs, int64_t sector_num, 
33 36
              uint8_t *buf, int nb_sectors);
34 37
int bdrv_write(BlockDriverState *bs, int64_t sector_num, 
35 38
               const uint8_t *buf, int nb_sectors);
36 39
void bdrv_get_geometry(BlockDriverState *bs, int64_t *nb_sectors_ptr);
40
int bdrv_commit(BlockDriverState *bs);
41

  
42
/* user mode linux compatible COW file */
43
#define COW_MAGIC 0x4f4f4f4d  /* MOOO */
44
#define COW_VERSION 2
37 45

  
46
struct cow_header_v2 {
47
    uint32_t magic;
48
    uint32_t  long version;
49
    char backing_file[1024];
50
    int32_t mtime;
51
    uint64_t size;
52
    uint32_t sectorsize;
53
};
38 54

  
39 55
#endif /* VL_H */

Also available in: Unified diff