block_int.h (83d0521a1e35989b0cb7235aef48455fedda3ca4) | block_int.h (c282e1fdf7ec9659c7f320123be397477a359d01) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 102 unchanged lines hidden (view full) --- 111 int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, 112 Error **errp); 113 int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num, 114 uint8_t *buf, int nb_sectors); 115 int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num, 116 const uint8_t *buf, int nb_sectors); 117 void (*bdrv_close)(BlockDriverState *bs); 118 void (*bdrv_rebind)(BlockDriverState *bs); | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 102 unchanged lines hidden (view full) --- 111 int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, 112 Error **errp); 113 int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num, 114 uint8_t *buf, int nb_sectors); 115 int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num, 116 const uint8_t *buf, int nb_sectors); 117 void (*bdrv_close)(BlockDriverState *bs); 118 void (*bdrv_rebind)(BlockDriverState *bs); |
119 int (*bdrv_create)(const char *filename, QEMUOptionParameter *options, 120 Error **errp); 121 /* FIXME: will remove the duplicate and rename back to bdrv_create later */ 122 int (*bdrv_create2)(const char *filename, QemuOpts *opts, Error **errp); | 119 int (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp); |
123 int (*bdrv_set_key)(BlockDriverState *bs, const char *key); 124 int (*bdrv_make_empty)(BlockDriverState *bs); 125 /* aio */ 126 BlockDriverAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, 127 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, 128 BlockDriverCompletionFunc *cb, void *opaque); 129 BlockDriverAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, 130 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, --- 82 unchanged lines hidden (view full) --- 213 214 /* to control generic scsi devices */ 215 int (*bdrv_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf); 216 BlockDriverAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, 217 unsigned long int req, void *buf, 218 BlockDriverCompletionFunc *cb, void *opaque); 219 220 /* List of options for creating images, terminated by name == NULL */ | 120 int (*bdrv_set_key)(BlockDriverState *bs, const char *key); 121 int (*bdrv_make_empty)(BlockDriverState *bs); 122 /* aio */ 123 BlockDriverAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, 124 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, 125 BlockDriverCompletionFunc *cb, void *opaque); 126 BlockDriverAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, 127 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, --- 82 unchanged lines hidden (view full) --- 210 211 /* to control generic scsi devices */ 212 int (*bdrv_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf); 213 BlockDriverAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, 214 unsigned long int req, void *buf, 215 BlockDriverCompletionFunc *cb, void *opaque); 216 217 /* List of options for creating images, terminated by name == NULL */ |
221 QEMUOptionParameter *create_options; 222 /* FIXME: will replace create_options. 223 * These two fields are mutually exclusive. At most one is non-NULL. 224 * create_options should only be set with bdrv_create, and create_opts 225 * should only be set with bdrv_create2. 226 */ | |
227 QemuOptsList *create_opts; 228 229 /* 230 * Returns 0 for completed check, -errno for internal errors. 231 * The check results are stored in result. 232 */ 233 int (*bdrv_check)(BlockDriverState* bs, BdrvCheckResult *result, 234 BdrvCheckMode fix); 235 | 218 QemuOptsList *create_opts; 219 220 /* 221 * Returns 0 for completed check, -errno for internal errors. 222 * The check results are stored in result. 223 */ 224 int (*bdrv_check)(BlockDriverState* bs, BdrvCheckResult *result, 225 BdrvCheckMode fix); 226 |
236 int (*bdrv_amend_options)(BlockDriverState *bs, 237 QEMUOptionParameter *options); 238 /* FIXME: will remove the duplicate and rename back to 239 * bdrv_amend_options later 240 */ 241 int (*bdrv_amend_options2)(BlockDriverState *bs, QemuOpts *opts); | 227 int (*bdrv_amend_options)(BlockDriverState *bs, QemuOpts *opts); |
242 243 void (*bdrv_debug_event)(BlockDriverState *bs, BlkDebugEvent event); 244 245 /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */ 246 int (*bdrv_debug_breakpoint)(BlockDriverState *bs, const char *event, 247 const char *tag); 248 int (*bdrv_debug_remove_breakpoint)(BlockDriverState *bs, 249 const char *tag); --- 300 unchanged lines hidden --- | 228 229 void (*bdrv_debug_event)(BlockDriverState *bs, BlkDebugEvent event); 230 231 /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */ 232 int (*bdrv_debug_breakpoint)(BlockDriverState *bs, const char *event, 233 const char *tag); 234 int (*bdrv_debug_remove_breakpoint)(BlockDriverState *bs, 235 const char *tag); --- 300 unchanged lines hidden --- |