From: Michael Brown Date: Tue, 1 Feb 2011 04:25:19 +0000 (+0000) Subject: [uri] Add uri_has_path() X-Git-Tag: v1.20.1~2323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d77b183f103227bb67b300017add920ab14f6912;p=thirdparty%2Fipxe.git [uri] Add uri_has_path() Signed-off-by: Michael Brown --- diff --git a/src/include/ipxe/uri.h b/src/include/ipxe/uri.h index cb0898e42..b7b8b4417 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 *