Displaying 12 results from an estimated 12 matches for "dd_fd".
Did you mean:
dd'd
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...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 */
diff --git a/com32/include/unistd.h b/com32/include...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...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 */
diff --git a/com32/include/unistd.h b/com32/include...
2009 Mar 06
4
rosh patch
...d);
}
closedir(d);
} else if (S_ISREG(fdstat.st_mode)) {
@@ -419,8 +417,7 @@
d = opendir(filestr);
if (d != NULL) {
printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
- de = readdir(d);
- while (de != NULL) {
+ while ( de = readdir(d) ) {
filepos++;
#ifdef DO_DEBUG
// if (strlen(de->d_name) > 25) de->d_name...
2009 Mar 07
3
rosh patch V2
Here is a second version of my patch from last night.
It uses the provided ctype function isspace and does the same readdir().
I remove the rosh_issp() function. I admit to being a bit liberal with my
use of braces and spaces.
We all of the habit of knowing we can invent a more perfect wheel.
Let me know if you have any questions.
Keith
-------------- next part --------------
A non-text
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure DIR
...-by: Gene Cumm <gene.cumm at gmail.com>
---
Counted incorrectly. Depends on previous patches.
diff --git a/com32/include/dirent.h b/com32/include/dirent.h
index 5161828..a544050 100644
--- a/com32/include/dirent.h
+++ b/com32/include/dirent.h
@@ -29,6 +29,7 @@ typedef struct {
uint16_t dd_fd;
size_t dd_sect;
char dd_name[NAME_MAX + 1]; /* directory */
+ struct dirent dd_de;
} DIR;
__extern DIR *opendir(const char *);
diff --git a/com32/lib/readdir.c b/com32/lib/readdir.c
index 353b61b..c6d991c 100644
--- a/com32/lib/readdir.c
+++ b/com32/lib/readdir.c
@@ -33,21 +33,16 @@ struc...
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...+ } 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;
+ } 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
...n the string of patches
I've submitted this week
diff --git a/com32/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;
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...", ifilstr);
- printf(" :%s\n", ifilstr);
- }
- } else {
-#ifdef __COM32__
- if (filestr[strlen(filestr)-1] == SEP) {
- /* Directory */
- filepos = 0;
- d = opendir(filestr);
- if (d != NULL) {
-printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
- de = readdir(d);
- while (de != NULL) {
- filepos++;
-#ifdef DO_DEBUG
-// if (strlen(de->d_name) > 25) de->d_name[25] = 0;
- switch (de->d_mode) {
- case 16 : ty = 'D'; break;
- case 32 : ty = 'F'; break;
- default : ty = '...
2009 Feb 15
2
COM32 module: Read-Only shell
...", ifilstr);
+ printf(" :%s\n", ifilstr);
+ }
+ } else {
+#ifdef __COM32__
+ if (filestr[strlen(filestr)-1] == SEP) {
+ /* Directory */
+ filepos = 0;
+ d = opendir(filestr);
+ if (d != NULL) {
+printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
+ de = readdir(d);
+ while (de != NULL) {
+ filepos++;
+#ifdef DO_DEBUG
+// if (strlen(de->d_name) > 25) de->d_name[25] = 0;
+ switch (de->d_mode) {
+ case 16 : ty = 'D'; break;
+ case 32 : ty = 'F'; break;
+ default : ty = '...
2010 Nov 01
1
Samba 4 on osx
...: ok
Checking for dirfd : not found
Checking for declaration of dirfd : ok
Checking for member dd_fd in DIR : not found
Checking for system com_err >= 0.0.0 : not found
Checking for header com_err.h : yes
C...
2010 Oct 07
1
OSX and samba4 git
...: ok
Checking for dirfd : not found
Checking for declaration of dirfd : ok
Checking for member dd_fd in DIR : not found
Checking for system com_err >= 0.0.0 : not found
Checking for header com_err.h : yes
C...
2018 Dec 06
3
Build error while upgrading samba 4.9.3
...: yes
Checking for declaration of _res : yes
Checking for dirfd : ok
Checking for declaration of dirfd : yes
Checking for member dd_fd in DIR : no
Using in-tree heimdal kerberos defines
Checking for program krb5-config.heimdal : not found
Checking for program krb5-config : /usr/bin/krb5-config...