Don't call a dump routine if there isn't one. (e.g. in floppy driver)

This commit is contained in:
Julian Elischer 1998-05-06 23:32:48 +00:00
parent 7f2f1b784e
commit 456fbc3125
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35814
2 changed files with 12 additions and 4 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: disklabel.c,v 1.3 1998/04/22 19:27:51 julian Exp $
* $Id: disklabel.c,v 1.4 1998/05/06 22:14:31 julian Exp $
*/
#define BAD144
@ -932,5 +932,9 @@ RR;
pd = sdp->pd;
slice = pd->slice_down;
blkoff += sdp->offset;
return (*slice->handler_down->dump)(slice->private_down, blkoff, blkcnt);
if(slice->handler_down->dump) {
return (*slice->handler_down->dump)(slice->private_down,
blkoff, blkcnt);
}
return(ENXIO);
}

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: mbr.c,v 1.3 1998/04/22 19:27:51 julian Exp $
* $Id: mbr.c,v 1.4 1998/05/06 22:14:32 julian Exp $
*/
#include <sys/param.h>
@ -884,5 +884,9 @@ RR;
pd = sdp->pd;
slice = pd->slice_down;
blkoff += sdp->offset;
return (*slice->handler_down->dump)(slice->private_down, blkoff, blkcnt);
if(slice->handler_down->dump) {
return (*slice->handler_down->dump)(slice->private_down,
blkoff, blkcnt);
}
return(ENXIO);
}