xorat / grubutils

Automatically exported from code.google.com/p/grubutils
0 stars 0 forks source link

chkpci - improvement for specific OS #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

CHKPCI -u /DRIVERPACK.INI 

returns w2k, w2k3 and xp matching drivers. But we only want the driver for the 
OS we are installing.

Suggest add extra switch to only find correct driver

e.g.

CHKPCI -u /DRIVERPACK.INI  -os xp

This would skip any INI section containing:

ms_1_exc_skipIfOS="w2k,w2k3"

valid strings are  xp  w2k and w2k3   (ignore case)

so 
if using -os w2k3, then skip over any xp and w2k sections.
if using -os w2k, then skip over any xp and w2k3 sections.
if using -os xp, then skip over any w2k and w2k3 sections.

Original issue reported on code.google.com by Steve6375 on 31 Mar 2014 at 7:21

GoogleCodeExporter commented 9 years ago
Try this

chkpci -w:xp -u /DRIVERPACK.INI

Original comment by chenall.cn on 1 Apr 2014 at 6:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks but the logic is incorrect

if -w:xp is specified it finds sections with 

ms_1_exc_skipIfOS="xp"

this is incorrect!

it should **omit*** these entries - it should print any section which does NOT 
have xp

2. Also, can you make it case-insensitive please

e.g. -w:xp or -w:XP or -w:Xp will work the same

3. Please update Usage message

Thanks!

Original comment by Steve6375 on 1 Apr 2014 at 9:59

GoogleCodeExporter commented 9 years ago
Please try this.

it may be correct!

Original comment by chenall.cn on 1 Apr 2014 at 10:46

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If looking for 8086 2929 in

[I-3]
ms_count=2
; 7.0.0.1020
ms_1_deviceName="Intel Matrix 7.0 SATA-AHCI/RAID (w2k)"
ms_1_tag="iastor3k"
ms_1_sysFile="iastor.sys"
ms_1_hwids="PCI\VEN_8086&DEV_24D1&CC_0106,PCI\VEN_8086&DEV_27C1&CC_0106,PCI\VEN_
8086&DEV_2821&CC_0106,PCI\VEN_8086&DEV_27C3&CC_0104,PCI\VEN_8086&DEV_2829&CC_010
6,PCI\VEN_8086&DEV_282A&CC_0104,PCI\VEN_8086&DEV_2822&CC_0104"
ms_1_isBusExtender=false
ms_1_exc_skipIfOS="wxp,w2k3"

ms_2_deviceName="Intel 82801FB/FW/FBM(ICH6RW/M) Matrix 7.0 SATA-AHCI"
ms_2_tag="iastor3"
ms_2_sysFile="iastor.sys"
ms_2_hwids="PCI\VEN_8086&DEV_24D1&CC_0106,PCI\VEN_8086&DEV_2653&CC_0106"
; PCI\VEN_8086&DEV_24D1&CC_0106 not official HWID AFAIK and may be "red herring"
ms_2_isBusExtender=false
ms_2_exc_skipIfOS="w2k"

[I-4]
ms_count=1
; 7.8.0.1012
ms_1_deviceName="Intel xESB/ICH7-R(M)DH/EP80579 - Matrix 7.8"
ms_1_tag="iastor4"
ms_1_sysFile="iastor.sys"
ms_1_hwids="PCI\VEN_8086&DEV_2681&CC_0106,PCI\VEN_8086&DEV_2682&CC_0104,PCI\VEN_
8086&DEV_5029&CC_0106,PCI\VEN_8086&DEV_27C5&CC_0106,PCI\VEN_8086&DEV_2651&CC_010
6"
; PCI\VEN_8086&DEV_2651&CC_0106 not official HWID AFAIK and may be "red herring"
ms_1_isBusExtender=false
ms_1_exc_skipIfOS="w2k"

[I-5]
ms_count=1
; 10.1.0.1008
ms_1_deviceName="Intel ICH8M-E/R/DO/DH SATA-AHCI - RST 10.1"
ms_1_tag="iaStor5"
ms_1_sysFile="iaStor.sys"
ms_1_hwids="PCI\VEN_8086&DEV_2821&CC_0106,PCI\VEN_8086&DEV_2829&CC_0106"
ms_1_isBusExtender=false
ms_1_exc_skipIfOS="w2k"

and I use -w:xp     I get nothing reported
If I use -w:w2k     I get I-3 iastor3k (correct) and I-5 iastor5 (wrong) 
reported
If I use -w:w2k3    I get I-3 iastor3k (wrong) and I-5 iastor5 (correct) 
reported

Expected results should be:
-w:xp   --> I-5 iastor5
-w:w2k  --> I-3 iastor3k
-w:w2k3 --> I-5 iastor5

Original comment by Steve6375 on 1 Apr 2014 at 11:13

GoogleCodeExporter commented 9 years ago
-w:2k not -w:w2k and  -w:w2k3 is -w:2k3

Original comment by chenall.cn on 1 Apr 2014 at 12:06

Attachments:

GoogleCodeExporter commented 9 years ago
WORKS!!!
Thanks, this is great! Thank you very much!
:)
P.S. Can you update the repository with the .c source file please. The current 
.zip file is very old.

Original comment by Steve6375 on 1 Apr 2014 at 12:12

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r117.

Original comment by chenall.cn on 1 Apr 2014 at 12:28

GoogleCodeExporter commented 9 years ago

Original comment by chenall.cn on 1 Apr 2014 at 12:38

GoogleCodeExporter commented 9 years ago
Sorry, just found a problem
[I-5]
ms_count=1
; 10.1.0.1008
ms_1_deviceName="Intel ICH8M-E/R/DO/DH SATA-AHCI - RST 10.1xp"
ms_1_tag="iaStor5"
ms_1_sysFile="iaStor.sys"
ms_1_hwids="PCI\VEN_8086&DEV_2821&CC_0106,PCI\VEN_8086&DEV_2829&CC_0106"
ms_1_isBusExtender=false
ms_1_exc_skipIfOS="w2k,xp"

If I use -w:xp then this is still listed as a driver

so it is not checking for xp in skipIfOS ???

Original comment by Steve6375 on 1 Apr 2014 at 12:39

GoogleCodeExporter commented 9 years ago
Problem is it is testing for "wxp" in INI file , but it should be testing for 
"xp"

Original comment by Steve6375 on 1 Apr 2014 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by chenall.cn on 1 Apr 2014 at 2:07

Attachments:

GoogleCodeExporter commented 9 years ago
thanks! :)

Original comment by Steve6375 on 1 Apr 2014 at 2:10