search for: dd_stat

Displaying 5 results from an estimated 5 matches for "dd_stat".

Did you mean: add_stat
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure DIR
...ewde = calloc(1, sizeof(newde)); - if (newde != NULL) { - strcpy(newde->d_name, __com32.cs_bounce); - newde->d_mode = regs.edx.w[0]; - newde->d_type = (newde->d_mode & S_IFMT) >> 12; - newde->d_size = regs.eax.l; - newde->d_ino = regs.ebx.l; - dir->dd_stat = 1; - } else { - dir->dd_stat = -2; - errno = ENOMEM; - } + newde = dir->dd_de; + strcpy(newde->d_name, __com32.cs_bounce); + newde->d_mode = regs.edx.w[0]; + newde->d_type = (newde->d_mode & S_IFMT) >> 12; + newde->d_size = regs.eax.l; + newde-...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...clude <stddef.h> +#include <sys/types.h> + +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + +struct dirent { + long d_ino; /* Inode/File number */ + off_t d_size; /* Size of file */ + mode_t d_mode; /* Type of file */ + char d_name[NAME_MAX + 1]; +}; + +typedef struct { + short dd_stat; /* status return from last lookup */ + uint16_t dd_fd; + size_t dd_sect; + char dd_name[NAME_MAX + 1]; /* directory */ +} DIR; + +__extern DIR *opendir(const char *); +__extern struct dirent *readdir(DIR *); +__extern int closedir(DIR *); +__extern DIR *fdopendir(int); + +#endif /* Not _DIRENT_H...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...clude <stddef.h> +#include <sys/types.h> + +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + +struct dirent { + long d_ino; /* Inode/File number */ + off_t d_size; /* Size of file */ + mode_t d_mode; /* Type of file */ + char d_name[NAME_MAX + 1]; +}; + +typedef struct { + short dd_stat; /* status return from last lookup */ + uint16_t dd_fd; + size_t dd_sect; + char dd_name[NAME_MAX + 1]; /* directory */ +} DIR; + +__extern DIR *opendir(const char *); +__extern struct dirent *readdir(DIR *); +__extern int closedir(DIR *); +__extern DIR *fdopendir(int); + +#endif /* Not _DIRENT_H...
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...e, __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; + } else { + /* ENOTDIR is another but a file must exist */ + errno = ENOENT; } /* We're done */
2009 Mar 06
0
[PATCH 1/2] COM32/opendir: remove unneeded zeroing
.../lib/opendir.c b/com32/lib/opendir.c index 5129273..fe2ee2e 100644 --- a/com32/lib/opendir.c +++ b/com32/lib/opendir.c @@ -44,8 +44,6 @@ DIR *opendir(const char *pathname) strcpy(newdir->dd_name, pathname); newdir->dd_fd = regs.esi.w[0]; newdir->dd_sect = regs.eax.l; - newdir->dd_stat = 0; - errno = 0; } else { /* ENOTDIR is another but a file must exist */ errno = ENOENT;