Hello community, here is the log from the commit of package lilo checked in at Thu Oct 16 01:43:32 CEST 2008. -------- --- arch/i386/lilo/lilo.changes 2008-10-09 11:46:13.000000000 +0200 +++ /d/STABLE/lilo/lilo.changes 2008-10-15 12:32:46.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Oct 15 11:01:51 CEST 2008 - olh@suse.de + +- print some system info in yaboot on startup + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yaboot-22.8-r1151.tar.bz2 New: ---- yaboot-22.8-r1156.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lilo.spec ++++++ --- /var/tmp/diff_new_pack.Vg2040/_old 2008-10-16 01:43:01.000000000 +0200 +++ /var/tmp/diff_new_pack.Vg2040/_new 2008-10-16 01:43:01.000000000 +0200 @@ -21,7 +21,7 @@ Name: lilo ExclusiveArch: ppc ppc64 %ix86 x86_64 -%define yaboot_vers 22.8-r1151 +%define yaboot_vers 22.8-r1156 Group: System/Boot License: BSD 3-Clause Summary: The Linux Loader, a Boot Menu @@ -50,14 +50,14 @@ BuildRequires: gcc-32bit glibc-devel-32bit libgcc42-32bit libmudflap42-32bit %endif Version: 22.8 -Release: 30 +Release: 31 Source0: lilo-ppc-%{version}.tar.bz2 Source1: http://penguinppc.org/projects/yaboot/yaboot-%{yaboot_vers}.tar.bz2 Source86: lilo-%{version}.src.tar.bz2 Patch8601: lilo.x86.mount_by_persistent_name.patch Patch8602: lilo.x86.array-bounds.patch Patch8603: lilo.x86.division-by-zero.patch -# $Id: lilo.spec 1152 2008-10-09 09:46:13Z olh $ +# $Id: lilo.spec 1153 2008-10-09 11:55:20Z olh $ %description LILO boots Linux from your hard drive. It can also boot other operating @@ -214,6 +214,8 @@ %endif %doc %{_mandir}/*/* %changelog +* Wed Oct 15 2008 olh@suse.de +- print some system info in yaboot on startup * Thu Oct 09 2008 olh@suse.de - Avoid a division by zero on buggy BIOS (bnc#429544) * Thu Oct 09 2008 olh@suse.de ++++++ lilo-ppc-22.8.tar.bz2 ++++++ ++++++ yaboot-22.8-r1151.tar.bz2 -> yaboot-22.8-r1156.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1151/Changelog.SuSE new/yaboot-22.8-r1156/Changelog.SuSE --- old/yaboot-22.8-r1151/Changelog.SuSE 2008-10-09 10:06:27.000000000 +0200 +++ new/yaboot-22.8-r1156/Changelog.SuSE 2008-10-15 12:32:46.000000000 +0200 @@ -1,4 +1,24 @@ ------------------------------------------------------------------------ +r1156 | olh | 2008-10-15 10:32:46 +0000 (Wed, 15 Oct 2008) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/yaboot.c + ++- print some system info in yaboot on startup + +------------------------------------------------------------------------ +r1155 | olh | 2008-10-15 10:30:35 +0000 (Wed, 15 Oct 2008) | 1 line +Changed paths: + M /trunk/yaboot/lib/vsprintf.c + +add strncat +------------------------------------------------------------------------ +r1154 | olh | 2008-10-15 07:39:14 +0000 (Wed, 15 Oct 2008) | 1 line +Changed paths: + M /trunk/yaboot/Makefile + +addnote depends on addnote.c +------------------------------------------------------------------------ r1151 | olh | 2008-10-09 08:06:27 +0000 (Thu, 09 Oct 2008) | 3 lines Changed paths: M /trunk/lilo.changes diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1151/lib/vsprintf.c new/yaboot-22.8-r1156/lib/vsprintf.c --- old/yaboot-22.8-r1151/lib/vsprintf.c 2006-08-18 14:11:45.000000000 +0200 +++ new/yaboot-22.8-r1156/lib/vsprintf.c 2008-10-15 12:30:35.000000000 +0200 @@ -398,3 +398,25 @@ va_end(args); return i; } + +char *strncat(char *dest, const char *src, size_t n) +{ + char *p; + size_t i; + + if (n) { + p = dest + strlen(dest); + i = 0; + do { + if (*src) { + *p = *src; + src++; + p++; + i++; + } else + break; + } while (i < n); + p[1] = '\0'; + } + return dest; +} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1151/Makefile new/yaboot-22.8-r1156/Makefile --- old/yaboot-22.8-r1151/Makefile 2008-10-08 10:21:57.000000000 +0200 +++ new/yaboot-22.8-r1156/Makefile 2008-10-15 09:39:14.000000000 +0200 @@ -6,7 +6,7 @@ include Config -VERSION = 22.8-r1151 +VERSION = 22.8-r1156 # Debug mode (spam/verbose) DEBUG = 0 # make install vars @@ -186,7 +186,7 @@ util/split_of_path: util/split_of_path.c second/parse_device_path.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $@.c -util/addnote: +util/addnote: util/addnote.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $@.c util/elfextract: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1151/second/yaboot.c new/yaboot-22.8-r1156/second/yaboot.c --- old/yaboot-22.8-r1151/second/yaboot.c 2008-10-09 10:06:27.000000000 +0200 +++ new/yaboot-22.8-r1156/second/yaboot.c 2008-10-15 12:32:46.000000000 +0200 @@ -1167,6 +1167,60 @@ } } +static char sysinfo[234]; +static const char si_model[] = "model"; +static const char si_serial[] = "serial-number"; +static const char si_systemid[] = "system-id"; +static const char si_partition_name[] = "ibm,partition-name"; + +static int append_system_info(const char *node, const char *prop, char *s, size_t size, int off, const char *ident, int last, int mac_serial) +{ + char buf[32], *p; + int len, num; + + len = prom_getprop(prom_finddevice(node), prop, buf, sizeof(buf) - 1); + if (len > 0 && len < sizeof(buf)) { + if (last) { + strncat(s, ",", size - off); + off = strlen(s); + } + strncat(s, " ", size - off); + off = strlen(s); + strncat(s, ident, size - off); + off = strlen(s); + strncat(s, " '", size - off); + off = strlen(s); + p = buf; + if (mac_serial) { + num = 10; + while (num) { + p = p + strlen(p); + num--; + p++; /* skip null byte */ + } + } + strncat(s, p, size - off); + off = strlen(s); + strncat(s, "'", size - off); + off = strlen(s); + } + return off; +} +static void get_system_info(char *s, size_t size) +{ + int off; + + sprintf(s, "running"); + off = strlen(s); + off = append_system_info("/openprom", si_model, s, size, off, "with firmware", 0, 0); + off = append_system_info("/", si_model, s, size, off, "on model", 0, 0); + if (prom_getproplen(prom_finddevice("/"), si_serial) > 0) + off = append_system_info("/", si_serial, s, size, off, "serial", 1, 1); + else + off = append_system_info("/", si_systemid, s, size, off, "serial", 1, 0); + off = append_system_info("/", si_partition_name, s, size, off, "partition", 1, 0); +} + static void yaboot_main(void) { char *bootpath = NULL, *bootargs = NULL; @@ -1240,8 +1294,10 @@ process_configfile(); free(conf_file_buf); + get_system_info(sysinfo, sizeof(sysinfo) - 1); prom_printf("Welcome to yaboot version " VERSION "\n"); prom_printf("booted from '%s'\n", bootpath); + prom_printf("%s\n", sysinfo); if (configfile && sz > 0) prom_printf("Using configfile '%s'\n", configfile); prom_printf("Enter \"help\" to get some basic usage information\n"); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org