summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-12 04:39:38 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-12 04:39:38 +0200
commitba0f030b2e3e70253edb7b9c3750a7545011693b (patch)
treef4c75ae7e4a03757a5c30f062c0983ea02697450 /src/main.c
parent8563b77910275f68dc5d610dcf5b3027224a24f2 (diff)
Don't print error when device is down
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 93bc6bbb..db257428 100644
--- a/src/main.c
+++ b/src/main.c
@@ -433,7 +433,8 @@ static void init_device(int dev_id)
/* Set link policy */
dr.dev_opt = main_opts.link_policy;
- if (ioctl(dd, HCISETLINKPOL, (unsigned long) &dr) < 0) {
+ if (ioctl(dd, HCISETLINKPOL, (unsigned long) &dr) < 0 &&
+ errno != ENETDOWN) {
error("Can't set link policy on hci%d: %s (%d)",
dev_id, strerror(errno), errno);
}