devinfo.c (162799) | devinfo.c (173057) |
---|---|
1/*- 2 * Copyright (c) 2000, 2001 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * Print information about system device configuration. 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000, 2001 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * Print information about system device configuration. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/usr.sbin/devinfo/devinfo.c 162799 2006-09-29 16:46:01Z ru $"); | 33__FBSDID("$FreeBSD: head/usr.sbin/devinfo/devinfo.c 173057 2007-10-27 13:06:15Z jhb $"); |
34 35#include <sys/types.h> 36#include <err.h> 37#include <stdio.h> 38#include <stdlib.h> 39#include <unistd.h> 40#include "devinfo.h" 41 --- 18 unchanged lines hidden (view full) --- 60 */ 61void 62print_resource(struct devinfo_res *res) 63{ 64 struct devinfo_rman *rman; 65 int hexmode; 66 67 rman = devinfo_handle_to_rman(res->dr_rman); | 34 35#include <sys/types.h> 36#include <err.h> 37#include <stdio.h> 38#include <stdlib.h> 39#include <unistd.h> 40#include "devinfo.h" 41 --- 18 unchanged lines hidden (view full) --- 60 */ 61void 62print_resource(struct devinfo_res *res) 63{ 64 struct devinfo_rman *rman; 65 int hexmode; 66 67 rman = devinfo_handle_to_rman(res->dr_rman); |
68 hexmode = (rman->dm_size > 100) || (rman->dm_size == 0); | 68 hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); |
69 printf(hexmode ? "0x%lx" : "%lu", res->dr_start); 70 if (res->dr_size > 1) 71 printf(hexmode ? "-0x%lx" : "-%lu", 72 res->dr_start + res->dr_size - 1); 73} 74 75/* 76 * Print resource information if this resource matches the --- 157 unchanged lines hidden --- | 69 printf(hexmode ? "0x%lx" : "%lu", res->dr_start); 70 if (res->dr_size > 1) 71 printf(hexmode ? "-0x%lx" : "-%lu", 72 res->dr_start + res->dr_size - 1); 73} 74 75/* 76 * Print resource information if this resource matches the --- 157 unchanged lines hidden --- |