On Mon, Aug 31, 2009 at 02:01:37PM +0200, Tino Keitel wrote:
[snip]
> Just a wild guess: I use XFS. From my experience, data like
> struct dirent->d_type isn't filled by readdir() with XFS. This is
> correct since it isn't required according to POSIX. However, as dma
> comes from the BSD world, this may be a portability issue.

Right; you may have hit it here!

Could you try rebuilding the dma package from source with
the attached patch dropped into the debian/patches/ directory and
its name added to the end of the debian/patches/series file?
If you don't have a build environment set up, I could try to build
it inside a qemu virtual machine or something.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net    r...@space.bg    r...@freebsd.org
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
When you are not looking at it, this sentence is in Spanish.
Cater to XFS's weirdness - handle the case when a dirent's d_type
field is not filled in by doing an extra stat().

Debian:         #544357

--- a/dma.c
+++ b/dma.c
@@ -1416,10 +1416,20 @@
 
                /* ignore temp files */
                if (strncmp(de->d_name, "tmp_", 4) == 0 ||
-                   de->d_type != DT_REG)
+                   (de->d_type != DT_REG && de->d_type != DT_UNKNOWN))
                        continue;
                if (asprintf(&queuefn, "%s/%s", config->spooldir, de->d_name) < 
0)
                        goto fail;
+               if (de->d_type == DT_UNKNOWN) {
+                       if (stat(queuefn, &st) == -1) {
+                               free(queuefn);
+                               goto fail;
+                       }
+                       if (!S_ISREG(st.st_mode)) {
+                               free(queuefn);
+                               continue;
+                       }
+               }
                seenit = seen(de->d_name);
                if (inmore && seenit) {
                        free(queuefn);

Attachment: pgpGeVF1Ie1Lh.pgp
Description: PGP signature

Reply via email to