Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 22:35:54 +0000 (UTC)
From:      Tai-hwa Liang <avatar@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287388 - stable/10/sys/dev/sound/midi
Message-ID:  <201509012235.t81MZsPf043907@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avatar
Date: Tue Sep  1 22:35:53 2015
New Revision: 287388
URL: https://svnweb.freebsd.org/changeset/base/287388

Log:
  MFC r286887: Using the error return code documented in the comment.
  
  Though there is no direct midi_uninit() caller amongst existing drivers
  at this moment, a quick experiment indicates that EBUSY gives users more
  precise error message once drivers start to honour this result.  For example,
  emu_midi_detach() should check the result of mpu401_uninit() and block
  module unloading if there is any MIDI I/O in progress.

Modified:
  stable/10/sys/dev/sound/midi/midi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sound/midi/midi.c
==============================================================================
--- stable/10/sys/dev/sound/midi/midi.c	Tue Sep  1 22:28:23 2015	(r287387)
+++ stable/10/sys/dev/sound/midi/midi.c	Tue Sep  1 22:35:53 2015	(r287388)
@@ -403,7 +403,7 @@ midi_uninit(struct snd_midi *m)
 {
 	int err;
 
-	err = ENXIO;
+	err = EBUSY;
 	mtx_lock(&midistat_lock);
 	mtx_lock(&m->lock);
 	if (m->busy) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509012235.t81MZsPf043907>