From cde778a70ab1296695def9c7f86a94443c36477a Mon Sep 17 00:00:00 2001 From: Andy Walsh Date: Mon, 10 Sep 2018 17:47:32 +0200 Subject: [PATCH] wsdd2: fix invalid error message * fixed invalid error message Signed-off-by: Andy Walsh --- net/wsdd2/Makefile | 2 +- net/wsdd2/patches/001-add_uuid_boot_id.patch | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/net/wsdd2/Makefile b/net/wsdd2/Makefile index 1cda1ae93..7bda797c9 100644 --- a/net/wsdd2/Makefile +++ b/net/wsdd2/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wsdd2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/Andy2244/wsdd2.git diff --git a/net/wsdd2/patches/001-add_uuid_boot_id.patch b/net/wsdd2/patches/001-add_uuid_boot_id.patch index 5f60f2216..0c59365a1 100644 --- a/net/wsdd2/patches/001-add_uuid_boot_id.patch +++ b/net/wsdd2/patches/001-add_uuid_boot_id.patch @@ -1,16 +1,19 @@ ---- a/wsd.c 2018-07-20 -+++ b/wsd.c 2018-07-20 -@@ -97,12 +97,17 @@ static void uuid_endpoint(char *uuid, si +--- a/wsd.c 2018-07-24 ++++ b/wsd.c 2018-09-10 +@@ -96,13 +96,19 @@ static void uuid_endpoint(char *uuid, si + { FILE *fp = fopen("/etc/machine-id", "r"); int c, i = 0; - ++ + if (!fp) { -+ DEBUG(0, W, "Can't open '/etc/machine-id', trying '/proc/sys/kernel/random/boot_id'"); + fp = fopen("/proc/sys/kernel/random/boot_id", "r"); + } -+ - if (!fp) + +- if (!fp) ++ if (!fp) { ++ DEBUG(0, W, "Can't open required '/etc/machine-id' or '/proc/sys/kernel/random/boot_id'"); return; ++ } while (i < 36 && (c = getc(fp)) != EOF && - (isdigit(c) || (islower(c) && isxdigit(c)))) {