From d77b183f103227bb67b300017add920ab14f6912 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 1 Feb 2011 04:25:19 +0000 Subject: [PATCH] [uri] Add uri_has_path() Signed-off-by: Michael Brown --- src/include/ipxe/uri.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/include/ipxe/uri.h b/src/include/ipxe/uri.h index cb0898e4..b7b8b441 100644 --- a/src/include/ipxe/uri.h +++ b/src/include/ipxe/uri.h @@ -113,6 +113,16 @@ static inline int uri_is_absolute ( struct uri *uri ) { return ( uri->scheme != NULL ); } +/** + * URI has a path + * + * @v uri URI + * @ret has_path URI has a path + */ +static inline int uri_has_path ( struct uri *uri ) { + return ( uri->path && ( uri->path[0] != '\0' ) ); +} + /** * URI has an absolute path *