Browse Source

[uri] Add uri_has_path()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
d77b183f10
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/include/ipxe/uri.h

+ 10
- 0
src/include/ipxe/uri.h View File

@@ -113,6 +113,16 @@ static inline int uri_is_absolute ( struct uri *uri ) {
113 113
 	return ( uri->scheme != NULL );
114 114
 }
115 115
 
116
+/**
117
+ * URI has a path
118
+ *
119
+ * @v uri			URI
120
+ * @ret has_path		URI has a path
121
+ */
122
+static inline int uri_has_path ( struct uri *uri ) {
123
+	return ( uri->path && ( uri->path[0] != '\0' ) );
124
+}
125
+
116 126
 /**
117 127
  * URI has an absolute path
118 128
  *

Loading…
Cancel
Save