]> git.pond.sub.org Git - empserver/commitdiff
Fix ef_open()'s error message for file larger than static cache
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 27 Apr 2011 17:44:26 +0000 (19:44 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jun 2011 14:50:05 +0000 (16:50 +0200)
The message claims the file is larger than it actually is.  Broken
since commit 71908018 (v4.3.0) implemented static cache in ef_open().
Harmless, because no file-backed table has a statically allocated
cache.

src/lib/common/file.c

index 9da797c4c61230ba945fcfb85179c5f4c9f56a10..817201aab06654545466549aaf2c55b3050b004d 100644 (file)
@@ -117,8 +117,8 @@ ef_open(int type, int how, int nelt)
        /* ep->cache already points to space for ep->csize elements */
        if (how & EFF_MEM) {
            if (ep->fids > ep->csize) {
-               logerror("Can't open %s: file larger than %d bytes",
-                        ep->file, ep->fids * ep->size);
+               logerror("Can't open %s (file larger than %d records)",
+                        ep->file, ep->csize);
                close(fd);
                return 0;
            }