瀏覽代碼

[uri] Add uri_has_path()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 年之前
父節點
當前提交
d77b183f10
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. 10
    0
      src/include/ipxe/uri.h

+ 10
- 0
src/include/ipxe/uri.h 查看文件

@@ -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…
取消
儲存