summaryrefslogtreecommitdiff
path: root/ulib.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2018-08-31 09:21:19 -0400
committerFrans Kaashoek <[email protected]>2018-08-31 09:21:19 -0400
commit308a3b88c9e59b9065f1af9cdd2e0369cdfd0823 (patch)
tree561d5cc95964191b8b16fe61b16406aeadaf3ad0 /ulib.c
parent343255189e3b5dac4bcd132ecc0cb28158657aa6 (diff)
downloadxv6-labs-308a3b88c9e59b9065f1af9cdd2e0369cdfd0823.tar.gz
xv6-labs-308a3b88c9e59b9065f1af9cdd2e0369cdfd0823.tar.bz2
xv6-labs-308a3b88c9e59b9065f1af9cdd2e0369cdfd0823.zip
thanks tyfkda
Diffstat (limited to 'ulib.c')
-rw-r--r--ulib.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ulib.c b/ulib.c
index 51a9e74..8e1e1a2 100644
--- a/ulib.c
+++ b/ulib.c
@@ -5,7 +5,7 @@
#include "x86.h"
char*
-strcpy(char *s, char *t)
+strcpy(char *s, const char *t)
{
char *os;
@@ -24,7 +24,7 @@ strcmp(const char *p, const char *q)
}
uint
-strlen(char *s)
+strlen(const char *s)
{
int n;
@@ -68,7 +68,7 @@ gets(char *buf, int max)
}
int
-stat(char *n, struct stat *st)
+stat(const char *n, struct stat *st)
{
int fd;
int r;
@@ -93,9 +93,10 @@ atoi(const char *s)
}
void*
-memmove(void *vdst, void *vsrc, int n)
+memmove(void *vdst, const void *vsrc, int n)
{
- char *dst, *src;
+ char *dst;
+ const char *src;
dst = vdst;
src = vsrc;