mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
Don't call a dump routine if there isn't one. (e.g. in floppy driver)
This commit is contained in:
parent
7f2f1b784e
commit
456fbc3125
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35814
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user