Sfoglia il codice sorgente

[uri] Add uri_has_path()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 anni fa
parent
commit
d77b183f10
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10
    0
      src/include/ipxe/uri.h

+ 10
- 0
src/include/ipxe/uri.h Vedi 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…
Annulla
Salva