~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to src/fs/ufs/store_dir_ufs.cc

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
void
72
72
UFSSwapDir::parseSizeL1L2()
73
73
{
74
 
    int i;
75
 
    int size;
76
 
 
77
 
    i = GetInteger();
78
 
    size = i << 10;             /* Mbytes to kbytes */
79
 
 
80
 
    if (size <= 0)
 
74
    int i = GetInteger();
 
75
    if (i <= 0)
81
76
        fatal("UFSSwapDir::parseSizeL1L2: invalid size value");
82
77
 
 
78
    size_t size = i << 10;              /* Mbytes to kbytes */
 
79
 
83
80
    /* just reconfigure it */
84
81
    if (reconfiguring) {
85
82
        if (size == max_size)
314
311
    int x;
315
312
    storeAppendPrintf(&sentry, "First level subdirectories: %d\n", l1);
316
313
    storeAppendPrintf(&sentry, "Second level subdirectories: %d\n", l2);
317
 
    storeAppendPrintf(&sentry, "Maximum Size: %d KB\n", max_size);
318
 
    storeAppendPrintf(&sentry, "Current Size: %d KB\n", cur_size);
 
314
    storeAppendPrintf(&sentry, "Maximum Size: %"PRIu64" KB\n", max_size);
 
315
    storeAppendPrintf(&sentry, "Current Size: %"PRIu64" KB\n", cur_size);
319
316
    storeAppendPrintf(&sentry, "Percent Used: %0.2f%%\n",
320
 
                      100.0 * cur_size / max_size);
 
317
                      (double)(100.0 * cur_size) / (double)max_size);
321
318
    storeAppendPrintf(&sentry, "Filemap bits in use: %d of %d (%d%%)\n",
322
319
                      map->n_files_in_map, map->max_n_files,
323
320
                      Math::intPercent(map->n_files_in_map, map->max_n_files));
380
377
    walker = repl->PurgeInit(repl, max_scan);
381
378
 
382
379
    while (1) {
383
 
        if (cur_size < (int) minSize()) /* cur_size should be unsigned */
 
380
        if (cur_size < minSize())
384
381
            break;
385
382
 
386
383
        if (removed >= max_remove)
1325
1322
void
1326
1323
UFSSwapDir::dump(StoreEntry & entry) const
1327
1324
{
1328
 
    storeAppendPrintf(&entry, " %d %d %d",
1329
 
                      max_size >> 10,
 
1325
    storeAppendPrintf(&entry, " %"PRIu64" %d %d",
 
1326
                      (max_size >> 10),
1330
1327
                      l1,
1331
1328
                      l2);
1332
1329
    dumpOptions(&entry);