From: Ben Gras Date: Tue, 20 Dec 2005 14:38:14 +0000 (+0000) Subject: Moved the print statement till after the K_CLAIM flag check after X-Git-Tag: v3.1.2a~467 X-Git-Url: http://zhaoyanbai.com/repos/man.delv.html?a=commitdiff_plain;h=cccd4e01c5477982cf704f5ebeb4bfca81aa0ee3;p=minix.git Moved the print statement till after the K_CLAIM flag check after this bug report (snippet): > From: "Christos Karayiannis" > To: > Date: Tue, 20 Dec 2005 16:22:49 +0200 > Subject: bootimage.c > > Hi, > > at exec_image() of bootimage.c the a_bss and a_stack are printed with > some values and then, if the K_CLAIM flag is set, they become zero. But > this is then wrong information. --- diff --git a/boot/bootimage.c b/boot/bootimage.c index 0432ee668..4e201e608 100755 --- a/boot/bootimage.c +++ b/boot/bootimage.c @@ -500,6 +500,12 @@ void exec_image(char *image) a_data+= a_text; } + /* Read the data segment. */ + if (!get_segment(&vsec, &a_data, &addr, limit)) return; + + /* Make space for bss and stack unless... */ + if (i != KERNEL && (k_flags & K_CLAIM)) a_bss= a_stack= 0; + printf("%07lx %07lx %8ld %8ld %8ld", procp->cs, procp->ds, hdr.process.a_text, hdr.process.a_data, @@ -509,12 +515,6 @@ void exec_image(char *image) printf(" %s\n", hdr.name); - /* Read the data segment. */ - if (!get_segment(&vsec, &a_data, &addr, limit)) return; - - /* Make space for bss and stack unless... */ - if (i != KERNEL && (k_flags & K_CLAIM)) a_bss= a_stack= 0; - /* Note that a_data may be negative now, but we can look at it * as -a_data bss bytes. */