mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-02-06' into staging
Error reporting patches for 2018-02-06 # gpg: Signature made Tue 06 Feb 2018 19:48:30 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2018-02-06: tcg: Replace fprintf(stderr, "*\n" with error_report() hw/xen*: Replace fprintf(stderr, "*\n" with error_report() hw/sparc*: Replace fprintf(stderr, "*\n" with error_report() hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF() hw/ppc: Replace fprintf(stderr, "*\n" with error_report() hw/pci*: Replace fprintf(stderr, "*\n" with error_report() hw/openrisc: Replace fprintf(stderr, "*\n" with error_report() hw/moxie: Replace fprintf(stderr, "*\n" with error_report() hw/mips: Replace fprintf(stderr, "*\n" with error_report() hw/lm32: Replace fprintf(stderr, "*\n" with error_report() hw/dma: Replace fprintf(stderr, "*\n" with error_report() hw/arm: Replace fprintf(stderr, "*\n" with error_report() audio: Replace AUDIO_FUNC with __func__ error: Improve documentation of error_append_hint() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+2
-2
@@ -823,7 +823,7 @@ static int alsa_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
audio_pcm_init_info (&hw->info, &obt_as);
|
||||
hw->samples = obt.samples;
|
||||
|
||||
alsa->pcm_buf = audio_calloc (AUDIO_FUNC, obt.samples, 1 << hw->info.shift);
|
||||
alsa->pcm_buf = audio_calloc(__func__, obt.samples, 1 << hw->info.shift);
|
||||
if (!alsa->pcm_buf) {
|
||||
dolog ("Could not allocate DAC buffer (%d samples, each %d bytes)\n",
|
||||
hw->samples, 1 << hw->info.shift);
|
||||
@@ -934,7 +934,7 @@ static int alsa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
|
||||
audio_pcm_init_info (&hw->info, &obt_as);
|
||||
hw->samples = obt.samples;
|
||||
|
||||
alsa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
alsa->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
if (!alsa->pcm_buf) {
|
||||
dolog ("Could not allocate ADC buffer (%d samples, each %d bytes)\n",
|
||||
hw->samples, 1 << hw->info.shift);
|
||||
|
||||
+20
-20
@@ -424,12 +424,12 @@ static void audio_process_options (const char *prefix,
|
||||
const char qemu_prefix[] = "QEMU_";
|
||||
size_t preflen, optlen;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !prefix)) {
|
||||
if (audio_bug(__func__, !prefix)) {
|
||||
dolog ("prefix = NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !opt)) {
|
||||
if (audio_bug(__func__, !opt)) {
|
||||
dolog ("opt = NULL\n");
|
||||
return;
|
||||
}
|
||||
@@ -792,7 +792,7 @@ static int audio_attach_capture (HWVoiceOut *hw)
|
||||
SWVoiceOut *sw;
|
||||
HWVoiceOut *hw_cap = &cap->hw;
|
||||
|
||||
sc = audio_calloc (AUDIO_FUNC, 1, sizeof (*sc));
|
||||
sc = audio_calloc(__func__, 1, sizeof(*sc));
|
||||
if (!sc) {
|
||||
dolog ("Could not allocate soft capture voice (%zu bytes)\n",
|
||||
sizeof (*sc));
|
||||
@@ -848,7 +848,7 @@ static int audio_pcm_hw_find_min_in (HWVoiceIn *hw)
|
||||
int audio_pcm_hw_get_live_in (HWVoiceIn *hw)
|
||||
{
|
||||
int live = hw->total_samples_captured - audio_pcm_hw_find_min_in (hw);
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > hw->samples)) {
|
||||
dolog ("live=%d hw->samples=%d\n", live, hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -886,7 +886,7 @@ static int audio_pcm_sw_get_rpos_in (SWVoiceIn *sw)
|
||||
int live = hw->total_samples_captured - sw->total_hw_samples_acquired;
|
||||
int rpos;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > hw->samples)) {
|
||||
dolog ("live=%d hw->samples=%d\n", live, hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -909,7 +909,7 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size)
|
||||
rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples;
|
||||
|
||||
live = hw->total_samples_captured - sw->total_hw_samples_acquired;
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > hw->samples)) {
|
||||
dolog ("live_in=%d hw->samples=%d\n", live, hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -935,7 +935,7 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size)
|
||||
}
|
||||
osamp = swlim;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, osamp < 0)) {
|
||||
if (audio_bug(__func__, osamp < 0)) {
|
||||
dolog ("osamp=%d\n", osamp);
|
||||
return 0;
|
||||
}
|
||||
@@ -990,7 +990,7 @@ static int audio_pcm_hw_get_live_out (HWVoiceOut *hw, int *nb_live)
|
||||
if (nb_live1) {
|
||||
int live = smin;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > hw->samples)) {
|
||||
dolog ("live=%d hw->samples=%d\n", live, hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -1014,7 +1014,7 @@ int audio_pcm_sw_write (SWVoiceOut *sw, void *buf, int size)
|
||||
hwsamples = sw->hw->samples;
|
||||
|
||||
live = sw->total_hw_samples_mixed;
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hwsamples)){
|
||||
if (audio_bug(__func__, live < 0 || live > hwsamples)) {
|
||||
dolog ("live=%d hw->samples=%d\n", live, hwsamples);
|
||||
return 0;
|
||||
}
|
||||
@@ -1263,7 +1263,7 @@ static int audio_get_avail (SWVoiceIn *sw)
|
||||
}
|
||||
|
||||
live = sw->hw->total_samples_captured - sw->total_hw_samples_acquired;
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > sw->hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > sw->hw->samples)) {
|
||||
dolog ("live=%d sw->hw->samples=%d\n", live, sw->hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -1287,7 +1287,7 @@ static int audio_get_free (SWVoiceOut *sw)
|
||||
|
||||
live = sw->total_hw_samples_mixed;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > sw->hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > sw->hw->samples)) {
|
||||
dolog ("live=%d sw->hw->samples=%d\n", live, sw->hw->samples);
|
||||
return 0;
|
||||
}
|
||||
@@ -1354,7 +1354,7 @@ static void audio_run_out (AudioState *s)
|
||||
live = 0;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, live < 0 || live > hw->samples)) {
|
||||
if (audio_bug(__func__, live < 0 || live > hw->samples)) {
|
||||
dolog ("live=%d hw->samples=%d\n", live, hw->samples);
|
||||
continue;
|
||||
}
|
||||
@@ -1389,7 +1389,7 @@ static void audio_run_out (AudioState *s)
|
||||
prev_rpos = hw->rpos;
|
||||
played = hw->pcm_ops->run_out (hw, live);
|
||||
replay_audio_out(&played);
|
||||
if (audio_bug (AUDIO_FUNC, hw->rpos >= hw->samples)) {
|
||||
if (audio_bug(__func__, hw->rpos >= hw->samples)) {
|
||||
dolog ("hw->rpos=%d hw->samples=%d played=%d\n",
|
||||
hw->rpos, hw->samples, played);
|
||||
hw->rpos = 0;
|
||||
@@ -1410,7 +1410,7 @@ static void audio_run_out (AudioState *s)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, played > sw->total_hw_samples_mixed)) {
|
||||
if (audio_bug(__func__, played > sw->total_hw_samples_mixed)) {
|
||||
dolog ("played=%d sw->total_hw_samples_mixed=%d\n",
|
||||
played, sw->total_hw_samples_mixed);
|
||||
played = sw->total_hw_samples_mixed;
|
||||
@@ -1513,7 +1513,7 @@ static void audio_run_capture (AudioState *s)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, captured > sw->total_hw_samples_mixed)) {
|
||||
if (audio_bug(__func__, captured > sw->total_hw_samples_mixed)) {
|
||||
dolog ("captured=%d sw->total_hw_samples_mixed=%d\n",
|
||||
captured, sw->total_hw_samples_mixed);
|
||||
captured = sw->total_hw_samples_mixed;
|
||||
@@ -1924,7 +1924,7 @@ CaptureVoiceOut *AUD_add_capture (
|
||||
goto err0;
|
||||
}
|
||||
|
||||
cb = audio_calloc (AUDIO_FUNC, 1, sizeof (*cb));
|
||||
cb = audio_calloc(__func__, 1, sizeof(*cb));
|
||||
if (!cb) {
|
||||
dolog ("Could not allocate capture callback information, size %zu\n",
|
||||
sizeof (*cb));
|
||||
@@ -1942,7 +1942,7 @@ CaptureVoiceOut *AUD_add_capture (
|
||||
HWVoiceOut *hw;
|
||||
CaptureVoiceOut *cap;
|
||||
|
||||
cap = audio_calloc (AUDIO_FUNC, 1, sizeof (*cap));
|
||||
cap = audio_calloc(__func__, 1, sizeof(*cap));
|
||||
if (!cap) {
|
||||
dolog ("Could not allocate capture voice, size %zu\n",
|
||||
sizeof (*cap));
|
||||
@@ -1955,8 +1955,8 @@ CaptureVoiceOut *AUD_add_capture (
|
||||
|
||||
/* XXX find a more elegant way */
|
||||
hw->samples = 4096 * 4;
|
||||
hw->mix_buf = audio_calloc (AUDIO_FUNC, hw->samples,
|
||||
sizeof (struct st_sample));
|
||||
hw->mix_buf = audio_calloc(__func__, hw->samples,
|
||||
sizeof(struct st_sample));
|
||||
if (!hw->mix_buf) {
|
||||
dolog ("Could not allocate capture mix buffer (%d samples)\n",
|
||||
hw->samples);
|
||||
@@ -1965,7 +1965,7 @@ CaptureVoiceOut *AUD_add_capture (
|
||||
|
||||
audio_pcm_init_info (&hw->info, as);
|
||||
|
||||
cap->buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
cap->buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
if (!cap->buf) {
|
||||
dolog ("Could not allocate capture buffer "
|
||||
"(%d samples, each %d bytes)\n",
|
||||
|
||||
@@ -252,10 +252,4 @@ static inline int audio_ring_dist (int dst, int src, int len)
|
||||
#define AUDIO_STRINGIFY_(n) #n
|
||||
#define AUDIO_STRINGIFY(n) AUDIO_STRINGIFY_(n)
|
||||
|
||||
#if defined _MSC_VER || defined __GNUC__
|
||||
#define AUDIO_FUNC __FUNCTION__
|
||||
#else
|
||||
#define AUDIO_FUNC __FILE__ ":" AUDIO_STRINGIFY (__LINE__)
|
||||
#endif
|
||||
|
||||
#endif /* QEMU_AUDIO_INT_H */
|
||||
|
||||
+14
-14
@@ -31,7 +31,7 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *),
|
||||
|
||||
err = sigfillset (&set);
|
||||
if (err) {
|
||||
logerr (p, errno, "%s(%s): sigfillset failed", cap, AUDIO_FUNC);
|
||||
logerr(p, errno, "%s(%s): sigfillset failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *),
|
||||
|
||||
err2 = pthread_sigmask (SIG_SETMASK, &old_set, NULL);
|
||||
if (err2) {
|
||||
logerr (p, err2, "%s(%s): pthread_sigmask (restore) failed",
|
||||
cap, AUDIO_FUNC);
|
||||
logerr(p, err2, "%s(%s): pthread_sigmask (restore) failed",
|
||||
cap, __func__);
|
||||
/* We have failed to restore original signal mask, all bets are off,
|
||||
so terminate the process */
|
||||
exit (EXIT_FAILURE);
|
||||
@@ -74,17 +74,17 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *),
|
||||
err2:
|
||||
err2 = pthread_cond_destroy (&p->cond);
|
||||
if (err2) {
|
||||
logerr (p, err2, "%s(%s): pthread_cond_destroy failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err2, "%s(%s): pthread_cond_destroy failed", cap, __func__);
|
||||
}
|
||||
|
||||
err1:
|
||||
err2 = pthread_mutex_destroy (&p->mutex);
|
||||
if (err2) {
|
||||
logerr (p, err2, "%s(%s): pthread_mutex_destroy failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err2, "%s(%s): pthread_mutex_destroy failed", cap, __func__);
|
||||
}
|
||||
|
||||
err0:
|
||||
logerr (p, err, "%s(%s): %s failed", cap, AUDIO_FUNC, efunc);
|
||||
logerr(p, err, "%s(%s): %s failed", cap, __func__, efunc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -94,13 +94,13 @@ int audio_pt_fini (struct audio_pt *p, const char *cap)
|
||||
|
||||
err = pthread_cond_destroy (&p->cond);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_cond_destroy failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_cond_destroy failed", cap, __func__);
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
err = pthread_mutex_destroy (&p->mutex);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_mutex_destroy failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_mutex_destroy failed", cap, __func__);
|
||||
ret = -1;
|
||||
}
|
||||
return ret;
|
||||
@@ -112,7 +112,7 @@ int audio_pt_lock (struct audio_pt *p, const char *cap)
|
||||
|
||||
err = pthread_mutex_lock (&p->mutex);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_mutex_lock failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_mutex_lock failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -124,7 +124,7 @@ int audio_pt_unlock (struct audio_pt *p, const char *cap)
|
||||
|
||||
err = pthread_mutex_unlock (&p->mutex);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_mutex_unlock failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_mutex_unlock failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -136,7 +136,7 @@ int audio_pt_wait (struct audio_pt *p, const char *cap)
|
||||
|
||||
err = pthread_cond_wait (&p->cond, &p->mutex);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_cond_wait failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_cond_wait failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -148,12 +148,12 @@ int audio_pt_unlock_and_signal (struct audio_pt *p, const char *cap)
|
||||
|
||||
err = pthread_mutex_unlock (&p->mutex);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_mutex_unlock failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_mutex_unlock failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
err = pthread_cond_signal (&p->cond);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_cond_signal failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_cond_signal failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -166,7 +166,7 @@ int audio_pt_join (struct audio_pt *p, void **arg, const char *cap)
|
||||
|
||||
err = pthread_join (p->thread, &ret);
|
||||
if (err) {
|
||||
logerr (p, err, "%s(%s): pthread_join failed", cap, AUDIO_FUNC);
|
||||
logerr(p, err, "%s(%s): pthread_join failed", cap, __func__);
|
||||
return -1;
|
||||
}
|
||||
*arg = ret;
|
||||
|
||||
+13
-13
@@ -57,13 +57,13 @@ static void glue (audio_init_nb_voices_, TYPE) (struct audio_driver *drv)
|
||||
glue (s->nb_hw_voices_, TYPE) = max_voices;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !voice_size && max_voices)) {
|
||||
if (audio_bug(__func__, !voice_size && max_voices)) {
|
||||
dolog ("drv=`%s' voice_size=0 max_voices=%d\n",
|
||||
drv->name, max_voices);
|
||||
glue (s->nb_hw_voices_, TYPE) = 0;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, voice_size && !max_voices)) {
|
||||
if (audio_bug(__func__, voice_size && !max_voices)) {
|
||||
dolog ("drv=`%s' voice_size=%d max_voices=0\n",
|
||||
drv->name, voice_size);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw)
|
||||
|
||||
static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw)
|
||||
{
|
||||
HWBUF = audio_calloc (AUDIO_FUNC, hw->samples, sizeof (struct st_sample));
|
||||
HWBUF = audio_calloc(__func__, hw->samples, sizeof(struct st_sample));
|
||||
if (!HWBUF) {
|
||||
dolog ("Could not allocate " NAME " buffer (%d samples)\n",
|
||||
hw->samples);
|
||||
@@ -105,7 +105,7 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw)
|
||||
|
||||
samples = ((int64_t) sw->hw->samples << 32) / sw->ratio;
|
||||
|
||||
sw->buf = audio_calloc (AUDIO_FUNC, samples, sizeof (struct st_sample));
|
||||
sw->buf = audio_calloc(__func__, samples, sizeof(struct st_sample));
|
||||
if (!sw->buf) {
|
||||
dolog ("Could not allocate buffer for `%s' (%d samples)\n",
|
||||
SW_NAME (sw), samples);
|
||||
@@ -238,17 +238,17 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !drv)) {
|
||||
if (audio_bug(__func__, !drv)) {
|
||||
dolog ("No host audio driver\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !drv->pcm_ops)) {
|
||||
if (audio_bug(__func__, !drv->pcm_ops)) {
|
||||
dolog ("Host audio driver without pcm_ops\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hw = audio_calloc (AUDIO_FUNC, 1, glue (drv->voice_size_, TYPE));
|
||||
hw = audio_calloc(__func__, 1, glue(drv->voice_size_, TYPE));
|
||||
if (!hw) {
|
||||
dolog ("Can not allocate voice `%s' size %d\n",
|
||||
drv->name, glue (drv->voice_size_, TYPE));
|
||||
@@ -266,7 +266,7 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as)
|
||||
goto err0;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, hw->samples <= 0)) {
|
||||
if (audio_bug(__func__, hw->samples <= 0)) {
|
||||
dolog ("hw->samples=%d\n", hw->samples);
|
||||
goto err1;
|
||||
}
|
||||
@@ -339,7 +339,7 @@ static SW *glue (audio_pcm_create_voice_pair_, TYPE) (
|
||||
hw_as = *as;
|
||||
}
|
||||
|
||||
sw = audio_calloc (AUDIO_FUNC, 1, sizeof (*sw));
|
||||
sw = audio_calloc(__func__, 1, sizeof(*sw));
|
||||
if (!sw) {
|
||||
dolog ("Could not allocate soft voice `%s' (%zu bytes)\n",
|
||||
sw_name ? sw_name : "unknown", sizeof (*sw));
|
||||
@@ -379,7 +379,7 @@ static void glue (audio_close_, TYPE) (SW *sw)
|
||||
void glue (AUD_close_, TYPE) (QEMUSoundCard *card, SW *sw)
|
||||
{
|
||||
if (sw) {
|
||||
if (audio_bug (AUDIO_FUNC, !card)) {
|
||||
if (audio_bug(__func__, !card)) {
|
||||
dolog ("card=%p\n", card);
|
||||
return;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ SW *glue (AUD_open_, TYPE) (
|
||||
{
|
||||
AudioState *s = &glob_audio_state;
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !card || !name || !callback_fn || !as)) {
|
||||
if (audio_bug(__func__, !card || !name || !callback_fn || !as)) {
|
||||
dolog ("card=%p name=%p callback_fn=%p as=%p\n",
|
||||
card, name, callback_fn, as);
|
||||
goto fail;
|
||||
@@ -408,12 +408,12 @@ SW *glue (AUD_open_, TYPE) (
|
||||
ldebug ("open %s, freq %d, nchannels %d, fmt %d\n",
|
||||
name, as->freq, as->nchannels, as->fmt);
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, audio_validate_settings (as))) {
|
||||
if (audio_bug(__func__, audio_validate_settings(as))) {
|
||||
audio_print_settings (as);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, !s->drv)) {
|
||||
if (audio_bug(__func__, !s->drv)) {
|
||||
dolog ("Can not open `%s' (no host audio driver)\n", name);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+1
-1
@@ -543,7 +543,7 @@ static int dsound_run_out (HWVoiceOut *hw, int live)
|
||||
}
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, len < 0 || len > bufsize)) {
|
||||
if (audio_bug(__func__, len < 0 || len > bufsize)) {
|
||||
dolog ("len=%d bufsize=%d old_pos=%ld ppos=%ld\n",
|
||||
len, bufsize, old_pos, ppos);
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ struct rate {
|
||||
*/
|
||||
void *st_rate_start (int inrate, int outrate)
|
||||
{
|
||||
struct rate *rate = audio_calloc (AUDIO_FUNC, 1, sizeof (*rate));
|
||||
struct rate *rate = audio_calloc(__func__, 1, sizeof(*rate));
|
||||
|
||||
if (!rate) {
|
||||
dolog ("Could not allocate resampler (%zu bytes)\n", sizeof (*rate));
|
||||
|
||||
+4
-6
@@ -582,11 +582,9 @@ static int oss_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
}
|
||||
|
||||
if (!oss->mmapped) {
|
||||
oss->pcm_buf = audio_calloc (
|
||||
AUDIO_FUNC,
|
||||
hw->samples,
|
||||
1 << hw->info.shift
|
||||
);
|
||||
oss->pcm_buf = audio_calloc(__func__,
|
||||
hw->samples,
|
||||
1 << hw->info.shift);
|
||||
if (!oss->pcm_buf) {
|
||||
dolog (
|
||||
"Could not allocate DAC buffer (%d samples, each %d bytes)\n",
|
||||
@@ -705,7 +703,7 @@ static int oss_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
|
||||
}
|
||||
|
||||
hw->samples = (obt.nfrags * obt.fragsize) >> hw->info.shift;
|
||||
oss->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
oss->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
if (!oss->pcm_buf) {
|
||||
dolog ("Could not allocate ADC buffer (%d samples, each %d bytes)\n",
|
||||
hw->samples, 1 << hw->info.shift);
|
||||
|
||||
+28
-28
@@ -206,7 +206,7 @@ static void *qpa_thread_out (void *arg)
|
||||
PAVoiceOut *pa = arg;
|
||||
HWVoiceOut *hw = &pa->hw;
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ static void *qpa_thread_out (void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (audio_pt_wait (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_wait(&pa->pt, __func__)) {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,7 @@ static void *qpa_thread_out (void *arg)
|
||||
decr = to_mix = audio_MIN (pa->live, pa->g->conf.samples >> 2);
|
||||
rpos = pa->rpos;
|
||||
|
||||
if (audio_pt_unlock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_unlock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ static void *qpa_thread_out (void *arg)
|
||||
to_mix -= chunk;
|
||||
}
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ static void *qpa_thread_out (void *arg)
|
||||
}
|
||||
|
||||
exit:
|
||||
audio_pt_unlock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock(&pa->pt, __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ static int qpa_run_out (HWVoiceOut *hw, int live)
|
||||
int decr;
|
||||
PAVoiceOut *pa = (PAVoiceOut *) hw;
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -279,10 +279,10 @@ static int qpa_run_out (HWVoiceOut *hw, int live)
|
||||
pa->live = live - decr;
|
||||
hw->rpos = pa->rpos;
|
||||
if (pa->live > 0) {
|
||||
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock_and_signal(&pa->pt, __func__);
|
||||
}
|
||||
else {
|
||||
audio_pt_unlock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock(&pa->pt, __func__);
|
||||
}
|
||||
return decr;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ static void *qpa_thread_in (void *arg)
|
||||
PAVoiceIn *pa = arg;
|
||||
HWVoiceIn *hw = &pa->hw;
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ static void *qpa_thread_in (void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (audio_pt_wait (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_wait(&pa->pt, __func__)) {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ static void *qpa_thread_in (void *arg)
|
||||
incr = to_grab = audio_MIN (pa->dead, pa->g->conf.samples >> 2);
|
||||
wpos = pa->wpos;
|
||||
|
||||
if (audio_pt_unlock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_unlock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ static void *qpa_thread_in (void *arg)
|
||||
to_grab -= chunk;
|
||||
}
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ static void *qpa_thread_in (void *arg)
|
||||
}
|
||||
|
||||
exit:
|
||||
audio_pt_unlock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock(&pa->pt, __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ static int qpa_run_in (HWVoiceIn *hw)
|
||||
int live, incr, dead;
|
||||
PAVoiceIn *pa = (PAVoiceIn *) hw;
|
||||
|
||||
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
|
||||
if (audio_pt_lock(&pa->pt, __func__)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -372,10 +372,10 @@ static int qpa_run_in (HWVoiceIn *hw)
|
||||
pa->dead = dead - incr;
|
||||
hw->wpos = pa->wpos;
|
||||
if (pa->dead > 0) {
|
||||
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock_and_signal(&pa->pt, __func__);
|
||||
}
|
||||
else {
|
||||
audio_pt_unlock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_unlock(&pa->pt, __func__);
|
||||
}
|
||||
return incr;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
|
||||
audio_pcm_init_info (&hw->info, &obt_as);
|
||||
hw->samples = g->conf.samples;
|
||||
pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
pa->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
pa->rpos = hw->rpos;
|
||||
if (!pa->pcm_buf) {
|
||||
dolog ("Could not allocate buffer (%d bytes)\n",
|
||||
@@ -587,7 +587,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
if (audio_pt_init (&pa->pt, qpa_thread_out, hw, AUDIO_CAP, AUDIO_FUNC)) {
|
||||
if (audio_pt_init(&pa->pt, qpa_thread_out, hw, AUDIO_CAP, __func__)) {
|
||||
goto fail3;
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
|
||||
|
||||
audio_pcm_init_info (&hw->info, &obt_as);
|
||||
hw->samples = g->conf.samples;
|
||||
pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
pa->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
pa->wpos = hw->wpos;
|
||||
if (!pa->pcm_buf) {
|
||||
dolog ("Could not allocate buffer (%d bytes)\n",
|
||||
@@ -644,7 +644,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
if (audio_pt_init (&pa->pt, qpa_thread_in, hw, AUDIO_CAP, AUDIO_FUNC)) {
|
||||
if (audio_pt_init(&pa->pt, qpa_thread_in, hw, AUDIO_CAP, __func__)) {
|
||||
goto fail3;
|
||||
}
|
||||
|
||||
@@ -667,17 +667,17 @@ static void qpa_fini_out (HWVoiceOut *hw)
|
||||
void *ret;
|
||||
PAVoiceOut *pa = (PAVoiceOut *) hw;
|
||||
|
||||
audio_pt_lock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_lock(&pa->pt, __func__);
|
||||
pa->done = 1;
|
||||
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_join (&pa->pt, &ret, AUDIO_FUNC);
|
||||
audio_pt_unlock_and_signal(&pa->pt, __func__);
|
||||
audio_pt_join(&pa->pt, &ret, __func__);
|
||||
|
||||
if (pa->stream) {
|
||||
pa_stream_unref (pa->stream);
|
||||
pa->stream = NULL;
|
||||
}
|
||||
|
||||
audio_pt_fini (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_fini(&pa->pt, __func__);
|
||||
g_free (pa->pcm_buf);
|
||||
pa->pcm_buf = NULL;
|
||||
}
|
||||
@@ -687,17 +687,17 @@ static void qpa_fini_in (HWVoiceIn *hw)
|
||||
void *ret;
|
||||
PAVoiceIn *pa = (PAVoiceIn *) hw;
|
||||
|
||||
audio_pt_lock (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_lock(&pa->pt, __func__);
|
||||
pa->done = 1;
|
||||
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_join (&pa->pt, &ret, AUDIO_FUNC);
|
||||
audio_pt_unlock_and_signal(&pa->pt, __func__);
|
||||
audio_pt_join(&pa->pt, &ret, __func__);
|
||||
|
||||
if (pa->stream) {
|
||||
pa_stream_unref (pa->stream);
|
||||
pa->stream = NULL;
|
||||
}
|
||||
|
||||
audio_pt_fini (&pa->pt, AUDIO_FUNC);
|
||||
audio_pt_fini(&pa->pt, __func__);
|
||||
g_free (pa->pcm_buf);
|
||||
pa->pcm_buf = NULL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -277,7 +277,7 @@ static void sdl_callback (void *opaque, Uint8 *buf, int len)
|
||||
return;
|
||||
}
|
||||
|
||||
if (audio_bug (AUDIO_FUNC, sdl->live < 0 || sdl->live > hw->samples)) {
|
||||
if (audio_bug(__func__, sdl->live < 0 || sdl->live > hw->samples)) {
|
||||
dolog ("sdl->live=%d hw->samples=%d\n",
|
||||
sdl->live, hw->samples);
|
||||
return;
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ static int wav_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
audio_pcm_init_info (&hw->info, &wav_as);
|
||||
|
||||
hw->samples = 1024;
|
||||
wav->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
|
||||
wav->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift);
|
||||
if (!wav->pcm_buf) {
|
||||
dolog ("Could not allocate buffer (%d bytes)\n",
|
||||
hw->samples << hw->info.shift);
|
||||
|
||||
@@ -259,7 +259,7 @@ int64_t cpu_get_icount_raw(void)
|
||||
|
||||
if (cpu && cpu->running) {
|
||||
if (!cpu->can_do_io) {
|
||||
fprintf(stderr, "Bad icount read\n");
|
||||
error_report("Bad icount read");
|
||||
exit(1);
|
||||
}
|
||||
/* Take into account what has run */
|
||||
@@ -1181,7 +1181,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
|
||||
|
||||
r = kvm_init_vcpu(cpu);
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
|
||||
error_report("kvm_init_vcpu failed: %s", strerror(-r));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
|
||||
static void *qemu_dummy_cpu_thread_fn(void *arg)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
fprintf(stderr, "qtest is not supported under Windows\n");
|
||||
error_report("qtest is not supported under Windows");
|
||||
exit(1);
|
||||
#else
|
||||
CPUState *cpu = arg;
|
||||
@@ -1631,8 +1631,8 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
|
||||
#else /* _WIN32 */
|
||||
if (!qemu_cpu_is_self(cpu)) {
|
||||
if (!QueueUserAPC(dummy_apc_func, cpu->hThread, 0)) {
|
||||
fprintf(stderr, "%s: QueueUserAPC failed with error %lu\n",
|
||||
__func__, GetLastError());
|
||||
error_report("%s: QueueUserAPC failed with error %lu", __func__,
|
||||
GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2216,9 +2216,9 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
|
||||
flags, -1, 0);
|
||||
}
|
||||
if (area != vaddr) {
|
||||
fprintf(stderr, "Could not remap addr: "
|
||||
RAM_ADDR_FMT "@" RAM_ADDR_FMT "\n",
|
||||
length, addr);
|
||||
error_report("Could not remap addr: "
|
||||
RAM_ADDR_FMT "@" RAM_ADDR_FMT "",
|
||||
length, addr);
|
||||
exit(1);
|
||||
}
|
||||
memory_try_enable_merging(vaddr, length);
|
||||
|
||||
+1
-1
@@ -278,7 +278,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)
|
||||
#endif
|
||||
|
||||
if (!kernel_filename && !qtest_enabled()) {
|
||||
fprintf(stderr, "Guest image must be specified (using -kernel)\n");
|
||||
error_report("Guest image must be specified (using -kernel)");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include <libfdt.h>
|
||||
#include "hw/hw.h"
|
||||
@@ -690,7 +691,7 @@ static void load_image_to_fw_cfg(FWCfgState *fw_cfg, uint16_t size_key,
|
||||
gsize length;
|
||||
|
||||
if (!g_file_get_contents(image_name, &contents, &length, NULL)) {
|
||||
fprintf(stderr, "failed to load \"%s\"\n", image_name);
|
||||
error_report("failed to load \"%s\"", image_name);
|
||||
exit(1);
|
||||
}
|
||||
size = length;
|
||||
@@ -956,8 +957,7 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
||||
is_linux = 1;
|
||||
}
|
||||
if (kernel_size < 0) {
|
||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||
info->kernel_filename);
|
||||
error_report("could not load kernel '%s'", info->kernel_filename);
|
||||
exit(1);
|
||||
}
|
||||
info->entry = entry;
|
||||
@@ -976,8 +976,8 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
||||
info->initrd_start);
|
||||
}
|
||||
if (initrd_size < 0) {
|
||||
fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
||||
info->initrd_filename);
|
||||
error_report("could not load initrd '%s'",
|
||||
info->initrd_filename);
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
@@ -1021,9 +1021,9 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
||||
} else {
|
||||
fixupcontext[FIXUP_ARGPTR] = info->loader_start + KERNEL_ARGS_ADDR;
|
||||
if (info->ram_size >= (1ULL << 32)) {
|
||||
fprintf(stderr, "qemu: RAM size must be less than 4GB to boot"
|
||||
" Linux kernel using ATAGS (try passing a device tree"
|
||||
" using -dtb)\n");
|
||||
error_report("RAM size must be less than 4GB to boot"
|
||||
" Linux kernel using ATAGS (try passing a device tree"
|
||||
" using -dtb)");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-6
@@ -35,6 +35,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/arm/pxa.h"
|
||||
#include "net/net.h"
|
||||
@@ -62,8 +63,8 @@ static void connex_init(MachineState *machine)
|
||||
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
if (!dinfo && !qtest_enabled()) {
|
||||
fprintf(stderr, "A flash image must be given with the "
|
||||
"'pflash' parameter\n");
|
||||
error_report("A flash image must be given with the "
|
||||
"'pflash' parameter");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -76,7 +77,7 @@ static void connex_init(MachineState *machine)
|
||||
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
|
||||
sector_len, connex_rom / sector_len,
|
||||
2, 0, 0, 0, 0, be)) {
|
||||
fprintf(stderr, "qemu: Error registering flash memory.\n");
|
||||
error_report("Error registering flash memory");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -99,8 +100,8 @@ static void verdex_init(MachineState *machine)
|
||||
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
if (!dinfo && !qtest_enabled()) {
|
||||
fprintf(stderr, "A flash image must be given with the "
|
||||
"'pflash' parameter\n");
|
||||
error_report("A flash image must be given with the "
|
||||
"'pflash' parameter");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -113,7 +114,7 @@ static void verdex_init(MachineState *machine)
|
||||
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
|
||||
sector_len, verdex_rom / sector_len,
|
||||
2, 0, 0, 0, 0, be)) {
|
||||
fprintf(stderr, "qemu: Error registering flash memory.\n");
|
||||
error_report("Error registering flash memory");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -12,6 +12,7 @@
|
||||
* GNU GPL, version 2 or (at your option) any later version.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/arm/pxa.h"
|
||||
@@ -143,8 +144,8 @@ static void mainstone_common_init(MemoryRegion *address_space_mem,
|
||||
if (qtest_enabled()) {
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "Two flash images must be given with the "
|
||||
"'pflash' parameter\n");
|
||||
error_report("Two flash images must be given with the "
|
||||
"'pflash' parameter");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -154,7 +155,7 @@ static void mainstone_common_init(MemoryRegion *address_space_mem,
|
||||
blk_by_legacy_dinfo(dinfo),
|
||||
sector_len, MAINSTONE_FLASH / sector_len,
|
||||
4, 0, 0, 0, 0, be)) {
|
||||
fprintf(stderr, "qemu: Error registering flash memory.\n");
|
||||
error_report("Error registering flash memory");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1627,7 +1627,7 @@ static void musicpal_init(MachineState *machine)
|
||||
flash_size = blk_getlength(blk);
|
||||
if (flash_size != 8*1024*1024 && flash_size != 16*1024*1024 &&
|
||||
flash_size != 32*1024*1024) {
|
||||
fprintf(stderr, "Invalid flash image size\n");
|
||||
error_report("Invalid flash image size");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
@@ -2313,7 +2314,7 @@ void omap_uwire_attach(struct omap_uwire_s *s,
|
||||
uWireSlave *slave, int chipselect)
|
||||
{
|
||||
if (chipselect < 0 || chipselect > 3) {
|
||||
fprintf(stderr, "%s: Bad chipselect %i\n", __func__, chipselect);
|
||||
error_report("%s: Bad chipselect %i", __func__, chipselect);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -3987,7 +3988,7 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory,
|
||||
|
||||
dinfo = drive_get(IF_SD, 0, 0);
|
||||
if (!dinfo) {
|
||||
fprintf(stderr, "qemu: missing SecureDigital device\n");
|
||||
error_report("missing SecureDigital device");
|
||||
exit(1);
|
||||
}
|
||||
s->mmc = omap_mmc_init(0xfffb7800, system_memory,
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
@@ -2486,7 +2487,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
|
||||
|
||||
dinfo = drive_get(IF_SD, 0, 0);
|
||||
if (!dinfo) {
|
||||
fprintf(stderr, "qemu: missing SecureDigital device\n");
|
||||
error_report("missing SecureDigital device");
|
||||
exit(1);
|
||||
}
|
||||
s->mmc = omap2_mmc_init(omap_l4tao(s->l4, 9),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user