debian/0000755000000000000000000000000012242141121007154 5ustar debian/copyright.dep50000644000000000000000000001735412166271153011773 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: linuxinfo Upstream-Contact: Source: http://www.munted.org.uk/programming/ Files: * Copyright: 1998-2002, Alex Buell License: GPL-2 or LGPL-2 The entire code base may be distributed under the terms of the GNU General Public License (GPL), which appears immediately below. Alternatively, all of the source code in the clock distribution as well as any code derived from that code may instead be distributed under the GNU Library General Public License (LGPL), at the choice of the distributor. The complete text of the LGPL appears at the bottom of this file. . Any questions regarding the licensing of LinuxInfo should be addressed to alex.buell@munted.org.uk . On Debian systems, the full text of the GNU (Library) General Public License version 2 can be found in the files /usr/share/common-licenses/(GPL-2|LGPL-2) Files: debian/* Copyright: 1998,1999,2006 Erick Kinnee 2001 Brian Russo 2002,2003 Ola Lundqvist 2004-2011 Helge Kreutzmann License: PDLIKE1 Copying and distribution of this package, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Files: debian/watch Copyright: 2012 Bart Martens License: FIXME FIXME Files: aclocal.m4 Copyright: 1994-1999, Free Software Foundation, Inc. 1998, Johnny Tevessen License: PDLIKE2 This file is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Files: configure configure.in Copyright: 1992-1996, Free Software Foundation, Inc. 1998, Johnny Tevessen License: PDLIKE3 This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Files: COPYING Copyright: 1989, 1991, Free Software Foundation, Inc. 1998-2002, Alex Buell License: RESTRICTED Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Files: INSTALL Copyright: FIXME License: FIXME Files: install-sh Copyright: 1991, Massachusetts Institute of Technology License: MIT Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Files: linuxinfo.c Copyright: 1998-2002, Alex Buell Vince Weaver License: GPL-2 or LGPL-2 The entire code base may be distributed under the terms of the GNU General Public License (GPL), which appears immediately below. Alternatively, all of the source code in the clock distribution as well as any code derived from that code may instead be distributed under the GNU Library General Public License (LGPL), at the choice of the distributor. The complete text of the LGPL appears at the bottom of this file. Any questions regarding the licensing of LinuxInfo should be addressed to alex.buell@munted.org.uk On Debian systems, the full text of the GNU (Library) General Public License version 2 can be found in the files /usr/share/common-licenses/(GPL-2|LGPL-2) Files: Makefile.in Copyright: 1994-1999 Free Software Foundation, Inc. 1998-2002, Alex Buell License: PDLIKE2 This Makefile.in is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Files: missing Copyright: 1996, 1997, Free Software Foundation, Inc. 1996, Franc,ois Pinard License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. On Debian systems, the full text of the GNU General Public License version 2 can be found in the files /usr/share/common-licenses/GPL-2 Files: mkinstalldirs Copyright: 1993, Noah Friedman License: public-domain Files: debian/patches/01_infrastructure debian/patches/11_hppa-support debian/patches/12_ia64-support debian/patches/18_sparc_update debian/patches/22_update_x86 Copyright: 2002,2003, Ola Lundqvist 2004-2011, Helge Kreutzmann License: FIXME Files: debian/patches/02_manpages-fixes debian/patches/03_german-manpage debian/patches/04_README debian/patches/14_m68k-fixes debian/patches/15_mips-support debian/patches/17_alpha_smp_support debian/patches/19_ppc-without_bogomips debian/patches/20_highmem debian/patches/23_arm-fixes debian/patches/resourceleak.diff Copyright: 2004-2011, Helge Kreutzmann License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file /usr/share/common-licenses/GPL-2 Files: debian/patches/10_linuxinfo-option-handling Copyright: Erick Kinnee 2005-2006, Helge Kreutzmann License: FIXME Files: debian/patches/16_s390-support Copyright: Gerhard Tonn Helge Kreutzmann License: FIXME Files: debian/patches/24_sh4-support Copyright: 2010, Nobuhiro Iwamatsu License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file /usr/share/common-licenses/GPL-2 Files: debian/patches/25_avr32-support Copyright: 2010, Nobuhiro Iwamatsu 2010, Helge Kreutzmann License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file /usr/share/common-licenses/GPL-2 debian/changelog0000644000000000000000000004313512242141121011034 0ustar linuxinfo (1.1.8-44) unstable; urgency=low * Fix control file for autopkgtest. Thanks to Jean-Baptiste Lallement. Closes: #729780. -- Helge Kreutzmann Sun, 17 Nov 2013 13:33:08 +0100 linuxinfo (1.1.8-43) unstable; urgency=low * Update to standards version 3.9.5 (no change required). * Add another Xeon. -- Helge Kreutzmann Thu, 14 Nov 2013 21:01:09 +0100 linuxinfo (1.1.8-42) experimental; urgency=low * Always parse /proc/meminfo. Closes: #709927. * Add a first autpkgtest -- Helge Kreutzmann Sat, 28 Sep 2013 16:20:55 +0200 linuxinfo (1.1.8-41) unstable; urgency=low * Add the first Athlon 62 X2 * Add watch file, thanks Bart Martens * Add headers to resourceleak.diff. -- Helge Kreutzmann Sat, 28 Sep 2013 16:11:41 +0200 linuxinfo (1.1.8-40) unstable; urgency=low * Continue work on machine parsable copyright * Use Xz compression * Remove DM-Allowed due to new Debian Maintainer mechanism * Simplify debian/rules a little * Update to standards version 3.9.4 (no change required). * Switch debian/compat to 9 -- Helge Kreutzmann Sun, 03 Mar 2013 14:15:14 +0100 linuxinfo (1.1.8-39) unstable; urgency=low * Continue work on machine parsable copyright * Update to standards version 3.9.3 (no change required). -- Helge Kreutzmann Sat, 25 Feb 2012 18:05:56 +0100 linuxinfo (1.1.8-38) unstable; urgency=low * Continue work on machine parsable copyright -- Helge Kreutzmann Wed, 16 Nov 2011 18:26:37 +0100 linuxinfo (1.1.8-37) unstable; urgency=low * Add another Xeon, now reporting the correct on vask.debian.org * Switch to debhelper V8 * As #544844 is closed, further simplify debian/rules (and update dependency on debhelper to the closed version) * Clarify upstream copyright (it is GPL v2 | LGPL v2, distributed by Debian under GPL v2) * Add first draft of machine parsable copyright -- Helge Kreutzmann Fri, 04 Nov 2011 14:49:32 +0100 linuxinfo (1.1.8-36) unstable; urgency=low * Add first Phenom II CPU * Update to standards version 3.9.2 (no change required). -- Helge Kreutzmann Mon, 25 Jul 2011 18:46:17 +0200 linuxinfo (1.1.8-35) unstable; urgency=low * Fix resource leak found by DACA/cppcheck. * Update to standards version 3.9.1 (no change required). * Update copyright for 2011. -- Helge Kreutzmann Tue, 04 Jan 2011 12:14:25 +0100 linuxinfo (1.1.8-34) unstable; urgency=low * Update to standards version 3.9.0, and switch to using linux-any as architecture. Update NEWS.Debian to reflect this. * Fix various spelling errors. -- Helge Kreutzmann Wed, 30 Jun 2010 17:29:53 +0200 linuxinfo (1.1.8-33) unstable; urgency=low * Rename NEWS.Debian to NEWS to actually get it installed into the binary deb. -- Helge Kreutzmann Sat, 19 Jun 2010 16:09:38 +0200 linuxinfo (1.1.8-32) unstable; urgency=low * Using an uptodate dpkg, add powerpcspe and sparc64 to architecture list. Since I don't have access to those machines, I'd be glad if to know if linuxinfo complies and works on these architectures. * Add NEWS.Debian, requesting help on rare / new architectures -- Helge Kreutzmann Tue, 25 May 2010 18:51:25 +0200 linuxinfo (1.1.8-31) unstable; urgency=low * Fix build on sh4. Thanks to Nobuhiro Iwamatsu for the patch. This closes: #573248. * Try to get ./configure policy compliant (including noopt and friends) (cf. #544844 for details). -- Helge Kreutzmann Wed, 10 Mar 2010 19:20:45 +0100 linuxinfo (1.1.8-30) unstable; urgency=low * Add initial avr32 port. Since I've no access to such a machine I would be glad for feedback. * Remove lpia from Architecture list as Ubuntu apparently no longer supports this arch (though technically speaking it should be still possible to port linuxinfo to it, I'll accept patches). * Switch to debhelper V7, no change required. * Use dh, greatly simplifying debian/rules. * Include workaround for #544844 which I found by chance. -- Helge Kreutzmann Sun, 28 Feb 2010 18:12:23 +0100 linuxinfo (1.1.8-29) unstable; urgency=low * Add new architecture (SH), big thanks to Nobuhiro Iwamatsu for the patch! This Closes: #567908. The submitter has access to sh4 machines only, so if you own a different model I'd be glad to hear about the results. * Update to standards version 3.8.4 (no change required). * Update copyright for 2010. * Switch to Debian Source Format V3; this implies a switch from dpatch to quilt based patches. * Implement DEP-3: Patch Tagging Guidelines * Since the inclusion of kfreebsd variants Architecture: any no longer is correct (it also neglects Debian ports like Nexenta). The value of linux-any is not (yet) support (cf. #530687) so replace "any" by the explicit list of architectures produced by dpkg-architecture -L|grep -v solaris|grep -v openbsd|grep -v freebsd|grep -v netbsd|grep -v darwin|grep -v hurd|grep -v uclinux|grep -v uclibc The uclinux- and uclibc- variants should probably be included also, but to keep the Architecture line sane (and hoping for linux-any soon) they are for now ignored. Thanks to Chow Loong Jin and Andres Mejia for the hints. * Add ${misc:Depends} to Depends: to please lintian. -- Helge Kreutzmann Wed, 03 Feb 2010 18:41:49 +0100 linuxinfo (1.1.8-28) unstable; urgency=low * Add another Core Duo CPU. -- Helge Kreutzmann Fri, 05 Jun 2009 17:17:44 +0200 linuxinfo (1.1.8-27) unstable; urgency=low * Add another Xeon CPU (addresses #529349). * Update to standards version 3.8.1 (no change required). * On some (custom?) kernels the value used for switching to /proc/meminfo seems to differ. For now include the newly found values, a proper fix should be added later. This hopefully Closes: #529349 (The submitter blacklisted my e-mail address, hence please reopen if it is not fixed) -- Helge Kreutzmann Sun, 24 May 2009 12:10:04 +0200 linuxinfo (1.1.8-26) unstable; urgency=low * Add Core Solo CPU. * Updated year of copyright -- Helge Kreutzmann Thu, 19 Mar 2009 19:10:58 +0100 linuxinfo (1.1.8-25) unstable; urgency=low * Explicitly mention all copyright holders in debian/copyright in the form requested by lintian * Add README.source, with this update to standards version 3.8.0 * Set DM-Upload-Allowed: yes -- Helge Kreutzmann Mon, 23 Jun 2008 19:25:31 +0200 linuxinfo (1.1.8-24) unstable; urgency=low * Add one Core 2 and two more Pentium 4. * Update policy to 3.7.3.0, no changes required. -- Helge Kreutzmann Sun, 03 Feb 2008 07:53:00 +0100 linuxinfo (1.1.8-23) unstable; urgency=low * Add another Xeon CPU (Closes: 435360) * Don't trust /proc/kcore sizes >\approx 4 GB on x86 machines (Closes: 435361) -- Helge Kreutzmann Fri, 10 Aug 2007 21:12:00 +0200 linuxinfo (1.1.8-22) unstable; urgency=low * Add a Geode CPU by AMD and distinguish between AMD and Nat. Sem. ones * Do not ignore errors in "make clean" * No longer specify "DH_COMPAT=5" in debian/rules -- Helge Kreutzmann Mon, 30 Jul 2007 19:51:14 +0200 linuxinfo (1.1.8-21) unstable; urgency=low * Added the Sparc Niagra (Closes: 393584) * Bump standards version (no changes required) -- Helge Kreutzmann Tue, 17 Oct 2006 18:38:41 +0200 linuxinfo (1.1.8-20) unstable; urgency=low * Add some more x86/x86_64 machines (Closes: 379481) * Support more than 9 CPUs, starting with 13 a number is printed instead of a string (Closes: 379488) * Bail out immediately if /proc/cpuinfo is not readable (Closes: 379484) -- Helge Kreutzmann Sun, 30 Jul 2006 14:27:58 +0200 linuxinfo (1.1.8-19) unstable; urgency=low * Add two more sparc machines and do not use /proc/kcore on sparc as well * Update my email address in more places * Update to latest standard version (no changes required) * Fix a typo in the Sparc output (Closes: #379351) -- Helge Kreutzmann Sun, 23 Jul 2006 11:54:06 +0200 linuxinfo (1.1.8-18) unstable; urgency=low * Use my new E-Mail address also in the control files. * Add another Sempron, Closes: #362770 -- Helge Kreutzmann Sun, 23 Apr 2006 14:57:44 +0000 linuxinfo (1.1.8-17) unstable; urgency=low * The layout of the RAM is non-trivial on MIPS as well, so the size of /proc/kcore reflects the highest memory address, not necessarily identically to the amount of RAM, so always use /proc/meminfo here, Closes: #355908 Thanks to Thiemo Seufer for the explanation. * Do not look for endianess on mips, its deprecated. Thanks to Martin Michlmayr for noticing and explanation. * Use my new E-Mail address -- Helge Kreutzmann Sun, 9 Apr 2006 15:27:53 +0000 linuxinfo (1.1.8-16) unstable; urgency=low * Update to debhelper level 5 * Add the first semperon to the known CPUs * Fix memory reporting on s390 (updated 16_s390-support.dpatch) Thanks to Frans Pop for helping me. * Remove superfluous space on big endian MIPS (addresses #355908) Memory reporting is still broken on these machines. -- Helge Kreutzmann Wed, 15 Mar 2006 20:55:03 +0100 linuxinfo (1.1.8-15) unstable; urgency=low * Even x86 / amd64 miss , fixed. * Update dependency on debhelper to say ">= 4" * Include more information in bug reports to avoid asking the same question each time * Clarify that I maintain linuxinfo (Ola hasn't supplied anything since I took over maintenance) -- Helge Kreutzmann Sun, 12 Feb 2006 08:44:10 +0100 linuxinfo (1.1.8-14) unstable; urgency=low * Update to debhelper level 4 * Add a Celeron M CPU * Almost all arches (except sparc) did not include . Now even arm has a patch (23_arm-fixes.dpatch). Hopefully no warnings occur at compile-time anymore now. -- Helge Kreutzmann Fri, 18 Nov 2005 18:10:50 +0100 linuxinfo (1.1.8-13) unstable; urgency=low * Update upstream's URL also in upstream's README (04_README.dpatch) * Fix output of CPU on ppc (fixing 19_ppc-without_bogomips.dpatch) * Add one more Pentium4 cpu * Upgrade to policy 3.6.2.0 (no changes required) -- Helge Kreutzmann Sun, 6 Nov 2005 11:38:16 +0100 linuxinfo (1.1.8-12) unstable; urgency=low * Add one more pentium4 machine * Improve regular expression for highmem detection (needed for some 2.4) -- Helge Kreutzmann Tue, 12 Apr 2005 15:07:22 +0200 linuxinfo (1.1.8-11) unstable; urgency=medium * Remove one debug statement on ia64 * Fix memory detection on highmem system (the original size is already in kB, not in B as assumed previously) * On ia64 memory may be discontinous, hence we cannot trust /proc/kcore's size, always use alternate method. -- Helge Kreutzmann Tue, 22 Mar 2005 12:54:04 +0100 linuxinfo (1.1.8-10) unstable; urgency=low * HPPA: Print CPU type and try to get memory size. * IA64: For now always use family as model (improve later) and try to get memory size. * Sparc: 18_sparc_update.dpatch (new): Add one more model and add an alternate way to determine Bogomips value * PPC: 19_ppc-without_bogomips.dpatch (new): Since some ppc machines do not print bogomips the cpu counting had to be switched to the cpu-field. Again thanks to all who provided me their machine infos. * Added a new contact address of upstream. -- Helge Kreutzmann Fri, 18 Mar 2005 19:10:41 +0100 linuxinfo (1.1.8-9) unstable; urgency=low * Join 13_x86-add-detection.dpatch and 21_model-detection_fix.dpatch since they both operate on the same file. * Add lots of amd64 machines (thanks all those who sent me their info) -- Helge Kreutzmann Wed, 23 Feb 2005 16:14:48 +0100 linuxinfo (1.1.8-8) unstable; urgency=low * Support highmem (on x86 at least) by reading /proc/meminfo. This tends to be a few MB too low, though. Closes: #258997. * Support SMP machines on the alpha architecture (at least the one I have access to). * Add more machines (grouped now in 13_x86-add-detection.dpatch) * Fix miss-detection of Pentium MMX as Xeon. -- Helge Kreutzmann Mon, 9 Aug 2004 20:27:33 +0200 linuxinfo (1.1.8-7) unstable; urgency=low * Make dependency on debhelper versioned. * Add Pentium M. Thanks to Martin Michlmayr for the patch. Closes: #258996. -- Helge Kreutzmann Mon, 26 Jul 2004 21:47:39 +0200 linuxinfo (1.1.8-6) unstable; urgency=low * Convert to dpatch, remove old broken patch-system in sources. * Support DEB_BUILD_OPTIONS: noopt * Build with -g by default. * Corrected a few typos in comments. * Corrected spelling in german man page. * Add support for amd64 as special case of Intel. Thanks to Andreas Jochens for the information. Closes: #254504. * Fixed section to match overrides. -- Helge Kreutzmann Sun, 11 Jul 2004 17:09:07 +0200 linuxinfo (1.1.8-5) unstable; urgency=low * New maintainer; Ola Lundqvist remains uploader. * Added mips, closes: #243519. As I do not own a mips based machine, please report incorrect information (with an attached output of /proc/cpuinfo). * Extend man page, closes: #178414 and #205971. * Fix display on m68k, closes: #222762. * Follow latest policy 3.6.1.0 (no changes required). * Add german translation of man page. * Support DEB_BUILD_OPTIONS: nostrip * Mark debian/patches as unmaintained. -- Helge Kreutzmann Sat, 29 May 2004 22:26:43 +0200 linuxinfo (1.1.8-4) unstable; urgency=low * Fixed build issue. Directory SGID, closes: #245602. -- Ola Lundqvist Thu, 6 May 2004 07:39:55 +0200 linuxinfo (1.1.8-3) unstable; urgency=low * Fixed build problem on s390, closes: #199438. * Updated upstream homepage. * Updated standards version from 3.5.8 to 3.5.10. -- Ola Lundqvist Sat, 16 Aug 2003 16:27:33 +0200 linuxinfo (1.1.8-2) unstable; urgency=low * Fix to make it work on ia64, closes: #105023. * Fixed some lintian warnings about wrong mode on directories. * Removed postinst and preinst files that set the FHS doc symlink. * Fixed unsupported option, closes: #178417. Thanks to Helge Kreutzmann for the patch. * Now mention /proc/cpuinfo, closes: #178413. * Added Athlon XP patch from Brian Almeida , closes: #186396. -- Ola Lundqvist Thu, 17 Apr 2003 16:22:01 +0200 linuxinfo (1.1.8-1) unstable; urgency=low * New maintainer, closes: #174115, #129255. * New upstream version. * Updated standards version from 3.5.2.0 to 3.5.8. * Removed full stop from Description line. * Added config section in rules file to make rebuild faster. * New line in descriotion so it do not exceed 80 chars, closes: #131005, #125678. * Created patch for hppa and applied patch for ia64, closes: #105023. -- Ola Lundqvist Wed, 25 Dec 2002 19:12:12 +0100 linuxinfo (1.1.7-2.1) unstable; urgency=low * Non-maintainer upload * Add support for s390. (Closes: #129255) -- Gerhard Tonn Tue, 29 Jan 2002 06:44:31 +0100 linuxinfo (1.1.7-2) unstable; urgency=low * Fixed m68k define, (Closes: #93005) -- Brian Russo Fri, 6 Apr 2001 07:35:52 -1000 linuxinfo (1.1.7-1) unstable; urgency=low * New uptream version. * New maintainer (Closes: #92256) * Removed README.Debian, unnecessary. * Fixed manpage so it displays properly. * Use debhelper less. * FHS-compliant (Closes: #89988, #91204, #91572) -- Brian Russo Wed, 4 Apr 2001 00:26:57 -1000 linuxinfo (1.1.2-1) unstable; urgency=low * New upstream version. * Going to send the diff to fix the m68k compile failure to Mr. Alex Buell ONCE AGAIN! Maybe he'll take it this time. -- Erick Kinnee Sun, 30 May 1999 16:42:41 -0500 linuxinfo (1.0.6-1) unstable; urgency=low * New upstream version. * Had to pull 1.0.4-5 due to the fact that glibc-2.1 wasn't in potato at the time. * So, here we have Linuxinfo linked against glibc-2.1. closes: #34570 -- Erick Kinnee Sun, 14 Mar 1999 20:46:59 -0600 linuxinfo (1.0.4-5) unstable; urgency=low * Compiled against glibc2.1 -- Erick Kinnee Sat, 13 Feb 1999 20:22:24 -0600 linuxinfo (1.0.4-4) unstable; urgency=low * Fixed the problem w/compile on m68k. #if defined(m68000) changed to (__m68000__) -- Erick Kinnee Mon, 14 Dec 1998 20:55:06 -0500 linuxinfo (1.0.4-3) unstable; urgency=low * Revised short and long package descriptions. -- Erick Kinnee Wed, 09 Dec 1998 21:56:28 -0500 linuxinfo (1.0.4-2) unstable; urgency=low * Fixed non-removal of 'debian/files' and 'debian/substvars'. Also removed /usr/sbin from the deb. -- Erick Kinnee Sat, 04 Dec 1998 20:57:00 -0600 linuxinfo (1.0.4-1) unstable; urgency=low * This is the initial release. More work is being done... -- Erick Kinnee Sun, 1 Nov 1998 13:09:36 -0600 debian/tests/0000755000000000000000000000000012242133535010330 5ustar debian/tests/linecount0000755000000000000000000000014412221565367012266 0ustar #!/bin/bash set -e LC=$(linuxinfo | wc -l) if [ "$LC" == 3 ]; then exit 0 else exit 1 fi debian/tests/control0000644000000000000000000000007112242133535011731 0ustar tests: linecount Depends: @, coreutils, bash debian/linuxinfo.bug-script0000644000000000000000000000025711613304601013201 0ustar #!/bin/sh echo "/proc/cpuinfo:" >&3 cat /proc/cpuinfo >&3 echo "Size of /proc/kcore:" >&3 ls -l /proc/kcore >&3 echo "" >&3 echo "/proc/meminfo:" >&3 cat /proc/meminfo >&3 debian/rules0000755000000000000000000000031712114647340010251 0ustar #!/usr/bin/make -f %: dh $@ #override_dh_auto_configure: # ./configure --prefix=/usr --mandir=\$${prefix}/share/man # #dh_auto_configure -- CFLAGS="$(CFLAGS)" override_dh_builddeb: dh_builddeb -- -Zxz debian/copyright0000644000000000000000000000315512221562004011117 0ustar This package was debianized by Erick Kinnee ekinnee1@e.net on Sun, 1 Nov 1998 13:09:36 -0600. Formerly maintained by Brian Russo and Ola Lundqvist . Now maintained by Helge Kreutzmann It was downloaded from: http://www.munted.org.uk/programming/ Upstream author is Alex Buell, source lists his address as: , however I recommend you try: . On his web site, the address is given. Copyright: The entire upstream code is distributed under GPL v2, see /usr/share/common-licenses/GPL-2 on Debian based systems. Upstream has the following copyright statement: The entire code base may be distributed under the terms of the GNU General Public License (GPL), which appears immediately below. Alternatively, all of the source code in the clock distribution as well as any code derived from that code may instead be distributed under the GNU Library General Public License (LGPL), at the choice of the distributor. The complete text of the LGPL appears at the bottom of this file. See /usr/share/common-licenses/(GPL-2|LGPL-2) © Alex Buell , 1998-2002 © Erick Kinnee , 1998,1999,2006 © Brian Russo , 2001 © Ola Lundqvist , 2002,2003 © Gerhard Tonn , 2002,2006 © Brian Almeida , 2003 © Martin Michlmayr , 2004 © Nobuhiro Iwamatsu , 2010 © Helge Kreutzmann , 2004-2013 © Bart Martens , 2013 debian/NEWS0000644000000000000000000000136411613304601007664 0ustar linuxinfo (1.1.8-34) unstable; urgency=low During the development cycle for Squeeze many new architectures were added. Unfortunately I don't have access to them, so if you have access to one, please try linuxinfo there and tell me the results, especially if it does not compile (it should!) or does not produce the desired output. This is most notably the case for: arm armeb armel avr32 powerpcspe ppc64 sh3 sh3eb sh4 sh4eb and sparc64 Please file bugs for other architectures as well, if the output is wrong :-)) This is especially important, since linuxinfo no longer claims to run on individual archs but rather uses the new linux-any "architecture" -- Helge Kreutzmann Tue, 30 Jun 2010 17:25:03 +0200 debian/control0000644000000000000000000000071312241225777010603 0ustar Source: linuxinfo Section: utils Priority: optional Maintainer: Helge Kreutzmann Build-Depends: debhelper (>= 9) Standards-Version: 3.9.5 XS-Testsuite: autopkgtest Package: linuxinfo Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Displays extended system information Displays system info, such as kernel revision, glibc version, processor type and memory size, in general by parsing /proc/cpuinfo. debian/watch0000644000000000000000000000050012166270622010216 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ http://www.munted.org.uk/programming/ (?:.*/)?linuxinfo[_\-\.]?(\d\S+)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) # Bart Martens Sun, 30 Dec 2012 12:09:34 +0000 debian/README.source0000644000000000000000000000166511613304601011350 0ustar This package uses quilt to patch the source before building. Normally, you can simply run make -f debian/rules patch to create the sources as they will be built. However, if you need to manually massage / add patches, either read the fine documentation included in the package quilt (/usr/share/doc/quilt/quilt.html) or do the following in the root of the package: export QUILT_PATCHES=debian/patches Apply patch by patch: quilt push If you need to update a patch, run quilt refresh after editing. If you need to create a new patch (e.g. to change a different file), run: quilt new mypatch.diff quilt edit somefile.c quilt refresh Please give the patch name "mypatch.diff" a meaningful name. To undo the current patch, run quilt pop To apply a patch with rejects: quilt push -f resolve rejects quilt refresh For further help on a specific command issue quilt cmd -h debian/compat0000644000000000000000000000000212146445010010361 0ustar 9 debian/linuxinfo.manpages0000644000000000000000000000003311613304601012705 0ustar linuxinfo.1 linuxinfo.de.1 debian/source/0000755000000000000000000000000011621310471010462 5ustar debian/source/format0000644000000000000000000000001411613304604011672 0ustar 3.0 (quilt) debian/dirs0000644000000000000000000000005511613304601010045 0ustar usr/bin usr/share/man/de/man1 usr/share/bug/ debian/linuxinfo.docs0000644000000000000000000000001711613304601012044 0ustar README CREDITS debian/patches/0000755000000000000000000000000012241226410010607 5ustar debian/patches/10_linuxinfo-option-handling0000644000000000000000000000651111613304604016144 0ustar # Description: Add standard options and improve output on already present # options # Fail if /proc/cpuinfo is unreadable and support > 9 CPUs # Author: Erick Kinnee # Author: Helge Kreutzmann # Last-Update: 2006-07-30 Index: linuxinfo-1.1.8-29/linuxinfo.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo.c 2010-02-01 21:27:32.780064347 +0100 +++ linuxinfo-1.1.8-29/linuxinfo.c 2010-02-01 21:27:00.668550000 +0100 @@ -20,7 +20,11 @@ 1.1.4 AIB 1999???? Added -v for versioning 1.1.6 AIB 20000405 Updates & changes to linuxinfo 1.1.7 AIB 20000406 Changed to file descriptors - + + 1.1.8 KRE 20051118 Include + 1.1.9 KRE 20060730 Support more than 9 CPUs and bail out + if /proc/cpuinfo is unreadable + Modelled on Vince Weaver's Linux_logo 2.10 Prints out a line of information about your system. @@ -32,12 +36,13 @@ #include #include #include +#include #include "linuxinfo.h" int main(int argc, char *argv[]) { - char ordinals[10][10] = { "Unknown", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" }; + char ordinals[13][10] = { "Unknown", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve" }; struct os_stat os; struct hw_stat hw; @@ -47,29 +52,55 @@ if (argc > 1) { - if (strcmp(argv[1], "-v") == 0) + if (strcmp(argv[1], ("-v")) == 0) { printf("%s %s\n", argv[0], VERSION); - return -1; + return 0; } + if (strcmp(argv[1], ("-h")) == 0) + { + printf("%s %s\n", argv[0], VERSION); + printf(" -h print this help\n"); + printf(" -v print linuxinfo version\n"); + return 0; + } + cpuinfo_fd = open(argv[1], O_RDONLY); + if (cpuinfo_fd < 0) + { + fprintf(stderr,"Unsupported option or file %s not found.\n",argv[1]); + return -1; + } } else + { cpuinfo_fd = open(CPUINFO_FILE, O_RDONLY); + if (cpuinfo_fd < 0) + { + fprintf(stderr,"Could not open %s.\n",CPUINFO_FILE); + return -2; + } + } GetOperatingSystemInfo(&os); GetHardwareInfo(cpuinfo_fd, &hw); GetSystemLibcInfo(&lib); printf("%s %s %s %s\n", os.os_name, os.os_hostname, os.os_version, os.os_revision); + if (hw.hw_processors > 12) + { + printf("%i %s ", hw.hw_processors, hw.hw_cpuinfo); + } + else + { + printf("%s %s ", ordinals[hw.hw_processors], hw.hw_cpuinfo); + } if (strncmp(hw.hw_megahertz, "?", strlen("?")) == 0) - printf("%s %s processor%s, %s total bogomips, %sM RAM\n", ordinals[hw.hw_processors], \ - hw.hw_cpuinfo, (hw.hw_processors > 1) ? "s" : "", hw.hw_bogomips, hw.hw_memory); + printf("processor%s, %s total bogomips, %sM RAM\n", (hw.hw_processors > 1) ? "s" : "", hw.hw_bogomips, hw.hw_memory); else { - printf("%s %s %sMHz processor%s, %s total bogomips, %sM RAM\n", ordinals[hw.hw_processors], \ - hw.hw_cpuinfo, hw.hw_megahertz, (hw.hw_processors > 1) ? "s" : "", hw.hw_bogomips, hw.hw_memory); + printf("%sMHz processor%s, %s total bogomips, %sM RAM\n", hw.hw_megahertz, (hw.hw_processors > 1) ? "s" : "", hw.hw_bogomips, hw.hw_memory); } printf("System library %s\n", lib.lib_version); debian/patches/19_ppc-without_bogomips0000644000000000000000000000300111613304604015223 0ustar # Description: Not all ppc machines print bogomips, thus breaking counting on # SMP # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_ppc.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_ppc.c 2010-02-01 21:37:33.594959545 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_ppc.c 2010-02-01 21:37:09.491324000 +0100 @@ -11,6 +11,8 @@ 1.0.0 AIB 199803?? Initial development 1.0.1 AIB 20000405 Rewritten 1.0.2 AIB 20010909 Added getphysicalmemory() call + 1.0.3 KRE 20050328 Fix multicpu-detection without bogomips + 1.0.4 KRE 20051118 Include This is the PPC port of linuxinfo */ @@ -18,6 +20,7 @@ #include #include #include +#include #include "linuxinfo.h" @@ -36,8 +39,12 @@ { splitstring(temp_string, temp_string2); - if (!(strncmp(temp_string, "cpu", strlen("cpu"))) && (processors == 0)) - strcpy(chip, temp_string2); + //if (!(strncmp(temp_string, "cpu", strlen("cpu"))) && (processors == 0)) + if (!(strncmp(temp_string, "cpu", strlen("cpu")))) + { + if (processors == 0) strcpy(chip, temp_string2); + processors++; + } if (!(strncmp(temp_string, "model", strlen("model")))) strcpy(vendor, temp_string2); @@ -50,7 +57,6 @@ if (!(strncmp(temp_string, "bogomips", strlen("bogomips")))) { - processors++; sscanf(temp_string2, "%f", &tempbogo); } } debian/patches/25_avr32-support0000644000000000000000000000610711613304604013517 0ustar # Description: Avr32 support. # Author: Helge Kreutzmann # Last-Update: 2010-02-15 Index: linuxinfo-1.1.8-31/linuxinfo_avr.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-31/linuxinfo_avr.c 2010-03-10 19:44:05.016234945 +0100 @@ -0,0 +1,64 @@ +/* + linuxinfo_avr.c + + Copyright (C) 2010 + All Rights Reserved. + + Helge Kreutzmann + based on linuxinfo_sh.c from Nobuhiro Iwamatsu , + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 KRE 20010215 Initial development + + This is the avr32 port of linuxinfo +*/ + +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_avr32 + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + int processors = 0; + float bogomips = 0.0, tempbogo; + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + char chip[BUFSIZ] = "Unknown"; + char family[BUFSIZ]="Unknown"; + char clock[BUFSIZ]="Unknown"; + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + splitstring(temp_string, temp_string2); + + /* CPU count */ + if (strncmp(temp_string, "processor", strlen("processor")) == 0) + processors++; + + /* "cpu type" -> chip */ /* FIXME Check with Brad? */ + if (!(strncmp(temp_string, "cpu type", strlen("cpu type"))) || !(strncmp(temp_string, "cpu core", strlen("cpu core")))) + strcpy(chip, temp_string2); + + /* cpu family */ /* FIXME Check with Brad? */ + if (!(strncmp(temp_string, "cpu family", strlen("cpu family"))) || !(strncmp(temp_string, "cpu arch", strlen("cpu arch")))) + strcpy(family, temp_string2); + + /* bogomips and clock FIXME clock */ + if (!(strncmp(temp_string, "bogomips", strlen("bogomips")))) { + strcpy(clock, temp_string2); + sscanf(temp_string2, "%f", &tempbogo); + bogomips += tempbogo; + } + } + + sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); + hw->hw_processors = processors; + sprintf(hw->hw_cpuinfo, "%s %s", family, chip); + sprintf(hw->hw_bogomips, "%0.2f", bogomips); + sprintf(hw->hw_megahertz, "%s", clock); +} +#endif /* system_avr */ Index: linuxinfo-1.1.8-31/linuxinfo.h =================================================================== --- linuxinfo-1.1.8-31.orig/linuxinfo.h 2010-03-10 19:43:43.064417378 +0100 +++ linuxinfo-1.1.8-31/linuxinfo.h 2010-03-10 19:43:43.076418861 +0100 @@ -21,7 +21,8 @@ 1.1.5 OPAL 20021225 Added hppa 1.1.8 KRE 20040429 Added mips 1.1.8 KRE 20040807 Add support for HIGHMEM - 1.1.8 KRE 20100201 Added sh (Nobuhiro Iwamatsu) + 1.1.8 KRE 20010201 Added sh (Nobuhiro Iwamatsu) + 1.1.8 KRE 20010201 Added avr32 */ @@ -76,6 +77,10 @@ #define system_sh #endif +#if defined(__avr32__) +#define system_avr32 +#endif + #if (SIZEOF_LONG > 4) #define LONGLONG long int #define LONGSPEC "%ld" debian/patches/01_infrastructure0000644000000000000000000001224111613304602014114 0ustar # Description: Add required infrastructure for new archs & use tar not gtar # Author: Ola Lundqvist # Author: Helge Kreutzmann # Last-Update: 2010-02-01 Index: linuxinfo-1.1.8-30/linuxinfo.h =================================================================== --- linuxinfo-1.1.8-30.orig/linuxinfo.h 2010-02-15 10:14:27.839603385 +0100 +++ linuxinfo-1.1.8-30/linuxinfo.h 2010-02-15 10:14:32.115543802 +0100 @@ -18,6 +18,8 @@ 1.0.8 AIB 1999???? Ported to ARM architecture. 1.1.3 AIB 1999???? mc68000 define replaced with __mc68000__ 1.1.4 AIB 20000405 Moved strstr() to linuxinfo_common.h + 1.1.5 OPAL 20021225 Added hppa + 1.1.8 KRE 20040429 Added mips */ @@ -28,11 +30,11 @@ #define system_unknown #endif -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__) #define system_intel #endif -#if defined(m68000) +#if defined(__mc68000__) #define system_m68k #endif @@ -44,6 +46,14 @@ #define system_sparc #endif +#if defined(__s390__) +#define system_s390 +#endif + +#if defined(__hppa__) +#define system_hppa +#endif + #if defined(__PPC__) #define system_ppc #endif @@ -52,6 +62,14 @@ #define system_arm #endif +#if defined(__ia64__) +#define system_ia64 +#endif + +#if defined(__mips__) +#define system_mips +#endif + #if (SIZEOF_LONG > 4) #define LONGLONG long int #define LONGSPEC "%ld" Index: linuxinfo-1.1.8-30/Makefile.am =================================================================== --- linuxinfo-1.1.8-30.orig/Makefile.am 2010-02-15 10:14:27.847603536 +0100 +++ linuxinfo-1.1.8-30/Makefile.am 2010-02-15 10:15:55.722369838 +0100 @@ -1,9 +1,10 @@ bin_PROGRAMS = linuxinfo linuxinfo_SOURCES = linuxinfo.c linuxinfo.h \ linuxinfo_common.c linuxinfo_arm.c \ - linuxinfo_alpha.c linuxinfo_intel.c \ - linuxinfo_m68k.c linuxinfo_ppc.c \ - linuxinfo_sparc.c linuxinfo_unknown.c + linuxinfo_alpha.c linuxinfo_ia64.c linuxinfo_intel.c \ + linuxinfo_m68k.c linuxinfo_ppc.c linuxinfo_sh.c \ + linuxinfo_hppa.c linuxinfo_s390.c linuxinfo_avr.c \ + linuxinfo_sparc.c linuxinfo_mips.c linuxinfo_unknown.c man_MANS = linuxinfo.1 EXTRA_DIST = linuxinfo.1 CREDITS VERSION = 1.1.8 Index: linuxinfo-1.1.8-30/Makefile.in =================================================================== --- linuxinfo-1.1.8-30.orig/Makefile.in 2010-02-15 10:14:27.859603120 +0100 +++ linuxinfo-1.1.8-30/Makefile.in 2010-02-15 10:16:34.733822773 +0100 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -64,7 +64,7 @@ PACKAGE = @PACKAGE@ bin_PROGRAMS = linuxinfo -linuxinfo_SOURCES = linuxinfo.c linuxinfo.h linuxinfo_common.c linuxinfo_arm.c linuxinfo_alpha.c linuxinfo_intel.c linuxinfo_m68k.c linuxinfo_ppc.c linuxinfo_sparc.c linuxinfo_unknown.c +linuxinfo_SOURCES = linuxinfo.c linuxinfo.h linuxinfo_common.c linuxinfo_arm.c linuxinfo_alpha.c linuxinfo_ia64.c linuxinfo_intel.c linuxinfo_m68k.c linuxinfo_ppc.c linuxinfo_hppa.c linuxinfo_s390.c linuxinfo_mips.c linuxinfo_sparc.c linuxinfo_sh.c linuxinfo_avr.c linuxinfo_unknown.c man_MANS = linuxinfo.1 EXTRA_DIST = linuxinfo.1 CREDITS @@ -80,8 +80,9 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ linuxinfo_OBJECTS = linuxinfo.o linuxinfo_common.o linuxinfo_arm.o \ -linuxinfo_alpha.o linuxinfo_intel.o linuxinfo_m68k.o linuxinfo_ppc.o \ -linuxinfo_sparc.o linuxinfo_unknown.o +linuxinfo_alpha.o linuxinfo_ia64.o linuxinfo_intel.o linuxinfo_m68k.o \ +linuxinfo_ppc.o linuxinfo_hppa.o linuxinfo_s390.o linuxinfo_sparc.o \ +linuxinfo_mips.o linuxinfo_sh.o linuxinfo_avr.o linuxinfo_unknown.o linuxinfo_LDADD = $(LDADD) linuxinfo_DEPENDENCIES = linuxinfo_LDFLAGS = @@ -100,12 +101,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best DEP_FILES = .deps/linuxinfo.P .deps/linuxinfo_alpha.P \ -.deps/linuxinfo_arm.P .deps/linuxinfo_common.P .deps/linuxinfo_intel.P \ -.deps/linuxinfo_m68k.P .deps/linuxinfo_ppc.P .deps/linuxinfo_sparc.P \ -.deps/linuxinfo_unknown.P +.deps/linuxinfo_arm.P .deps/linuxinfo_common.P .deps/linuxinfo_hppa.P \ +.deps/linuxinfo_ia64.P .deps/linuxinfo_intel.P .deps/linuxinfo_m68k.P \ +.deps/linuxinfo_ppc.P .deps/linuxinfo_s390.P .deps/linuxinfo_sparc.P \ +.deps/linuxinfo_mips.P .deps/linuxinfo_sh.P .deps/linuxinfo_unknown.P SOURCES = $(linuxinfo_SOURCES) OBJECTS = $(linuxinfo_OBJECTS) @@ -229,7 +231,7 @@ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) mostlyclean-tags: debian/patches/20_highmem0000644000000000000000000000557111613304604012465 0ustar # Description: Support highmem configurations # On ia64, mips and sparc /proc/kcore cannot be trusted, always use alternate # method # Improve regular expression for himem detection # Sometimes the value for switching to the alternative method is differing # Author: Helge Kreutzmann # Last-Update: 2009-05-24 Index: linuxinfo-1.1.8-29/linuxinfo_common.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_common.c 2010-02-01 21:39:10.201495549 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_common.c 2010-02-01 21:38:18.394280000 +0100 @@ -21,6 +21,7 @@ #include #include #include +#include #include "linuxinfo.h" @@ -121,14 +122,54 @@ { LONGLONG memory; struct stat st_buf; + int meminfo_fd; + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + int found; +#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc) if (stat("/proc/kcore", &st_buf) < 0) { - printf("Could not stat /proc/kcore, failing\n"); + memory = 0; } memory = (LONGLONG)st_buf.st_size; memory /= 1024; memory /= 1024; + + // Highmem machines on x86 (at least) have a /proc/kcore of 896 MB + // so we have to check a second source: /proc/meminfo (which is + // less acurate, i.e., usually a few MB too small) +#if defined(system_intel) + // Sometimes /proc/kcore seems to differ a few MB from 896 in this case + // and we don't trust values >\approx 4 GB ... + if (memory==887||memory==889||memory==896||memory==0||memory>3500) +#else + if (memory==896||memory==0) +#endif + { +#endif + meminfo_fd = open(MEMINFO_FILE, O_RDONLY); + found=0; + if (meminfo_fd < 0) + { + printf("Could not stat /proc/meminfo, result can be inaccurate\n"); + } + else + { while (read_line(meminfo_fd, temp_string, BUFSIZ) != 0) + { + if (splitstring(temp_string, temp_string2)) + { + if ((strncmp(temp_string, "MemTota", strlen("MemTota")) == 0)&&!found) + { + found=1; + memory = (LONGLONG)atol(temp_string2); + memory /= 1024; + } + } + } + } +#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc) + } +#endif return memory; } Index: linuxinfo-1.1.8-29/linuxinfo.h =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo.h 2010-02-01 21:38:48.213828330 +0100 +++ linuxinfo-1.1.8-29/linuxinfo.h 2010-02-01 21:38:18.394280000 +0100 @@ -20,6 +20,7 @@ 1.1.4 AIB 20000405 Moved strstr() to linuxinfo_common.h 1.1.5 OPAL 20021225 Added hppa 1.1.8 KRE 20040429 Added mips + 1.1.8 KRE 20040807 Add support for HIGHMEM */ @@ -110,5 +111,6 @@ LONGLONG getphysicalmemory(void); #define CPUINFO_FILE "/proc/cpuinfo" +#define MEMINFO_FILE "/proc/meminfo" #endif /* _LINUXINFO_H_ */ debian/patches/resourceleak.diff0000644000000000000000000000150712221561557014144 0ustar # Description: Fix resource leak found by DACA/cppcheck. # Author: Helge Kreutzmann # Last-Update: 2011-01-04 Index: linuxinfo-1.1.8-35/linuxinfo_common.c =================================================================== --- linuxinfo-1.1.8-35.orig/linuxinfo_common.c 2010-06-30 13:25:55.000000000 +0200 +++ linuxinfo-1.1.8-35/linuxinfo_common.c 2011-01-04 12:02:28.000000000 +0100 @@ -12,6 +12,7 @@ 1.0.1 AIB 20000405 Added read_line function 1.0.2 AIB 20000405 Moved strstr() from linuxinfo.h to here 1.0.3 AIB 20010809 Added getphysicalmemory() + 1.0.4 KRE 20110104 Fix resource leak found by DACA/cppcheck Common functions module */ @@ -166,6 +167,7 @@ } } } + close(meminfo_fd); } #if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc) } debian/patches/15_mips-support0000644000000000000000000000542611613304604013534 0ustar # Description: Add MIPS-Support (thanks to Martin Michlmayr for providing me # with the necessary information) # Author: Helge Kreutzmann # Last-Update: 2006-04-09 Index: linuxinfo-1.1.8-29/linuxinfo_mips.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo_mips.c 2010-02-01 21:32:38.099437000 +0100 @@ -0,0 +1,94 @@ +/* + linuxinfo_mips.c + + Copyright (C) 2004-2006 + All Rights Reserved. + + Helge Kreutzmann , + based on linuxinfo_m68k.c from Alex Buell + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 KRE 20040522 Initial development + 1.0.1 KRE 20051118 Include + 1.0.2 KRE 20060309 Fix detection if no endian info is given + 1.0.3 KRE 20060409 Do not look for endianess + + This is the mips port of linuxinfo +*/ + +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_mips + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + int processors = 0; + float bogomips = 0.0; + float tempbogo; + + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + char chip[BUFSIZ] = "Unknown"; + char endian[BUFSIZ]="Unknown"; + char fpu[BUFSIZ]="FPU Unknown"; + char fullchip[BUFSIZ]; + char *pos; + + FILE *procfile; + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + splitstring(temp_string, temp_string2); + + if (processors == 0) + if (!(strncmp(temp_string, "cpu model", strlen("cpu model")))) + { + pos=strstr(temp_string2, "FPU"); + if (pos) + { + strcpy(fpu, pos); + while (isspace(*(pos-1))) pos--; + *(pos) = '\0'; + } + strcpy(chip, temp_string2); + } + +// if (!(strncmp(temp_string, "byteorder", strlen("byteorder")))) +// strcpy(endian, temp_string2); + + if (!(strncmp(temp_string, "BogoMIPS", strlen("BogoMIPS")))) + { + processors++; + sscanf(temp_string2, "%f", &tempbogo); + bogomips += tempbogo; + } + } + + sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); + hw->hw_processors = processors; + + if (fpu) + { + sprintf(fullchip, "%s (%s)",chip,fpu); + } + else + { + strcpy(fullchip,chip); + } + if (strncmp(endian, "Unknown", strlen("Unknown"))) + { + sprintf(hw->hw_cpuinfo, "%s %s", endian,fullchip); + } + else + { + sprintf(hw->hw_cpuinfo, "%s", fullchip); + } + + sprintf(hw->hw_bogomips, "%0.2f", bogomips); + sprintf(hw->hw_megahertz, "?"); +} +#endif /* system_mips */ debian/patches/02_manpages-fixes0000644000000000000000000000221411613304602013743 0ustar # Description: Small fixes for man page # Author: Helge Kreutzmann # Last-Update: 2004-07-11 Index: linuxinfo-1.1.8-29/linuxinfo.1 =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo.1 2010-02-01 21:23:32.391706790 +0100 +++ linuxinfo-1.1.8-29/linuxinfo.1 2010-02-01 21:23:09.112059000 +0100 @@ -4,13 +4,23 @@ .SH NAME linuxinfo \- displays system information about system. .SH SYNOPSIS -.B "/bin/linuxinfo" -.SH DESCRIPTION .B linuxinfo +[\fI-h\fR | \fI-v\fR | \fIfilename\fR] +.SH DESCRIPTION +Displays the system information about the system, including kernel version, +number and type of processors in system, version of system library (libc +or glibc). +.SH "OPTIONS" +.TP +\fB\-v\fR +Print version information. .TP -Displays the system information about the system, including kernel version, number and type of processors -in system, version of system library (libc or glibc). +\fB\-h\fR +Print brief help. .TP +\fBfilename\fR +Use an alternative source for system information (by default +\fB/proc/cpuinfo\fR). .SH AUTHORS Alex Buell, alex.buell@munted.org.uk .SH BUGS debian/patches/24_sh4-support0000644000000000000000000000543211613304604013257 0ustar # Description: Renesas SuperH support. # Author: Nobuhiro Iwamatsu # Last-Update: 2010-02-01 Index: linuxinfo-1.1.8-29/linuxinfo.h =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo.h 2010-02-01 22:04:01.582896130 +0100 +++ linuxinfo-1.1.8-29/linuxinfo.h 2010-02-01 22:05:17.685741276 +0100 @@ -21,6 +21,7 @@ 1.1.5 OPAL 20021225 Added hppa 1.1.8 KRE 20040429 Added mips 1.1.8 KRE 20040807 Add support for HIGHMEM + 1.1.8 KRE 20100201 Added sh (Nobuhiro Iwamatsu) */ @@ -71,6 +72,10 @@ #define system_mips #endif +#if defined(__sh__) +#define system_sh +#endif + #if (SIZEOF_LONG > 4) #define LONGLONG long int #define LONGSPEC "%ld" Index: linuxinfo-1.1.8-29/linuxinfo_sh.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo_sh.c 2010-02-01 22:08:02.275247150 +0100 @@ -0,0 +1,64 @@ +/* + linuxinfo_sh.c + + Copyright (C) 2010 + All Rights Reserved. + + Nobuhiro Iwamatsu , + based on linuxinfo_m68k.c from Alex Buell + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 IWA 20100201 Initial development + + This is the sh port of linuxinfo +*/ + +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_sh + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + int processors = 0; + float bogomips = 0.0, tempbogo; + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + char chip[BUFSIZ] = "Unknown"; + char family[BUFSIZ]="Unknown"; + char clock[BUFSIZ]="Unknown"; + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + splitstring(temp_string, temp_string2); + + /* CPU count */ + if (strncmp(temp_string, "processor", strlen("processor")) == 0) + processors++; + + /* "cpu type" -> chip */ + if (!(strncmp(temp_string, "cpu type", strlen("cpu type")))) + strcpy(chip, temp_string2); + + /* cpu family */ + if (!(strncmp(temp_string, "cpu family", strlen("cpu family")))) + strcpy(family, temp_string2); + + /* bogomips and clock */ + if (!(strncmp(temp_string, "bogomips", strlen("bogomips")))) { + strcpy(clock, temp_string2); + sscanf(temp_string2, "%f", &tempbogo); + bogomips += tempbogo; + } + } + + sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); + hw->hw_processors = processors; + sprintf(hw->hw_cpuinfo, "%s %s", family, chip); + sprintf(hw->hw_bogomips, "%0.2f", bogomips); + sprintf(hw->hw_megahertz, "%s", clock); +} +#endif /* system_sh */ debian/patches/22_update_x860000644000000000000000000001337012241226410013030 0ustar # Description: Add new models and fix model detection, use # Added Athlon XP and MP (by Ola Lundqvist ) # Other added by Helge Kreutzmann # Fix model detection (else Pentium MMX -> Xeon!) # Add lots of x86_64 models # One more Pentium4, Celeron M # Include # Added semprons # One more am64 and one pentium M added # Author: Ola Lundqvist # Author: Helge Kreutzmann # Last-Update: 2010-02-28 Index: linuxinfo-1.1.8-43/linuxinfo_intel.c =================================================================== --- linuxinfo-1.1.8-43.orig/linuxinfo_intel.c 2013-09-28 17:03:33.000000000 +0200 +++ linuxinfo-1.1.8-43/linuxinfo_intel.c 2013-11-14 21:05:25.000000000 +0100 @@ -13,12 +13,37 @@ 1.0.2 AIB 20000527 Added AMD K7 1.0.3 AIB 20000815 Added AMD K6-3 500MHz 1.0.4 AIB 20010909 Added getphysicalmemory() call + 1.0.5 OPAL 20030417 Added Athlon XP and MP. + 1.0.6 KRE 20040711 Added Opteron + 1.0.7 KRE 20040726 Added Pentium M + 1.0.8 KRE 20040809 Add further machines (Athlons, Xeons, + Pentium 4s, Celerons), fix detection of + Pentium MMX + 1.0.9 KRE 20050215 Added several amd64 machines + 1.0.10 KRE 20051106 Added another Pentium4 machine + 1.0.11 KRE 20051113 Added another Celeron machine + 1.0.12 KRE 20051120 Include + 1.0.13 KRE 20060212 Add an AMP sempron cpu + 1.0.14 KRE 20060423 Add another AMD Sempron + 1.0.15 KRE 20060724 One more am64 and one pentium M added + 1.0.16 KRE 20070716 Added a Geode CPU + 1.0.17 KRE 20070810 Added another Xeon + 1.0.18 KRE 20080203 Added Core 2 and one more Pentium 4 + 1.0.19 KRE 20090318 Added Core Solo + 1.0.20 KRE 20090524 Add another Xeon + 1.0.21 KRE 20090605 Add another Core Duo + 1.0.22 KRE 20100228 Add another Core Duo + 1.0.23 KRE 20110725 Add a Phenom + 1.0.24 KRE 20111104 Add another Xeon + 1.0.25 KRE 20130527 Add an Athlon X2 + 1.0.26 KRE 20131114 Add another Xeon - This is the Intel port of linuxinfo + This is the x86 port of linuxinfo */ #include #include +#include #include "linuxinfo.h" @@ -45,11 +70,33 @@ "AMD-K6(tm)-III", "K6-3 (3DNowExt)", "AMD-K7(tm)", "K7", "Athlon", "Athlon", + "AMD Athlon(tm) processor", "Athlon", + "AMD Athlon(tm) Processor", "Athlon", + "AMD Athlon(TM) XP", "Athlon XP", + "AMD Athlon(tm) XP 1600+", "Athlon XP", + "AMD Athlon(TM) MP", "Athlon MP", + "AMD Opteron(tm) Processor 240", "Opteron", + "AMD Opteron(tm) Processor 242", "Opteron", + "AMD Opteron(tm) Processor 244", "Opteron", + "AMD Opteron(tm) Processor 246", "Opteron", + "AMD Opteron(tm) Processor 248", "Opteron", + "AMD Sempron(tm) 2300+", "Sempron", + "AMD Sempron(tm) 2600+", "Sempron", + "AMD Athlon(tm) 64 Processor 2800+", "x86_64", + "AMD Athlon(tm) 64 Processor 3000+", "x86_64", + "AMD Athlon(tm) 64 Processor 3200+", "x86_64", + "AMD Athlon(tm) 64 Processor 3400+", "x86_64", + "AMD Athlon(tm) 64 Processor 3500+", "x86_64", + "AMD Athlon(tm) 64 Processor 3700+", "x86_64", + "AMD Athlon(tm) 64 X2 Dual Core Processor 5400+", "x86_64", + "AMD Phenom(tm) II X6 1055T Processor", "Phenom II", "Am5x86", "5x86", "C6", "C6", "C6-2", "C6-2", "6x86", "6x86", "6x86MX", "6x86MX", + "Geode(TM) Integrated Processor by National Semi", "Geode by Nat. Sem.", + "Geode(TM) Integrated Processor by AMD PCS", "Geode by AMD PCS", "Pentium 75+", "Pentium", "Pentium 75 - 200", "Pentium", "Pentium MMX", "Pentium MMX", @@ -59,8 +106,33 @@ "Pentium II (Deschutes)", "Pentium II (Deschutes)", "Pentium III (Katmai)", "Pentium III (Katmai)", "Pentium III (Coppermine)", "Pentium III (Coppermine)", + "Intel(R) Pentium(R) 4 CPU 1.80GHz", "Pentium 4", + "Intel(R) Pentium(R) 4 CPU 2.00GHz", "Pentium 4", + "Intel(R) Pentium(R) 4 CPU 2.80GHz", "Pentium 4", + "Intel(R) Pentium(R) 4 CPU 3.00GHz", "Pentium 4", + "Intel(R) Pentium(R) 4 CPU 3.20GHz", "Pentium 4", + "Intel(R) Pentium(R) M processor", "Pentium M", + "Intel(R) Pentium(R) M processor 1600MHz", "Pentium M", + "Intel(R) XEON(TM) CPU 2.20GHz", "Xeon", + "Intel(R) XEON(TM) CPU 2.40GHz", "Xeon", + "Intel(R) Xeon(TM) CPU 3.00GHz", "Xeon", + "Intel(R) Xeon(TM) CPU 3.20GHz", "Xeon", + "Intel(R) Xeon(TM) CPU 3.40GHz", "Xeon", + "Intel(R) Xeon(TM) CPU 3.60GHz", "Xeon", + "Intel(R) Xeon(R) CPU L5420 @ 2.50GHz","Xeon", + "Celeron (Coppermine)", "Celeron (Coppermine)", "Celeron (Mendocino)", "Celeron (Mendocino)", "Celeron (Covington)", "Celeron (Covington)", + "Intel(R) Celeron(R) CPU 1.70GHz", "Celeron", + "Intel(R) Celeron(R) CPU 2.20GHz", "Celeron", + "Intel(R) Celeron(R) CPU 2.40GHz", "Celeron", + "Intel(R) Celeron(R) M processor 1.40GHz", "Celeron M", + "Mobile Intel(R) Pentium(R) 4 CPU 3.06GHz", "Pentium-M 4", + "Intel(R) Core(TM) Solo CPU U1400 @ 1.20GHz", "Core Solo", + "Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz", "Core 2", + "Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz", "Core 2 Duo", + "Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz", "Core 2 Duo", + "Genuine Intel(R) CPU 2140 @ 1.60GHz", "Pentium 4", NULL, NULL }; @@ -104,12 +176,15 @@ if (strncmp(temp_string, "model", strlen("model")) == 0) { int i = 0; + int found = 0; - while (models[i] != NULL) + while ((models[i] != NULL)&&(!found)) { if (strncmp(temp_string2, models[i], strlen(models[i])) == 0) + { strcpy(model, models[++i]); - + found=1; + } i += 2; } } debian/patches/11_hppa-support0000644000000000000000000001006111613304604013477 0ustar # Description: Add support for HPPA # Author: Ola Lundqvist # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_hppa.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo_hppa.c 2010-02-01 21:28:35.095119000 +0100 @@ -0,0 +1,141 @@ +/* + linuxinfo_hppa.c + + Copyright (C) 2002 + All Rights Reserved for Modifications. + Ola Lundqvist + + Copyright (C) 1998-2000 + All Rights Reserved. + + Alex Buell + + Advanced Buell Software Engineering Ltd + Hampshire, GU31 5DG + United Kingdom + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 AIB 199803?? Initial development + 1.0.1 AIB 20000405 Updated and reworked code + 1.0.2 AIB 20000527 Added AMD K7 + 1.0.3 OPAL 20021225 Rewritten some for hppa. + 1.0.4 KRE 20050318 Print CPU + 1.0.5 KRE 20051118 Include + + This is the hppa port of linuxinfo +*/ + +#include +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_hppa + +static char *models[] = +{ + //"9000/800/A500-5X", "Crescendo 550", + //"9000/778/B180L", "Merlin L2+ 180", + //"9000/785/C3600", "Allegro W+", + //"9000/871/D270", "UL 2w U160 512K/512K D370", + NULL, NULL +}; + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + char chip[BUFSIZ], model[BUFSIZ], Mhz[BUFSIZ], family[BUFSIZ]; + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + + struct stat st_buf; + + int processors = 0; + float bogomips = 0.0; + float tempMHz = 0.0; + LONGLONG memory = 0; + float tempbogo; + + char *p; + + strcpy(chip, "Unknown"); + strcpy(model, "Unknown"); + strcpy(family, "Unknown"); + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + if (splitstring(temp_string, temp_string2)) + { + if (strncasecmp(temp_string, "processor", strlen("processor")) == 0) + processors++; + + // DEBUG printf("%s:\n", temp_string); +// if (strncasecmp(temp_string, "model", strlen("model")) == 0) +// { +// int i = 0; +// +// if (strncmp(temp_string2, "0", 1) == 0) +// { +// strcpy(model, family); +// } +// else +// { +// while (models[i] != NULL) +// { +// if (strncasecmp(temp_string2, models[i], strlen(models[i])) == 0) +// strcpy(model, models[++i]); +// +// i += 2; +// } +// } +// } + + if (strncasecmp(temp_string, "family", strlen("cpu family")) == 0) + strcpy(family, temp_string2); + + if (strncasecmp(temp_string, "cpu ", strlen("cpu ")) == 0) + { + strcpy(chip, temp_string2); + strcpy(model, temp_string2); + } + + if (strncasecmp(temp_string, "cpu MHz", strlen("cpu MHz")) == 0) + tempMHz = atol(temp_string2); + + if (strncasecmp(temp_string, "bogomips", strlen("bogomips")) == 0) + bogomips = bogomips + atof(temp_string2); + } + + + } + + + /* + // try 1 + stat(MEMORY_FILE, &st_buf); + memory = st_buf.st_size; + memory /= 1024; memory /= 1024; + sprintf(hw->hw_memory, "%ld", (long int)memory); + + // try 2 + memory = getphysicalmemory(); + memory /= 1024; memory /= 1024; + sprintf(hw->hw_memory, "%ld", memory); + */ + //sprintf(hw->hw_memory, "? ", memory); + // try 3 + sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); + + hw->hw_processors = processors; + sprintf(hw->hw_cpuinfo, "%s", model); + + sprintf(hw->hw_bogomips, "%0.2f", bogomips); + + if (tempMHz == 0.0) + sprintf(hw->hw_megahertz, "?"); + else + sprintf(hw->hw_megahertz, "%d", (int)tempMHz); +} + +#endif /* system_hppa */ debian/patches/16_s390-support0000644000000000000000000000402511613304604013255 0ustar # Description: Add support for S390 # Author: Gerhard Tonn # Last-Update: 2006-03-15 Index: linuxinfo-1.1.8-29/linuxinfo_s390.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo_s390.c 2010-02-01 21:33:54.514279000 +0100 @@ -0,0 +1,67 @@ +/* + linuxinfo_s390.c + + Copyright (C) 1998-2000 + All Rights Reserved. + + Alex Buell + + Advanced Buell Software Engineering Ltd + Hampshire, GU31 5DG + United Kingdom + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 AIB 199803?? Initial development + 1.0.1 AIB 20000405 Rewritten + 1.0.2 KRE 20051118 Include + 1.0.3 KRE 20060315 Fix memory reporting + + This is the S/390 port of linuxinfo +*/ + +#include +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_s390 + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + LONGLONG memory = 0; + int processors = 0; + int megahertz = 0; + float tempbogo; + + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + char chip[BUFSIZ], vendor[BUFSIZ], model[BUFSIZ]; + + struct stat st_buf; + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + splitstring(temp_string, temp_string2); + + if (!(strncmp(temp_string, "vendor_id", strlen("vendor_id")))) + strcpy(vendor, temp_string2); + + if (!(strncmp(temp_string, "# processors", strlen("# processors")))) + processors = atoi(temp_string2); + + if (!(strncmp(temp_string, "bogomips per cpu", strlen("bogomips per cp")))) + { + sscanf(temp_string2, "%f", &tempbogo); + } + } + + memory = getphysicalmemory(); + sprintf(hw->hw_memory, "%ld", memory); + hw->hw_processors = processors; + + sprintf(hw->hw_cpuinfo, "%s", vendor); + sprintf(hw->hw_bogomips, "%0.2f", tempbogo * processors); +} +#endif /* system_s390 */ debian/patches/27_unify-memhandling0000644000000000000000000000430512221567675014502 0ustar Index: linuxinfo-1.1.8-42/linuxinfo_common.c =================================================================== --- linuxinfo-1.1.8-42.orig/linuxinfo_common.c 2013-05-28 19:50:11.000000000 +0200 +++ linuxinfo-1.1.8-42/linuxinfo_common.c 2013-09-28 16:20:50.000000000 +0200 @@ -127,51 +127,28 @@ char temp_string[BUFSIZ], temp_string2[BUFSIZ]; int found; -#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc) - if (stat("/proc/kcore", &st_buf) < 0) + memory = 0; + meminfo_fd = open(MEMINFO_FILE, O_RDONLY); + found=0; + if (meminfo_fd < 0) { - memory = 0; - } - - memory = (LONGLONG)st_buf.st_size; - memory /= 1024; memory /= 1024; - - // Highmem machines on x86 (at least) have a /proc/kcore of 896 MB - // so we have to check a second source: /proc/meminfo (which is - // less acurate, i.e., usually a few MB too small) -#if defined(system_intel) - // Sometimes /proc/kcore seems to differ a few MB from 896 in this case - // and we don't trust values >\approx 4 GB ... - if (memory==887||memory==889||memory==896||memory==0||memory>3500) -#else - if (memory==896||memory==0) -#endif - { -#endif - meminfo_fd = open(MEMINFO_FILE, O_RDONLY); - found=0; - if (meminfo_fd < 0) + printf("Could not stat /proc/meminfo, result can be inaccurate\n"); + } + else + { while (read_line(meminfo_fd, temp_string, BUFSIZ) != 0) { - printf("Could not stat /proc/meminfo, result can be inaccurate\n"); - } - else - { while (read_line(meminfo_fd, temp_string, BUFSIZ) != 0) + if (splitstring(temp_string, temp_string2)) { - if (splitstring(temp_string, temp_string2)) + if ((strncmp(temp_string, "MemTota", strlen("MemTota")) == 0)&&!found) { - if ((strncmp(temp_string, "MemTota", strlen("MemTota")) == 0)&&!found) - { - found=1; - memory = (LONGLONG)atol(temp_string2); - memory /= 1024; - } + found=1; + memory = (LONGLONG)atol(temp_string2); + memory /= 1024; } } - close(meminfo_fd); } -#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc) + close(meminfo_fd); } -#endif return memory; } debian/patches/04_README0000644000000000000000000000112211613304604011772 0ustar # Description: Update upstream's URL in upstreams README # Author: Helge Kreutzmann # Last-Update: 2005-11-06 Index: linuxinfo-1.1.8-29/README =================================================================== --- linuxinfo-1.1.8-29.orig/README 2010-02-01 21:26:28.017045263 +0100 +++ linuxinfo-1.1.8-29/README 2010-02-01 21:25:57.625505000 +0100 @@ -2,7 +2,7 @@ The latest releases are always available at: - http://www.munted.org.uk/programming/prog.html + http://www.munted.org.uk/programming/ linuxinfo was written by Alex Buell, alex.buell@munted.org.uk debian/patches/14_m68k-fixes0000644000000000000000000000273011613304604012745 0ustar # Description: Correct output on m68k, use string.h # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_m68k.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_m68k.c 2010-02-01 21:32:00.912000806 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_m68k.c 2010-02-01 21:31:37.244359000 +0100 @@ -11,12 +11,14 @@ 1.0.0 AIB 199803?? Initial development 1.0.1 AIB 20000405 Rework of code 1.0.2 AIB 20010909 Added getphysicalmemory() call + 1.0.3 KRE 20051118 Include This is the m68k port of linuxinfo */ #include #include +#include #include "linuxinfo.h" @@ -30,6 +32,8 @@ char temp_string[BUFSIZ], temp_string2[BUFSIZ]; char chip[BUFSIZ] = "Unknown"; + char megahertz[BUFSIZ]="?"; + char *p; FILE *procfile; @@ -41,8 +45,8 @@ if (!(strcmp(temp_string, "CP"))) strcpy(chip, temp_string2); - if (!(strcmp(temp_string, "ClockIn"))) - strcpy(hw->hw_megahertz, temp_string2); + if (!(strcmp(temp_string, "Clockin"))) + strcpy(megahertz, temp_string2); if (!(strcmp(temp_string, "BogoMip"))) { @@ -57,5 +61,9 @@ sprintf(hw->hw_cpuinfo, "%s", chip); sprintf(hw->hw_bogomips, "%0.2f", bogomips); + + p = strchr(megahertz, 'M'); + if (p) *(p) = '\0'; + strcpy(hw->hw_megahertz, megahertz); } #endif /* system_m68k */ debian/patches/23_arm-fixes0000644000000000000000000000131211613304604012732 0ustar # Description: Include # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_arm.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_arm.c 2010-02-01 22:01:51.896860892 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_arm.c 2010-02-01 22:03:36.839270792 +0100 @@ -11,12 +11,14 @@ 1.0.0 AIB 199803?? Initial development 1.0.1 AIB 20000405 Rewritten 1.0.2 AIB 20010909 Added getphysicalmemory() call + 1.0.3 KRE 20051118 Include This is the ARM port of linuxinfo */ #include #include +#include #include "linuxinfo.h" debian/patches/18_sparc_update0000644000000000000000000000320611613304604013521 0ustar # Description: Add more known models and alternate BogoMips routine # Author: Ola Lundqvist # Author: Helge Kreutzmann # Last-Update: 2006-10-17 Index: linuxinfo-1.1.8-29/linuxinfo_sparc.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_sparc.c 2010-02-01 21:36:36.319827737 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_sparc.c 2010-02-01 21:36:17.156117000 +0100 @@ -12,6 +12,8 @@ 1.0.1 AIB 20000405 Rewritten 1.0.2 AIB 20010129 Fixed bug and added Fujitsu 1.0.3 AIB 20010909 Complete rewrite + 1.0.4 HKM 20060723 Added more machines and fixed a typo + 1.0.5 HKM 20061017 Added the Niagra This is the Sparc32 port of linuxinfo */ @@ -27,6 +29,7 @@ static char *vendors[] = { "Texas", "TI", + "TI", "TI", "Fujitsu", "Fujitsu", "Cypress", "Cypress", "ROSS", "Ross Technologies", @@ -46,6 +49,10 @@ "Texas Instruments, Inc. - SuperSparc 50", "SuperSparc 50", "Texas Instruments, Inc. - SuperSparc 51", "SuperSparc 51", "Texas Instruments, Inc. - SuperSparc 61", "SuperSparc 61", + "TI UltraSparc II (BlackBird)","UltraSparc II (BlackBird)", + "TI UltraSparc IIi","UltraSparc IIi", + "TI UltraSparc IIi (Sabre)","UltraSparc IIi (Sabre)", + "UltraSparc T1 (Niagara)","UltraSparc T1 (Niagara)", NULL, NULL }; @@ -92,6 +99,9 @@ if (!(strncmp(temp_string, "BogoMips", strlen("BogoMips")))) sscanf(temp_string2, "%f", &tempbogo); + + if (!(strncmp(temp_string, "Cpu0Bogo", strlen("Cpu0Bogo")))) + sscanf(temp_string2, "%f", &tempbogo); } sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); debian/patches/12_ia64-support0000644000000000000000000000770411613304604013325 0ustar # Description: Add support for ia64 # Author: Ola Lundqvist # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_ia64.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo_ia64.c 2010-02-01 21:29:52.973939000 +0100 @@ -0,0 +1,140 @@ +/* + linuxinfo_ia64.c + + Copyright (C) 1998-2000 + All Rights Reserved. + + Alex Buell + + Advanced Buell Software Engineering Ltd + Hampshire, GU31 5DG + United Kingdom + + Version Author Date Comments + ---------------------------------------------------------------------- + 1.0.0 AIB 199803?? Initial development + 1.0.1 AIB 20000405 Updated and reworked code + 1.0.2 AIB 20000527 Addded AMD K7 + 1.0.3 OPAL 20030417 Fixed so that it compiles. + 1.0.4 KRE 20050318 For now always use family as model (improve later) + 1.0.5 KRE 20051118 Include + + This is the Intel ia64 port of linuxinfo +*/ + +#include +#include +#include +#include + +#include "linuxinfo.h" + +#ifdef system_ia64 + +static char *vendors[] = +{ + "GenuineIntel", "Intel", + NULL, NULL +}; + +static char *models[] = +{ + NULL, NULL +}; + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + char chip[BUFSIZ], vendor[BUFSIZ], model[BUFSIZ], Mhz[BUFSIZ], family[BUFSIZ]; + char temp_string[BUFSIZ], temp_string2[BUFSIZ]; + + struct stat st_buf; + + int processors = 0; + float bogomips = 0.0; + float tempMHz = 0.0; + LONGLONG memory = 0; + float tempbogo; + + char *p; + + strcpy(chip, "Unknown"); + strcpy(vendor, "Unknown"); + strcpy(model, "Unknown"); + strcpy(family, "Unknown"); + + while (read_line(fd, temp_string, BUFSIZ) != 0) + { + if (splitstring(temp_string, temp_string2)) + { + if (strncasecmp(temp_string, "processor", strlen("processor")) == 0) + processors++; + + if (strncasecmp(temp_string, "vendor", strlen("vendor")) == 0) + { + int i = 0; + + while (vendors[i] != NULL) + { + if (strncasecmp(temp_string2, vendors[i], strlen(vendors[i])) == 0) + strcpy(vendor, vendors[++i]); + + i += 2; + } + } + + if (strncasecmp(temp_string, "model", strlen("model")) == 0) + { + int i = 0; + + //if (strncmp(temp_string2, "0", 1) == 0) + if (1) + { + strcpy(model, family); +// printf("Model: %s\n",family); + } + else + { + while (models[i] != NULL) + { + if (strncasecmp(temp_string2, models[i], strlen(models[i])) == 0) + strcpy(model, models[++i]); + + printf("Model (m): %s\n",model); + i += 2; + } + } + } + + if (strncasecmp(temp_string, "family", strlen("family")) == 0) + strcpy(family, temp_string2); + + if (strncasecmp(temp_string, "cpu MHz", strlen("cpu MHz")) == 0) + tempMHz = atol(temp_string2); + + if (strncasecmp(temp_string, "bogomips", strlen("bogomips")) == 0) + bogomips = bogomips + atof(temp_string2); + } + + + } + + /* + stat(MEMORY_FILE, &st_buf); + memory = st_buf.st_size; + memory /= 1024; memory /= 1024; + sprintf(hw->hw_memory, "%ld", (long int)memory); + */ + sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); + + hw->hw_processors = processors; + sprintf(hw->hw_cpuinfo, "%s %s", vendor, model); + + sprintf(hw->hw_bogomips, "%0.2f", bogomips); + + if (tempMHz == 0.0) + sprintf(hw->hw_megahertz, "?"); + else + sprintf(hw->hw_megahertz, "%d", (int)tempMHz); +} + +#endif /* system_ia64 */ debian/patches/17_alpha_smp_support0000644000000000000000000000215311613304604014606 0ustar # Description: Support SMP machines for the alpha-architecture # Author: Helge Kreutzmann # Last-Update: 2005-11-18 Index: linuxinfo-1.1.8-29/linuxinfo_alpha.c =================================================================== --- linuxinfo-1.1.8-29.orig/linuxinfo_alpha.c 2010-02-01 21:35:22.568944749 +0100 +++ linuxinfo-1.1.8-29/linuxinfo_alpha.c 2010-02-01 21:34:58.401311000 +0100 @@ -11,6 +11,7 @@ 1.0.0 AIB 199803?? Initial development 1.0.1 AIB 20000405 Now detects MHz, code rewritten 1.0.2 AIB 20010809 Added getphysicalmemory() call + 1.0.3 KRE 20051118 Include This is the Alpha port of linuxinfo @@ -18,6 +19,7 @@ #include #include +#include #include "linuxinfo.h" @@ -58,6 +60,12 @@ else strcpy(hw->hw_megahertz, "?"); } + if (!(strncmp(temp_string, "cpus active", strlen("cpus active")))) + { + // FIXME Check which counting method really works + // (and bogomips ok?) + processors = atoi(temp_string2); + } } sprintf(hw->hw_memory, LONGSPEC, getphysicalmemory()); debian/patches/03_german-manpage0000644000000000000000000000243611613304604013724 0ustar # Description: German translation of the man page # Author: Helge Kreutzmann # Last-Update: 2004-07-11 Index: linuxinfo-1.1.8-29/linuxinfo.1.de =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linuxinfo-1.1.8-29/linuxinfo.de.1 2010-02-01 21:24:16.931031000 +0100 @@ -0,0 +1,31 @@ +.\" Copyright 1998 Alex Buell (alex.buell@munted.org.uk) +.\" May be distributed under the GNU General Public License +.\" +.\" Translated by Helge Kreutzmann +.TH LinuxInfo 1 "29 Mai 2004" "Linux" "Software" +.SH NAME +linuxinfo \- zeigt Systeminformationen über das System an +.SH ÜBERSICHT +.B linuxinfo +[\fI-h\fR | \fI-v\fR | \fIDateiname\fR] +.SH BESCHREIBUNG +Zeigt die Systeminformationen über das System an, darunter die Kernelversion, +die Anzahl und Art der Prozessoren im System und die Version der +Systembibliothek (libc oder glibc). +.SH "OPTIONEN" +.TP +\fB\-v\fR +Gibt die Version aus. +.TP +\fB\-h\fR +Gibt eine kurze Hilfe aus. +.TP +\fBDateiname\fR +Benutzt eine alternative Quelle für die Systeminformationen +(standardmäßig wird \fB/proc/cpuinfo\fR verwendet). +.SH AUTOREN +Alex Buell, alex.buell@munted.org.uk +.SH FEHLER +.TP +Welche Fehler? ;o) Teilen Sie mir diese mit! +.sp debian/patches/series0000644000000000000000000000052512221562456012041 0ustar 01_infrastructure 02_manpages-fixes 03_german-manpage 04_README 10_linuxinfo-option-handling 11_hppa-support 12_ia64-support 14_m68k-fixes 15_mips-support 16_s390-support 17_alpha_smp_support 18_sparc_update 19_ppc-without_bogomips 20_highmem 22_update_x86 23_arm-fixes 24_sh4-support 25_avr32-support resourceleak.diff 27_unify-memhandling