Ver código fonte

[uri] Add uri_has_path()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 anos atrás
pai
commit
d77b183f10
1 arquivos alterados com 10 adições e 0 exclusões
  1. 10
    0
      src/include/ipxe/uri.h

+ 10
- 0
src/include/ipxe/uri.h Ver arquivo

@@ -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
  *

Carregando…
Cancelar
Salvar