From 3609ae4b0b15349707bfcea529bd75e58169783a Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 9 Jan 2017 15:08:47 +0100 Subject: [PATCH] core: new error number Add an error indicating that given line is currently in use. Signed-off-by: Bartosz Golaszewski --- core.c | 1 + gpiod.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core.c b/core.c index eefcff7..bd1db6e 100644 --- a/core.c +++ b/core.c @@ -69,6 +69,7 @@ static const char *const error_descr[] = { "GPIO line not reserved", "no events configured on GPIO line", "GPIO lines in bulk don't belong to the same gpiochip", + "GPIO line currently in use", }; static void set_last_error(int errnum) diff --git a/gpiod.h b/gpiod.h index dbb103b..49bcd7f 100644 --- a/gpiod.h +++ b/gpiod.h @@ -83,6 +83,8 @@ enum { /**< The caller has not configured any events on this line. */ GPIOD_EBULKINCOH, /**< Not all lines in bulk belong to the same GPIO chip. */ + GPIOD_ELINEBUSY, + /**< This line is currently in use. */ __GPIOD_MAX_ERR, /**< Private: number of libgpiod-specific error numbers. */ }; -- 2.30.2