OBS User unknown 2008-10-09 16:29:30 +00:00 committed by Git OBS Bridge
parent a2f12fd26d
commit 03800d77db
3 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Delete unused function onboard_device_type()
References: bnc#433795
This patch deletes the unused function onboard_device_type(). That fixes
the compiler warning:
src/dmidecode/dmidecode.c:139: \
warning: no return statement in function returning non-void
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
src/dmidecode/dmidecode.c | 25 -------------------------
1 file changed, 25 deletions(-)
--- a/src/dmidecode/dmidecode.c
+++ b/src/dmidecode/dmidecode.c
@@ -113,31 +113,6 @@ static void dmi_slot_segment_bus_func(u1
}
}
-static u8 onboard_device_type(u8 code, const char *prefix)
-{
- /* 3.3.x.2 */
- u8 e = (code & 0x80)>>7;
- static const char *type[]={
- "Other", /* 1 */
- "Unknown",
- "Video",
- "SCSI Controller",
- "Ethernet",
- "Token Ring",
- "Sound",
- "PATA Controller",
- "SATA Controller",
- "SAS Controller" /* 0x0A */
- };
- code = code & 0x7F;
- if(code>=0x01 && code<=0x0A) {
- printf("%sStatus: %s\n", prefix, e?"Enabled":"Disabled");
- printf("%sDevice Type: %s\n", prefix, type[code-0x01]);
- }
- else
- printf("%sDevice Type: %s\n", prefix, out_of_spec);
-}
-
/*
* Main
*/

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 09 18:11:29 CEST 2008 - bwalle@suse.de
- Delete unused function onboard_device_type() (bnc#433795).
-------------------------------------------------------------------
Thu Jul 31 13:48:47 CEST 2008 - bwalle@suse.de

View File

@ -19,7 +19,7 @@
Name: biosdevname
Version: 0.2.4
Release: 46
Release: 59
Summary: Udev helper for naming devices per BIOS names
Group: System/Base
License: GPL v2 only
@ -39,6 +39,7 @@ BuildRequires: udev
PreReq: mkinitrd
# for ownership of /etc/udev/rules.d
Requires: udev
Patch0: %{name}-delete-unused-function.diff
%description
biosdevname in its simplest form takes an kernel name name as an
@ -55,6 +56,7 @@ Authors:
%prep
%setup -q
%patch0 -p1
%build
# this is a udev rule, so it needs to live in / rather than /usr
@ -89,6 +91,8 @@ mkinitrd_setup
mkinitrd_setup
%changelog
* Thu Oct 09 2008 bwalle@suse.de
- Delete unused function onboard_device_type() (bnc#433795).
* Thu Jul 31 2008 bwalle@suse.de
- integrate biosdevname to initrd (bnc#403269, FATE#301528)
* Sat Sep 22 2007 bwalle@suse.de