Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 23:41:40 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269614 - head/sys/boot/common
Message-ID:  <53e16bb4.5eeb.2ac18d4c@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e16bb4.5eeb.2ac18d4c>