Revision 5fafdf24 block_int.h

b/block_int.h
1 1
/*
2 2
 * QEMU System Emulator block driver
3
 * 
3
 *
4 4
 * Copyright (c) 2003 Fabrice Bellard
5
 * 
5
 *
6 6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 7
 * of this software and associated documentation files (the "Software"), to deal
8 8
 * in the Software without restriction, including without limitation the rights
......
29 29
    int instance_size;
30 30
    int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename);
31 31
    int (*bdrv_open)(BlockDriverState *bs, const char *filename, int flags);
32
    int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num, 
32
    int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num,
33 33
                     uint8_t *buf, int nb_sectors);
34
    int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num, 
34
    int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num,
35 35
                      const uint8_t *buf, int nb_sectors);
36 36
    void (*bdrv_close)(BlockDriverState *bs);
37
    int (*bdrv_create)(const char *filename, int64_t total_sectors, 
37
    int (*bdrv_create)(const char *filename, int64_t total_sectors,
38 38
                       const char *backing_file, int flags);
39 39
    void (*bdrv_flush)(BlockDriverState *bs);
40 40
    int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num,
......
52 52
    int aiocb_size;
53 53

  
54 54
    const char *protocol_name;
55
    int (*bdrv_pread)(BlockDriverState *bs, int64_t offset, 
55
    int (*bdrv_pread)(BlockDriverState *bs, int64_t offset,
56 56
                      uint8_t *buf, int count);
57
    int (*bdrv_pwrite)(BlockDriverState *bs, int64_t offset, 
57
    int (*bdrv_pwrite)(BlockDriverState *bs, int64_t offset,
58 58
                       const uint8_t *buf, int count);
59 59
    int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset);
60 60
    int64_t (*bdrv_getlength)(BlockDriverState *bs);
61
    int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num, 
61
    int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num,
62 62
                                 const uint8_t *buf, int nb_sectors);
63 63

  
64
    int (*bdrv_snapshot_create)(BlockDriverState *bs, 
64
    int (*bdrv_snapshot_create)(BlockDriverState *bs,
65 65
                                QEMUSnapshotInfo *sn_info);
66
    int (*bdrv_snapshot_goto)(BlockDriverState *bs, 
66
    int (*bdrv_snapshot_goto)(BlockDriverState *bs,
67 67
                              const char *snapshot_id);
68 68
    int (*bdrv_snapshot_delete)(BlockDriverState *bs, const char *snapshot_id);
69
    int (*bdrv_snapshot_list)(BlockDriverState *bs, 
69
    int (*bdrv_snapshot_list)(BlockDriverState *bs,
70 70
                              QEMUSnapshotInfo **psn_info);
71 71
    int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi);
72 72

  
......
75 75
    int (*bdrv_media_changed)(BlockDriverState *bs);
76 76
    int (*bdrv_eject)(BlockDriverState *bs, int eject_flag);
77 77
    int (*bdrv_set_locked)(BlockDriverState *bs, int locked);
78
    
78
   
79 79
    BlockDriverAIOCB *free_aiocb;
80 80
    struct BlockDriver *next;
81 81
};
......
107 107
    /* async read/write emulation */
108 108

  
109 109
    void *sync_aiocb;
110
    
110
   
111 111
    /* NOTE: the following infos are only hints for real hardware
112 112
       drivers. They are not used by the block driver */
113 113
    int cyls, heads, secs, translation;

Also available in: Unified diff