svn commit: r269614 - head/sys/boot/common
Marcel Moolenaar
marcel at FreeBSD.org
Tue Aug 5 23:41:40 UTC 2014
Author: marcel
Date: Tue Aug 5 23:41:40 2014
New Revision: 269614
URL: http://svnweb.freebsd.org/changeset/base/269614
Log:
In file_loadraw() print the name of the file as well as its size
so that we know what file is being loaded and how big the file
is once complete. This has ELF modules and disk images emit the
same output.
Modified:
head/sys/boot/common/module.c
Modified: head/sys/boot/common/module.c
==============================================================================
--- head/sys/boot/common/module.c Tue Aug 5 23:39:35 2014 (r269613)
+++ head/sys/boot/common/module.c Tue Aug 5 23:41:40 2014 (r269614)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/linker.h>
#include <sys/module.h>
#include <sys/queue.h>
+#include <sys/stdint.h>
#include "bootstrap.h"
@@ -387,6 +388,8 @@ file_loadraw(char *name, char *type)
if (archsw.arch_loadaddr != NULL)
loadaddr = archsw.arch_loadaddr(LOAD_RAW, name, loadaddr);
+ printf("%s ", name);
+
laddr = loadaddr;
for (;;) {
/* read in 4k chunks; size is not really important */
@@ -401,7 +404,9 @@ file_loadraw(char *name, char *type)
}
laddr += got;
}
-
+
+ printf("size=%#jx\n", (uintmax_t)(laddr - loadaddr));
+
/* Looks OK so far; create & populate control structure */
fp = file_alloc();
fp->f_name = strdup(name);
More information about the svn-src-head
mailing list