Displaying 7 results from an estimated 7 matches for "cs_bounce_size".
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...h;
+ int pathlen;
newdir = NULL;
+ pathlen = strlen(pathname);
+ if (pathname[pathlen-1] != '/') {
+ tpath = calloc(1, pathlen + 2);
+ strcpy(tpath, pathname);
+ strcpy(tpath + pathlen, "/");
+ } else {
+ tpath = pathname;
+ }
- strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
+ strlcpy(__com32.cs_bounce, tpath, __com32.cs_bounce_size);
regs.eax.w[0] = 0x0020;
regs.esi.w[0] = OFFS(__com32.cs_bounce);
@@ -34,6 +45,10 @@ DIR *opendir(const char *pathname)
newdir->dd_fd = regs.esi.w[0];
newdir->dd_sect = regs.eax.l;
newdir->dd_stat = 0;
+ errno = 0...
2006 Mar 11
5
mboot.c32, weird e820 map on HP blade machine, possible memory corruption
...?
Another thing is, the e820 buffer should be zeroed out since some bios'es
are buggy and dont overwrite the high doubleword of Length field of the
AddrRangeDesc. This is seen on the Dell Poweredge1800's.
So it should look like:
while(((void *)(e820 + 1)) < __com32.cs_bounce + __com32.cs_bounce_size)
{
memset(e820, 0, sizeof(*e820));
e820->size = sizeof(*e820) - sizeof(e820->size);
....
hope Tim, the maintainer can take care of this.
--
Ram
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...nt32_t lba = 0;
+ int size = 65536;
+ char *buf;
/* Start with clean registers */
memset(&inregs, 0, sizeof(com32sys_t));
+ buf = lmalloc(size);
+ if (!buf)
+ return 0;
+
/* Put the filename in the bounce buffer */
- strlcpy(__com32.cs_bounce, filename, __com32.cs_bounce_size);
+ strlcpy(buf, filename, size);
/* Call comapi_open() which returns a structure pointer in SI
* to a structure whose first member happens to be the LBA.
*/
inregs.eax.w[0] = 0x0006;
- inregs.esi.w[0] = OFFS(__com32.cs_bounce);
- inregs.es = SEG(__com32.cs_bounce);...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...lude <stdio.h>
+#include <errno.h>
+
+#include <com32.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+
+DIR *opendir(const char *pathname)
+{
+ DIR *newdir;
+ com32sys_t regs;
+
+ newdir = NULL;
+
+ strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
+
+ regs.eax.w[0] = 0x0020;
+ regs.esi.w[0] = OFFS(__com32.cs_bounce);
+ regs.es = SEG(__com32.cs_bounce);
+
+ __com32.cs_intcall(0x22, ®s, ®s);
+
+ if (!(regs.eflags.l & EFLAGS_CF)) {
+ /* Initialization: malloc() then zero */
+ newdir = calloc(1, sizeof(DIR));
+ strcpy(newd...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...lude <stdio.h>
+#include <errno.h>
+
+#include <com32.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+
+DIR *opendir(const char *pathname)
+{
+ DIR *newdir;
+ com32sys_t regs;
+
+ newdir = NULL;
+
+ strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
+
+ regs.eax.w[0] = 0x001F;
+ regs.esi.w[0] = OFFS(__com32.cs_bounce);
+ regs.es = SEG(__com32.cs_bounce);
+
+ __com32.cs_intcall(0x22, ®s, ®s);
+
+ if (!(regs.eflags.l & EFLAGS_CF)) {
+ /* Initialization: malloc() then zero */
+ newdir = calloc(1, sizeof(DIR));
+ strcpy(newd...
2009 Jul 27
1
[PATCH] mboot using module path
...? 2009-07-27 11:11:34.000000000 -0700
@@ -5,9 +5,25 @@
?#include <dirent.h>
?#include <stdio.h>
?#include <errno.h>
+#include <com32.h>
?int chdir(const char *path)
?{
-??? errno = ENOSYS;
-??? return -1;
+??? com32sys_t regs;
+
+??? strlcpy(__com32.cs_bounce, path, __com32.cs_bounce_size);
+
+??? regs.eax.w[0] = 0x0025;
+??? regs.esi.w[0] = OFFS(__com32.cs_bounce);
+??? regs.es = SEG(__com32.cs_bounce);
+
+??? __com32.cs_intcall(0x22, ®s, ®s);
+
+??? if (!(regs.eflags.l & EFLAGS_CF)) {
+??? ??? return -1;
+??? }
+
+??? /* We're done */
+??? return 0;
?}
+
diff...
2012 Nov 06
50
chain.c32 (and partiter) updates v2
This is a bit updated set of chain.c32 changes that simplifies a few things
(and in partiter part), fixes few minor issues and adds a few new features.
Details are in the following commits, below is the summary and pull details at
the end.
Shao - any chance to peek over them ? Most of those are relatively simple
changes and well tested, though of course something might have slipped my
attention.