char.c (831aaf24967a49d7750090b9dcfd6bf356f16529) char.c (8f9abdf586d48552273abe38cf55058f7d0c85fd)
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 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

--- 179 unchanged lines hidden (view full) ---

188
189 if (!be || !be->chr_can_read) {
190 return 0;
191 }
192
193 return be->chr_can_read(be->opaque);
194}
195
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 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

--- 179 unchanged lines hidden (view full) ---

188
189 if (!be || !be->chr_can_read) {
190 return 0;
191 }
192
193 return be->chr_can_read(be->opaque);
194}
195
196void qemu_chr_be_write_impl(Chardev *s, uint8_t *buf, int len)
196void qemu_chr_be_write_impl(Chardev *s, const uint8_t *buf, int len)
197{
198 CharBackend *be = s->be;
199
200 if (be && be->chr_read) {
201 be->chr_read(be->opaque, buf, len);
202 }
203}
204
197{
198 CharBackend *be = s->be;
199
200 if (be && be->chr_read) {
201 be->chr_read(be->opaque, buf, len);
202 }
203}
204
205void qemu_chr_be_write(Chardev *s, uint8_t *buf, int len)
205void qemu_chr_be_write(Chardev *s, const uint8_t *buf, int len)
206{
207 if (qemu_chr_replay(s)) {
208 if (replay_mode == REPLAY_MODE_PLAY) {
209 return;
210 }
211 replay_chr_be_write(s, buf, len);
212 } else {
213 qemu_chr_be_write_impl(s, buf, len);

--- 1017 unchanged lines hidden ---
206{
207 if (qemu_chr_replay(s)) {
208 if (replay_mode == REPLAY_MODE_PLAY) {
209 return;
210 }
211 replay_chr_be_write(s, buf, len);
212 } else {
213 qemu_chr_be_write_impl(s, buf, len);

--- 1017 unchanged lines hidden ---