]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[uri] Add uri_has_path()
authorMichael Brown <mcb30@ipxe.org>
Tue, 1 Feb 2011 04:25:19 +0000 (04:25 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 1 Feb 2011 04:25:19 +0000 (04:25 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/uri.h

index cb0898e42c146641b730e5b5db39333074f7e57a..b7b8b4417812c92d702fe44261d6804522f16548 100644 (file)
@@ -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
  *