readahead-analyze.c revision 87ce22cc0d097d9cd0297d0141eadba6c573c299
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2012 Auke Kok <auke-jan.h.kok@intel.com>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <inttypes.h>
#include <string.h>
#include "readahead-common.h"
int main_analyze(const char *pack_path)
{
char line[1024];
int a;
int missing = 0;
long tsize = 0;
uint32_t b;
uint32_t c;
int pagesize = getpagesize();
if (!pack_path)
pack_path = "/.readahead";
if (!pack) {
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
while(true) {
int pages = 0;
int sections = 0;
break; /* done */
return EXIT_FAILURE;
}
while (true) {
return EXIT_FAILURE;
}
if ((b == 0) && (c == 0))
break;
/* Uncomment this to get all the chunks separately
fprintf(stdout, " %d: %d %d\n", sections, b, c);
*/
pages += (c - b);
sections++;
}
if (sections == 0)
else
(unsigned long)size,
path);
} else {
"???",
path);
missing++;
}
}
return EXIT_SUCCESS;
}