forked from pool/biosdevname
This commit is contained in:
parent
a2f12fd26d
commit
03800d77db
50
biosdevname-delete-unused-function.diff
Normal file
50
biosdevname-delete-unused-function.diff
Normal 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
|
||||||
|
*/
|
@ -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
|
Thu Jul 31 13:48:47 CEST 2008 - bwalle@suse.de
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
Name: biosdevname
|
Name: biosdevname
|
||||||
Version: 0.2.4
|
Version: 0.2.4
|
||||||
Release: 46
|
Release: 59
|
||||||
Summary: Udev helper for naming devices per BIOS names
|
Summary: Udev helper for naming devices per BIOS names
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
License: GPL v2 only
|
License: GPL v2 only
|
||||||
@ -39,6 +39,7 @@ BuildRequires: udev
|
|||||||
PreReq: mkinitrd
|
PreReq: mkinitrd
|
||||||
# for ownership of /etc/udev/rules.d
|
# for ownership of /etc/udev/rules.d
|
||||||
Requires: udev
|
Requires: udev
|
||||||
|
Patch0: %{name}-delete-unused-function.diff
|
||||||
|
|
||||||
%description
|
%description
|
||||||
biosdevname in its simplest form takes an kernel name name as an
|
biosdevname in its simplest form takes an kernel name name as an
|
||||||
@ -55,6 +56,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# this is a udev rule, so it needs to live in / rather than /usr
|
# this is a udev rule, so it needs to live in / rather than /usr
|
||||||
@ -89,6 +91,8 @@ mkinitrd_setup
|
|||||||
mkinitrd_setup
|
mkinitrd_setup
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 09 2008 bwalle@suse.de
|
||||||
|
- Delete unused function onboard_device_type() (bnc#433795).
|
||||||
* Thu Jul 31 2008 bwalle@suse.de
|
* Thu Jul 31 2008 bwalle@suse.de
|
||||||
- integrate biosdevname to initrd (bnc#403269, FATE#301528)
|
- integrate biosdevname to initrd (bnc#403269, FATE#301528)
|
||||||
* Sat Sep 22 2007 bwalle@suse.de
|
* Sat Sep 22 2007 bwalle@suse.de
|
||||||
|
Loading…
x
Reference in New Issue
Block a user