/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
+ Copyright (C) 2004-2013 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/types.h>
#include <fcntl.h>
#ifdef WIN32
/*
* If no definition is given, use current directory, unlimited.
*/
- char dirname[FILENAME_MAX+1];
+ char dirname[FILENAME_MAX+1];
mf_dir **dp = &ma->dirs, *dir = *dp;
if (!ad)
\retval -1 ERROR
\retval -2 OK, but file does not created (read-only)
*/
-
+
static zint file_position(MFile mf, zint pos, int offset)
{
zint off = 0, ps;
struct dirent *dent;
int fd, number;
char metaname[FILENAME_MAX+1], tmpnam[FILENAME_MAX+1];
-
+
yaz_log(YLOG_DEBUG, "mf_init(%s)", name);
strcpy(ma->name, name);
ma->mfiles = 0;
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,
+ 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");
yaz_log(YLOG_FATAL, "mf_write: %s error (5)", mf->name);
ret = -1;
goto out;
- }
+ }
}
else
{
return ret;
}
-/** \brief metafile area statistics
+/** \brief metafile area statistics
\param ma metafile area handle
\param no area number (0=first, 1=second, ..)
\param directory holds directory upon completion (if non-NULL)
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab