search for: aa2ba5b

Displaying 2 results from an estimated 2 matches for "aa2ba5b".

Did you mean: aa25aab
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...required a '/' to recognize that you're searching for a directory. This checks and automatically appends a '/' to the end of the pathname string (by creating another string temporarily) then making the COMBOOT call. diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c index aa2ba5b..7063f8c 100644 --- a/com32/lib/opendir.c +++ b/com32/lib/opendir.c @@ -16,10 +17,20 @@ DIR *opendir(const char *pathname) { DIR *newdir; com32sys_t regs; + char *tpath; + int pathlen; newdir = NULL; + pathlen = strlen(pathname); + if (pathname[pathlen-1] != '/') { + tpath = calloc...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...; + pwdstr = MK_PTR(reg.es, reg.ebx.w[0]); + if ((strlen(pwdstr) < size) && (buf != NULL)) { + strcpy(buf, pwdstr); + ret = buf; + } else { + ret = NULL; + errno = ERANGE; + } + return ret; +} diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c new file mode 100644 index 0000000..aa2ba5b --- /dev/null +++ b/com32/lib/opendir.c @@ -0,0 +1,41 @@ +/* + * opendir.c + */ + +#include <dirent.h> +#include <stdio.h> +#include <errno.h> + +#include <com32.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> + + +DIR *opendir(const char *...