Revision 313feaab hw/qdev.h

b/hw/qdev.h
4 4
#include "hw.h"
5 5
#include "sysemu.h"
6 6
#include "sys-queue.h"
7
#include "qemu-char.h"
7 8
#include "qemu-option.h"
8 9

  
9 10
typedef struct Property Property;
......
65 66
    PROP_TYPE_TADDR,
66 67
    PROP_TYPE_MACADDR,
67 68
    PROP_TYPE_DRIVE,
69
    PROP_TYPE_CHR,
68 70
    PROP_TYPE_PTR,
69 71
};
70 72

  
......
155 157
extern PropertyInfo qdev_prop_uint64;
156 158
extern PropertyInfo qdev_prop_hex32;
157 159
extern PropertyInfo qdev_prop_hex64;
160
extern PropertyInfo qdev_prop_chr;
158 161
extern PropertyInfo qdev_prop_ptr;
159 162
extern PropertyInfo qdev_prop_macaddr;
160 163
extern PropertyInfo qdev_prop_drive;
......
192 195

  
193 196
#define DEFINE_PROP_PTR(_n, _s, _f)             \
194 197
    DEFINE_PROP(_n, _s, _f, qdev_prop_ptr, void*)
198
#define DEFINE_PROP_CHR(_n, _s, _f)             \
199
    DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharDriverState*)
195 200
#define DEFINE_PROP_MACADDR(_n, _s, _f)         \
196 201
    DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, uint8_t[6])
197 202

  
......
205 210
void qdev_prop_set_uint16(DeviceState *dev, const char *name, uint16_t value);
206 211
void qdev_prop_set_uint32(DeviceState *dev, const char *name, uint32_t value);
207 212
void qdev_prop_set_uint64(DeviceState *dev, const char *name, uint64_t value);
213
void qdev_prop_set_chr(DeviceState *dev, const char *name, CharDriverState *value);
208 214
void qdev_prop_set_drive(DeviceState *dev, const char *name, DriveInfo *value);
209 215
/* FIXME: Remove opaque pointer properties.  */
210 216
void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);

Also available in: Unified diff