Revision 72cf2d4f hw/watchdog.c
b/hw/watchdog.c | ||
---|---|---|
22 | 22 |
#include "qemu-common.h" |
23 | 23 |
#include "qemu-option.h" |
24 | 24 |
#include "qemu-config.h" |
25 |
#include "sys-queue.h"
|
|
25 |
#include "qemu-queue.h"
|
|
26 | 26 |
#include "sysemu.h" |
27 | 27 |
#include "hw/watchdog.h" |
28 | 28 |
|
... | ... | |
35 | 35 |
#define WDT_NONE 6 /* Do nothing. */ |
36 | 36 |
|
37 | 37 |
static int watchdog_action = WDT_RESET; |
38 |
static LIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list; |
|
38 |
static QLIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list;
|
|
39 | 39 |
|
40 | 40 |
void watchdog_add_model(WatchdogTimerModel *model) |
41 | 41 |
{ |
42 |
LIST_INSERT_HEAD(&watchdog_list, model, entry); |
|
42 |
QLIST_INSERT_HEAD(&watchdog_list, model, entry);
|
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
/* Returns: |
... | ... | |
54 | 54 |
|
55 | 55 |
/* -watchdog ? lists available devices and exits cleanly. */ |
56 | 56 |
if (strcmp(p, "?") == 0) { |
57 |
LIST_FOREACH(model, &watchdog_list, entry) { |
|
57 |
QLIST_FOREACH(model, &watchdog_list, entry) {
|
|
58 | 58 |
fprintf(stderr, "\t%s\t%s\n", |
59 | 59 |
model->wdt_name, model->wdt_description); |
60 | 60 |
} |
61 | 61 |
return 2; |
62 | 62 |
} |
63 | 63 |
|
64 |
LIST_FOREACH(model, &watchdog_list, entry) { |
|
64 |
QLIST_FOREACH(model, &watchdog_list, entry) {
|
|
65 | 65 |
if (strcasecmp(model->wdt_name, p) == 0) { |
66 | 66 |
/* add the device */ |
67 | 67 |
opts = qemu_opts_create(&qemu_device_opts, NULL, 0); |
... | ... | |
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
fprintf(stderr, "Unknown -watchdog device. Supported devices are:\n"); |
74 |
LIST_FOREACH(model, &watchdog_list, entry) { |
|
74 |
QLIST_FOREACH(model, &watchdog_list, entry) {
|
|
75 | 75 |
fprintf(stderr, "\t%s\t%s\n", |
76 | 76 |
model->wdt_name, model->wdt_description); |
77 | 77 |
} |
Also available in: Unified diff