summaryrefslogtreecommitdiffstats
path: root/sys-utils/readprofile.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:14 +0100
committerKarel Zak2006-12-07 00:26:14 +0100
commitd03dd60840f0a08464d5266539ad356aefe24b03 (patch)
tree0a9ad240a7a88eb6b11b152974a7a51a0df79b75 /sys-utils/readprofile.c
parentImported from util-linux-2.12pre tarball. (diff)
downloadkernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.tar.gz
kernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.tar.xz
kernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.zip
Imported from util-linux-2.12a tarball.
Diffstat (limited to 'sys-utils/readprofile.c')
-rw-r--r--sys-utils/readprofile.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index d6ce884e3..de3de946a 100644
--- a/sys-utils/readprofile.c
+++ b/sys-utils/readprofile.c
@@ -132,10 +132,11 @@ main(int argc, char **argv) {
FILE *map;
int proFd;
char *mapFile, *proFile, *mult=0;
- unsigned long len=0, add0=0, indx=1;
+ unsigned long len=0, indx=1;
+ unsigned long long add0=0;
unsigned int step;
unsigned int *buf, total, fn_len;
- unsigned long fn_add, next_add; /* current and next address */
+ unsigned long long fn_add, next_add; /* current and next address */
char fn_name[S_LEN], next_name[S_LEN]; /* current and next name */
char mode[8];
int c;
@@ -292,7 +293,7 @@ main(int argc, char **argv) {
}
while (fgets(mapline,S_LEN,map)) {
- if (sscanf(mapline,"%lx %s %s",&fn_add,mode,fn_name) != 3) {
+ if (sscanf(mapline,"%llx %s %s",&fn_add,mode,fn_name) != 3) {
fprintf(stderr,_("%s: %s(%i): wrong map line\n"),
prgname, mapFile, maplineno);
exit(1);
@@ -316,7 +317,7 @@ main(int argc, char **argv) {
while (fgets(mapline,S_LEN,map)) {
unsigned int this=0;
- if (sscanf(mapline,"%lx %s %s",&next_add,mode,next_name)!=3) {
+ if (sscanf(mapline,"%llx %s %s",&next_add,mode,next_name)!=3) {
fprintf(stderr,_("%s: %s(%i): wrong map line\n"),
prgname,mapFile, maplineno);
exit(1);
@@ -342,7 +343,7 @@ main(int argc, char **argv) {
printf ("%s:\n", fn_name);
header_printed = 1;
}
- printf ("\t%lx\t%u\n", (indx - 1)*step + add0, buf[indx]);
+ printf ("\t%llx\t%u\n", (indx - 1)*step + add0, buf[indx]);
}
this += buf[indx++];
}
@@ -355,7 +356,7 @@ main(int argc, char **argv) {
fn_len = next_add-fn_add;
if (fn_len && (this || optAll)) {
if (optVerbose)
- printf("%08lx %-40s %6i %8.4f\n", fn_add,
+ printf("%016llx %-40s %6i %8.4f\n", fn_add,
fn_name,this,this/(double)fn_len);
else
printf("%6i %-40s %8.4f\n",
@@ -368,7 +369,7 @@ main(int argc, char **argv) {
}
/* trailer */
if (optVerbose)
- printf("%08x %-40s %6i %8.4f\n",
+ printf("%016x %-40s %6i %8.4f\n",
0,"total",total,total/(double)(fn_add-add0));
else
printf("%6i %-40s %8.4f\n",