http://git.etherboot.org
/
people
/
indolent
/
gpxe.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
763a3ea
)
Add strlen_user() (will be needed for PXE API extensions)
author
Michael Brown
<mcb30@etherboot.org>
Fri, 6 Jul 2007 12:07:10 +0000
(13:07 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 6 Jul 2007 12:07:10 +0000
(13:07 +0100)
src/arch/i386/include/librm.h
patch
|
blob
|
history
diff --git
a/src/arch/i386/include/librm.h
b/src/arch/i386/include/librm.h
index
31bafb3
..
9e9498c
100644
(file)
--- a/
src/arch/i386/include/librm.h
+++ b/
src/arch/i386/include/librm.h
@@
-193,6
+193,18
@@
memset_user ( userptr_t buffer, off_t offset, int c, size_t len ) {
memset ( ( ( void * ) buffer + offset ), c, len );
}
memset ( ( ( void * ) buffer + offset ), c, len );
}
+/**
+ * Find length of NUL-terminated string in user buffer
+ *
+ * @v buffer User buffer
+ * @v offset Offset within buffer
+ * @ret len Length of string (excluding NUL)
+ */
+static inline __attribute__ (( always_inline )) size_t
+strlen_user ( userptr_t buffer, off_t offset ) {
+ return strlen ( ( void * ) buffer + offset );
+}
+
/**
* Convert virtual address to user buffer
*
/**
* Convert virtual address to user buffer
*