Added sub modules.
[idzebra-moved-to-github.git] / bfile / mfile.c
index 2295d11..9472a1f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: mfile.c,v 1.74 2007-01-15 15:10:14 adam Exp $
+/* $Id: mfile.c,v 1.76 2007-12-17 14:12:09 heikki Exp $
    Copyright (C) 1995-2007
    Index Data ApS
 
@@ -366,6 +366,7 @@ MFile mf_open(MFile_area ma, const char *name, int block_size, int wflag)
                 yaz_log(YLOG_WARN, "metafile %s already open", name);
                 return 0;
             }
+            break;
        }
     if (!mnew)
     {
@@ -542,6 +543,13 @@ int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf)
            {
                yaz_log(YLOG_FATAL, "mf_write: %s error (4) no more space",
                         mf->name);
+               for (dp = mf->ma->dirs; dp ; dp = dp->next) {
+                    yaz_log(YLOG_FATAL,"%s: max=" ZINT_FORMAT 
+                           " used=" ZINT_FORMAT " available=" ZINT_FORMAT, 
+                        dp->name, (zint)dp->max_bytes, 
+                        (zint)(dp->max_bytes - dp->avail_bytes), (zint)dp->avail_bytes );
+                }
+                yaz_log(YLOG_FATAL,"Adjust the limits in your zebra.cfg");
                 ret = -1;
                 goto out;
            }