summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/uri.h
diff options
context:
space:
mode:
authorMarin Hannache2013-07-15 17:56:29 +0200
committerMichael Brown2013-07-15 17:56:29 +0200
commit30de9e8300e97c4b56e29f5a3b08e4615b30606f (patch)
tree48d66fac04d1a3eb129e878c2696f9afef2f6e8f /src/include/ipxe/uri.h
parent[ifmgmt] Avoid relying on global variable within ifcommon_exec() (diff)
downloadipxe-30de9e8300e97c4b56e29f5a3b08e4615b30606f.tar.gz
ipxe-30de9e8300e97c4b56e29f5a3b08e4615b30606f.tar.xz
ipxe-30de9e8300e97c4b56e29f5a3b08e4615b30606f.zip
[nfs] Add support for NFS protocol
Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/uri.h')
-rw-r--r--src/include/ipxe/uri.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/include/ipxe/uri.h b/src/include/ipxe/uri.h
index b7b8b4417..9a134690f 100644
--- a/src/include/ipxe/uri.h
+++ b/src/include/ipxe/uri.h
@@ -109,17 +109,27 @@ enum {
* Note that this is a separate concept from a URI with an absolute
* path.
*/
-static inline int uri_is_absolute ( struct uri *uri ) {
+static inline int uri_is_absolute ( const struct uri *uri ) {
return ( uri->scheme != NULL );
}
/**
+ * URI has an opaque part
+ *
+ * @v uri URI
+ * @ret has_opaque URI has an opaque part
+ */
+static inline int uri_has_opaque ( const struct uri *uri ) {
+ return ( uri->opaque && ( uri->opaque[0] != '\0' ) );
+
+}
+/**
* URI has a path
*
* @v uri URI
* @ret has_path URI has a path
*/
-static inline int uri_has_path ( struct uri *uri ) {
+static inline int uri_has_path ( const struct uri *uri ) {
return ( uri->path && ( uri->path[0] != '\0' ) );
}
@@ -133,7 +143,7 @@ static inline int uri_has_path ( struct uri *uri ) {
* concept from an absolute URI. Note also that a URI may not have a
* path at all.
*/
-static inline int uri_has_absolute_path ( struct uri *uri ) {
+static inline int uri_has_absolute_path ( const struct uri *uri ) {
return ( uri->path && ( uri->path[0] == '/' ) );
}
@@ -147,7 +157,7 @@ static inline int uri_has_absolute_path ( struct uri *uri ) {
* this is a separate concept from a relative URI. Note also that a
* URI may not have a path at all.
*/
-static inline int uri_has_relative_path ( struct uri *uri ) {
+static inline int uri_has_relative_path ( const struct uri *uri ) {
return ( uri->path && ( uri->path[0] != '/' ) );
}