]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed several format string bugs in calls of die().
authorMartin Mares <mj@ucw.cz>
Fri, 10 Jun 2005 11:16:41 +0000 (11:16 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 10 Jun 2005 11:16:41 +0000 (11:16 +0000)
lib/qache.c

index 4fb00e7fe55c92776e5f64863fcfe6adf74d1ced..a973be458a5d88f15fd6177bdfb14efdedc95eba 100644 (file)
@@ -371,7 +371,7 @@ qache_create(struct qache *q, struct qache_params *par)
   log(L_INFO, "Cache %s: created (%d bytes, %d slots, %d buckets)", q->file_name, par->cache_size, h.max_entries, h.hash_size);
 
   if ((q->mmap_data = mmap(NULL, par->cache_size, PROT_READ | PROT_WRITE, MAP_SHARED, q->fd, 0)) == MAP_FAILED)
-    die("Cache %s: mmap failed (%m)", par->cache_size);
+    die("Cache %s: mmap failed (%m)", par->file_name);
   q->file_size = par->cache_size;
   qache_setup_pointers(q);
 }
@@ -388,7 +388,7 @@ qache_open(struct qache_params *par)
   if (par->force_reset <= 0 && qache_open_existing(q, par))
     ;
   else if (par->force_reset < 0)
-    die("Cache %s: read-only access requested, but no data available");
+    die("Cache %s: read-only access requested, but no data available", q->file_name);
   else
     qache_create(q, par);
   return q;