Deleted Added
full compact
devinfo.c (173057) devinfo.c (199291)
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 173057 2007-10-27 13:06:15Z jhb $");
33__FBSDID("$FreeBSD: head/usr.sbin/devinfo/devinfo.c 199291 2009-11-15 16:44:43Z attilio $");
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

--- 90 unchanged lines hidden (view full) ---

132 * Print information about a device.
133 */
134int
135print_device(struct devinfo_dev *dev, void *arg)
136{
137 struct indent_arg ia;
138 int i, indent;
139
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

--- 90 unchanged lines hidden (view full) ---

132 * Print information about a device.
133 */
134int
135print_device(struct devinfo_dev *dev, void *arg)
136{
137 struct indent_arg ia;
138 int i, indent;
139
140 if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DIS_ATTACHED)) {
140 if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED)) {
141 indent = (int)(intptr_t)arg;
142 for (i = 0; i < indent; i++)
143 printf(" ");
144 printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown");
145 if (vflag && *dev->dd_pnpinfo)
146 printf(" pnpinfo %s", dev->dd_pnpinfo);
147 if (vflag && *dev->dd_location)
148 printf(" at %s", dev->dd_location);

--- 85 unchanged lines hidden ---
141 indent = (int)(intptr_t)arg;
142 for (i = 0; i < indent; i++)
143 printf(" ");
144 printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown");
145 if (vflag && *dev->dd_pnpinfo)
146 printf(" pnpinfo %s", dev->dd_pnpinfo);
147 if (vflag && *dev->dd_location)
148 printf(" at %s", dev->dd_location);

--- 85 unchanged lines hidden ---