diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-02-09 07:26:48 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-02-09 07:26:48 +0000 |
commit | 4cf30c0db17b52d457836b0b562462e7122bf29e (patch) | |
tree | e348d1192cfb566722a20a07790701f2765b7c3e /usr.sbin/fwcontrol | |
parent | edadda996abe3ce21aa9a1b10dbccc363acfec42 (diff) | |
download | FreeBSD-src-4cf30c0db17b52d457836b0b562462e7122bf29e.zip FreeBSD-src-4cf30c0db17b52d457836b0b562462e7122bf29e.tar.gz |
Improve device listing.
Diffstat (limited to 'usr.sbin/fwcontrol')
-rw-r--r-- | usr.sbin/fwcontrol/fwcontrol.8 | 3 | ||||
-rw-r--r-- | usr.sbin/fwcontrol/fwcontrol.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/fwcontrol/fwcontrol.8 b/usr.sbin/fwcontrol/fwcontrol.8 index 25ba4d5..2c5ace6 100644 --- a/usr.sbin/fwcontrol/fwcontrol.8 +++ b/usr.sbin/fwcontrol/fwcontrol.8 @@ -47,6 +47,9 @@ The utility is designed to provide a way for users to access and control the .Fx FireWire subsystem. +Without options, +.Nm +will output a list of devices those are/were connected to the bus. .Pp .Bl -tag -width indent .It Fl r diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index d27896a..6044ece 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -95,11 +95,11 @@ list_dev(int fd) data = get_dev(fd); printf("%d devices (info_len=%d)\n", data->n, data->info_len); + printf("node EUI64 status\n"); for (i = 0; i < data->info_len; i++) { devinfo = &data->dev[i]; - printf("%d node %d eui:%08x%08x status:%d\n", - i, - devinfo->dst, + printf("%4d %08x%08x %6d\n", + (devinfo->status || i == 0) ? devinfo->dst : -1, devinfo->eui.hi, devinfo->eui.lo, devinfo->status @@ -376,7 +376,6 @@ main(int argc, char **argv) if (argc < 2) { list_dev(fd); - usage(); } while ((ch = getopt(argc, argv, "g:b:rtc:d:l:R:S:")) != -1) |