From 652e7e9f433a1caebbea9b477b183a4ec052d622 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Imre=20Vad=C3=A1sz?= Date: Mon, 5 Feb 2018 18:19:33 +0100 Subject: [PATCH] libdevinfo - Fix enum devinfo_state. --- lib/libdevinfo/devinfo.h | 1 + usr.sbin/devinfo/devinfo.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libdevinfo/devinfo.h b/lib/libdevinfo/devinfo.h index 8caf544629..018e24e5d1 100644 --- a/lib/libdevinfo/devinfo.h +++ b/lib/libdevinfo/devinfo.h @@ -44,6 +44,7 @@ typedef __uintptr_t devinfo_handle_t; typedef enum devinfo_state { DIS_NOTPRESENT, /* not probed or probe failed */ DIS_ALIVE, /* probe succeeded */ + DIS_INPROGRESS, /* attach in progress */ DIS_ATTACHED, /* attach method called */ DIS_BUSY /* device is open */ } devinfo_state_t; diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index b4bb549811..882446bd0f 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -137,7 +137,8 @@ print_device(struct devinfo_dev *dev, void *arg) struct indent_arg ia; int i, indent; - if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DIS_ATTACHED)) { + if (vflag || + (dev->dd_name[0] != 0 && dev->dd_state >= DIS_INPROGRESS)) { indent = (int)(intptr_t)arg; for (i = 0; i < indent; i++) printf(" "); -- 2.11.4.GIT