diff options
| author | Michael Brown | 2011-02-01 05:25:19 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-02-01 05:25:19 +0100 |
| commit | d77b183f103227bb67b300017add920ab14f6912 (patch) | |
| tree | b53c69521246ab6d43ec8c0c1fa0e46e01cfbfaa /src/include | |
| parent | [autoboot] Avoid using uri_dup() for constructed TFTP URI (diff) | |
| download | ipxe-d77b183f103227bb67b300017add920ab14f6912.tar.gz ipxe-d77b183f103227bb67b300017add920ab14f6912.tar.xz ipxe-d77b183f103227bb67b300017add920ab14f6912.zip | |
[uri] Add uri_has_path()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/uri.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/ipxe/uri.h b/src/include/ipxe/uri.h index cb0898e42..b7b8b4417 100644 --- a/src/include/ipxe/uri.h +++ b/src/include/ipxe/uri.h @@ -114,6 +114,16 @@ static inline int uri_is_absolute ( struct uri *uri ) { } /** + * 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 * * @v uri URI |
