diff options
author | ken <ken@FreeBSD.org> | 2000-08-29 22:11:39 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2000-08-29 22:11:39 +0000 |
commit | dc39c37d3d9aa75c3bcb19da228d42d09d1acf1c (patch) | |
tree | 961f3a0fe7a78be2a6d978aca9c7e1c6c9dcedb5 | |
parent | 5dce321597d62efe27cff3b06d32ed6e5db06adf (diff) | |
download | FreeBSD-src-dc39c37d3d9aa75c3bcb19da228d42d09d1acf1c.zip FreeBSD-src-dc39c37d3d9aa75c3bcb19da228d42d09d1acf1c.tar.gz |
Change the "Duplicate Wired Device entry" printout in camperiphnextunit to
also mention the peripheral name, bus, target and lun of the device we
attempted to put in that slot. This gives the user a little more
information about what is going on.
Tested by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Discussed with: gibbs
-rw-r--r-- | sys/cam/cam_periph.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 58ca810c..dad4400 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -2,7 +2,7 @@ * Common functions for CAM "type" (peripheral) drivers. * * Copyright (c) 1997, 1998 Justin T. Gibbs. - * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. + * Copyright (c) 1997, 1998, 1999, 2000 Kenneth D. Merry. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,10 +54,12 @@ #include <cam/scsi/scsi_pass.h> static u_int camperiphnextunit(struct periph_driver *p_drv, - u_int newunit, int wired); + u_int newunit, int wired, + path_id_t pathid, target_id_t target, + lun_id_t lun); static u_int camperiphunit(struct periph_driver *p_drv, - path_id_t path_id_t, - target_id_t target, lun_id_t lun); + path_id_t pathid, target_id_t target, + lun_id_t lun); static void camperiphdone(struct cam_periph *periph, union ccb *done_ccb); static void camperiphfree(struct cam_periph *periph); @@ -262,7 +264,8 @@ cam_periph_release(struct cam_periph *periph) * numbers that did not match a wiring entry. */ static u_int -camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired) +camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired, + path_id_t pathid, target_id_t target, lun_id_t lun) { struct cam_periph *periph; char *periph_name, *strval; @@ -284,7 +287,9 @@ camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired) xpt_print_path(periph->path); printf("Duplicate Wired Device entry!\n"); xpt_print_path(periph->path); - printf("Second device will not be wired\n"); + printf("Second device (%s device at scbus%d " + "target %d lun %d) will not be wired\n", + periph_name, pathid, target, lun); wired = 0; } continue; @@ -361,7 +366,8 @@ camperiphunit(struct periph_driver *p_drv, path_id_t pathid, * if we have wildcard matches, we don't return the same * unit number twice. */ - unit = camperiphnextunit(p_drv, unit, /*wired*/hit); + unit = camperiphnextunit(p_drv, unit, /*wired*/hit, pathid, + target, lun); return (unit); } |