1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Sync with sys/i386/i386/userconfig.c revision 1.99.

This commit is contained in:
KATO Takenori 1997-12-29 16:06:20 +00:00
parent a7a660bdb8
commit 3e9646dfee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32088

View File

@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** $Id: userconfig.c,v 1.41 1997/11/27 10:15:48 kato Exp $
** $Id: userconfig.c,v 1.42 1997/12/09 11:55:25 kato Exp $
**/
/**
@ -2385,7 +2385,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: userconfig.c,v 1.41 1997/11/27 10:15:48 kato Exp $
* $Id: userconfig.c,v 1.42 1997/12/09 11:55:25 kato Exp $
*/
#include "scbus.h"
@ -3104,8 +3104,7 @@ static int
lsdevtab(struct isa_device *dt)
{
for (; dt->id_id != 0; dt++) {
int i;
char line[80];
char dname[80];
if (lineno >= 23) {
printf("<More> ");
@ -3118,33 +3117,18 @@ lsdevtab(struct isa_device *dt)
}
if (lineno == 0) {
printf(
"Device port irq drq iomem iosize unit flags enabled\n");
"Device port irq drq iomem iosize unit flags enab confl\n"
);
++lineno;
}
/*
* printf() doesn't support %#, %- or even field widths for strings,
* so formatting is not straightforward.
*/
bzero(line, sizeof line);
sprintf(line, "%s%d", dt->id_driver->name, dt->id_unit);
/* Missing: id_id (don't need it). */
/* Missing: id_driver (useful if we could show it by name). */
sprintf(line + 9, "0x%x", dt->id_iobase);
sprintf(line + 20, "%d", ffs(dt->id_irq) - 1);
sprintf(line + 26, "%d", dt->id_drq);
sprintf(line + 32, "%p", dt->id_maddr);
sprintf(line + 40, "%d", dt->id_msize);
/* Missing: id_msize (0 at start, useful if we can get here later). */
/* Missing: id_intr (useful if we could show it by name). */
/* Display only: id_unit. */
sprintf(line + 49, "%d", dt->id_unit);
sprintf(line + 55, "0x%x", dt->id_flags);
/* Missing: id_scsiid, id_alive, id_ri_flags, id_reconfig (0 now...) */
sprintf(line + 66, "%s", dt->id_enabled ? "Yes" : "No");
for (i = 0; i < 66; ++i)
if (line[i] == '\0')
line[i] = ' ';
printf("%s\n", line);
sprintf(dname, "%s%d", dt->id_driver->name, dt->id_unit);
printf("%-9.9s%-#11x%-6d%-6d%-8p%-9d%-6d%-#11x%-5s%-3s\n",
dname, /* dt->id_id, dt->id_driver(by name), */ dt->id_iobase,
ffs(dt->id_irq) - 1, dt->id_drq, dt->id_maddr, dt->id_msize,
/* dt->id_intr(by name), */ dt->id_unit, dt->id_flags,
/* dt->id_scsiid, dt->id_alive, dt->id_ri_flags, */
/* dt->id_reconfig, */ dt->id_enabled ? "Yes" : "No",
dt->id_conflicts ? "Yes" : "No");
++lineno;
}
return(0);