Merge branch 'master' into fsc
authorH. Peter Anvin <hpa@zytor.com>
Mon, 25 Jan 2010 00:25:34 +0000 (16:25 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 25 Jan 2010 00:25:34 +0000 (16:25 -0800)
Conflicts:
com32/lib/MCONFIG
com32/lib/readdir.c

1  2 
MCONFIG
MCONFIG.embedded
com32/MCONFIG
com32/lib/MCONFIG
com32/lib/closedir.c
com32/lib/opendir.c
com32/lib/readdir.c
com32/rosh/rosh.c

diff --cc MCONFIG
Simple merge
Simple merge
diff --cc com32/MCONFIG
@@@ -54,10 -42,10 +54,10 @@@ SFLAGS     = $(GCCOPT) $(GCCWARN) -marc
             -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE)
  
  COM32LD          = $(com32)/lib/com32.ld
 -LDFLAGS    = -m elf_i386 -T $(COM32LD)
 +LDFLAGS    = -m elf_i386 --emit-relocs -T $(COM32LD)
  LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
  
- LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
+ LNXCFLAGS  = -I$(com32)/libutil/include $(GCCWARN) -O -g -D_GNU_SOURCE
  LNXSFLAGS  = -g
  LNXLDFLAGS = -g
  
Simple merge
Simple merge
Simple merge
@@@ -15,12 -16,42 +16,12 @@@ struct dirent *readdir(DIR * dir
  {
      struct dirent *newde;
      com32sys_t regs;
 -
 -    newde = NULL;
 -    if ((dir != NULL) && (dir->dd_fd != 0) && (dir->dd_stat >= 0)) {
 -      memset(__com32.cs_bounce, 0, 32);
 -      memset(&regs, 0, sizeof(regs));
 -
 -      regs.eax.w[0] = 0x0021;
 -      regs.esi.w[0] = dir->dd_fd;
 -      regs.edi.w[0] = OFFS(__com32.cs_bounce);
 -      regs.es = SEG(__com32.cs_bounce);
 -
 -      __com32.cs_intcall(0x22, &regs, &regs);
 -
 -#if 0
 -      /* Don't do this as we won't be able to rewind. */
 -         dir->dd_fd = regs.esi.w[0];  /* Shouldn't be needed? */
 -#endif
 -      if ((!(regs.eflags.l & EFLAGS_CF)) && (regs.esi.w[0] != 0)) {
 -          newde = calloc(1, sizeof(newde));
 -          if (newde != NULL) {
 -              strcpy(newde->d_name, __com32.cs_bounce);
 -              newde->d_mode = regs.edx.b[0];
 -              newde->d_size = regs.eax.l;
 -              newde->d_ino = regs.ebx.l;
 -              dir->dd_stat = 1;
 -          } else {
 -              dir->dd_stat = -2;
 -              errno = ENOMEM;
 -          }
 -      } else {
 -          dir->dd_stat = -1;
 -          errno = EIO;        /* Is this the right nmber? */
 -      }
 -    } else {
 -      errno = EBADF;
 -    }
 +    
 +    memset(&regs, 0, sizeof(regs));           
 +    regs.eax.w[0] = 0x0021;
 +    regs.esi.l = (uint32_t)dir;
 +    __com32.cs_intcall(0x22, &regs, &regs);
 +    newde = (struct dirent *)(regs.eax.l);
-     
      return newde;
  }
Simple merge