ACC SHELL

Path : /usr/share/YaST2/modules/
File Upload :
Current File : //usr/share/YaST2/modules/NewID.ybc

YaST bytecode 1.4.0NewID3	NewID.ycpStringReport
ModuleLoadingLinuxrc	FileUtilshwinfo/routines.ycphwinfo/classnames.ycp
ClassNames	trans_table		

resolution	modules		translate_hw_entry		

classtostring		representant_order		trans_str		icon		
trans_bool	scalarget_representant		
expandTreesave_hwinfo	save_hwinfo_to_file	mount_device		
umount_device	has_hex_prefix	remove_hex_prefix		add_hex_prefix		new_ids	removed_ids	
pcidevicesrefresh_proposal 
configfile	!
GetPCIdevices"AddID		#RemoveID$	GetNewIDs	%GetNewID	&SetNewID	'RefreshProposal(Read	)prepend_option				*AddIDs+FormatActivationString	,Activate-
HwcfgFileName	.
WriteHwcfg/RemoveExistingFile	0Write1GetModelString		2MakeProposal	!!"""3new_id		##Oindex$$b%%findex&&jnid	index''o((sfilename	**id,,Z0011Xuniq	22j:3SCRReadWriteDir	Execute3UI
OpenDialogCloseDialogGlyph	
AskForSaveFileName				3SCRReadWriteDir	Execute3
StringQuote			CutBlanks		3ReportError	3
ModuleLoadingLoad
				3Linuxrcmanual3	FileUtilsExists	1hwinfo/routines.ycp0tune1hwinfo/classnames.ycp0base$)nameUnclassified devicebaseUnclassified devicebase"VGA compatible unclassified devicebasenameMass storage controllerbaseSCSI storage controllerbase
IDE interfacebaseFloppy disk controllerbaseIPI bus controllerbaseRAID bus controllerbaseUnknown mass storage controllerbasenameNetwork controllerbaseEthernet controllerbaseToken ring network controllerbaseFDDI network controllerbaseATM network controllerbaseISDN controllerbaseNetwork controllerbaseMyrinet controllerbasenameDisplay controllerbaseVGA-compatible controllerbaseXGA-compatible controllerbase
3D controllerbaseDisplay controllerbasenameMultimedia controllerbaseMultimedia video controllerbaseMultimedia audio controllerbaseComputer telephony devicebaseMultimedia controllerbasenameMemory controllerbase
RAM memorybaseFLASH memorybaseMemory controllerbase
nameBridgebaseHost bridgebase
ISA bridgebaseEISA bridgebaseMicroChannel bridgebase
PCI bridgebase
PCMCIA bridgebaseNuBus bridgebaseCardBus bridgebaseRACEway bridgebase	!Semitransparent PCI-to-PCI bridgebase
InfiniBand to PCI host bridgebaseBridgebasenameCommunication controllerbaseSerial controllerbaseParallel controllerbaseMultiport serial controllerbaseModembaseCommunication controllerbasenameGeneric system peripheralbasePICbaseDMA controllerbaseTimerbaseRTCbasePCI hotplug controllerbaseSystem peripheralbase	nameInput device controllerbaseKeyboard controllerbase
Digitizer penbaseMouse controllerbaseScanner controllerbaseGameport controllerbaseInput device controllerbase
nameDocking stationbaseGeneric docking stationbaseDocking stationbasename	Processorbase386base486basePentiumbaseAlphabase Power PCbase0MIPSbase@CoprocessorbasenameSerial bus controllerbaseFireWire (IEEE 1394)base
ACCESS busbaseSSAbaseUSB controllerbase
Fiber channelbaseSMBusbase
InfiniBandbase
nameWireless controllerbaseIRDA controllerbaseConsumer IR controllerbase
RF controllerbaseWireless controllerbasenameIntelligent controllerbaseI2Obasename#Satellite communications controllerbaseSatellite TV controllerbase(Satellite audio communication controllerbase(Satellite voice communication controllerbase'Satellite data communication controllerbasenameEncryption controllerbase'Network and computing encryption devicebaseEntertainment encryption devicebaseEncryption controllerbasenameSignal processing controllerbaseDPIO modulebasePerformance countersbaseCommunication synchronizerbaseSignal processing controllerbasenameUnclassified devicebasenameMonitorbaseCRT monitorbaseLCD monitorbasenameInternally used classbaseISA PnP interfacebaseMain memorybaseCPUbaseFPUbaseBIOSbasePROMbaseSystembasenameModembaseModembase	Win modembasenameISDN adapterbasenamePS/2 controllerbasenameMousebase
PS/2 mousebaseSerial mousebase	Bus mousebase	USB mousebaseMousebasenameMass storage devicebaseDiskbaseTapebaseCD-ROMbaseFloppy diskbaseStorage devicebasenameNetwork interfacebaseLoopbackbaseEthernetbase
Token ringbaseFDDIbaseCTCbaseIUCVbaseHSIbaseQETHbaseESCONbase	MyrinetbaseNetwork interfacebasenameKeyboardbaseKeyboardbaseConsolebase	namePrinterbase
nameHubbaseUSB hubbasenameBraille displaybasenameScannerbase
nameJoystickbaseGamepadbasenameChipcard readerbasenameCamerabaseWebcambaseDigital camerabasenameFramebufferbaseVESA framebufferbasenameDVB cardbase
DVB-C cardbase
DVB-S cardbase
DVB-T cardbasenameTV cardbasename	PartitionbasenameDSL cardbasenameBluetooth devicebase2hwinfo/routines.ycp$			evalarchitectureArchitecturetune
yast-hardwarebusBustune
yast-hardwarebus_idBus IDtune
yast-hardwarecacheCachetune
yast-hardware	card_type	Card Typetune
yast-hardwarecardtype	Card Typetune
yast-hardwareclass_idClasstune
yast-hardwarecdtypeCD Typetuneyast-cddev_nameDevice Nametune
yast-hardwaredev_numDevice Numberstune
yast-hardwaresysfs_idSysfs IDtune
yast-hardwaredeviceDevicetune
yast-hardware	device_idDevice Identifiertune
yast-hardwaredriversDriverstune
yast-hardwaredriverDrivertune
yast-hardwaretypeTypetune
yast-hardwaremajorMajortuneyast-partitioningminorMinortuneyast-partitioningrangeRangetune
yast-hardwaresmbiosSMBIOStune
yast-hardwareprog_if	Interfacetune
yast-hardwareresource	Resourcestune
yast-hardwarerequiresRequirestune
yast-hardwarerevRevisiontune
yast-hardwareslot_idSlot IDtune
yast-hardwarelengthLengthtune
yast-hardwarewidthWidthtune
yast-hardwareheightHeighttune
yast-hardwareactiveActivetune
yast-hardware	dev_namesDevice Namestune
yast-hardwarecolorColorstune
yast-hardwaredisk_log_geoLogical Geometrytune
yast-hardwarecountCounttune
yast-hardwaremodeModetune
yast-hardwareirqIRQtune
yast-hardwareioIO Porttune
yast-hardwarememMemorytune
yast-hardwaredmaDMAtune
yast-hardware	bus_hwcfg	Hwcfg Bustune
yast-hardwaresysfs_bus_idSysfs IDtune
yast-hardwareparent_unique_keyParent Unique IDtune
yast-hardwareudiUDItune
yast-hardwareuniqueid	Unique IDtuneyast-x11vfreqVertical Frequencytuneyast-x11	max_hsyncMax. Horizontal Frequencytuneyast-x11	max_vsyncMax. Vertical Frequencytuneyast-x11	min_hsyncMin. Horizontal Frequencytuneyast-x11	min_vsyncMin. Vertical Frequencytuneyast-x11dvdDVDtune
yast-cdrom
driver_module
Kernel Drivertune
yast-hardwarehwaddr
HW Addresstune
yast-hardwarebios_idBIOS IDtune
yast-hardwareenabledEnabledtune
yast-hardware
monitor_resol
Resolutiontuneyast-x11sizeSizetuneyast-x11old_unique_keyOld Unique Keytuneyast-x11sub_class_idClass (spec)tuneyast-x11
sub_device
Device (spec)tuneyast-x11
sub_device_idDevice Identifier (spec)tuneyast-x11
sub_vendor	Subvendortuneyast-x11
sub_vendor_idSubvendor Identifiertuneyast-x11
unique_key
Unique Keytuneyast-x11vendorVendortuneyast-x11	vendor_idVendor Identifiertuneyast-x11
bios_video
BIOS Videotuneyast-x11	boot_archBoot Architecturetuneyast-bootloader	boot_disk	Boot Disktuneyast-bootloaderblock
Block Devicestune	yast-diskredasd
DASD Diskstune	yast-dasdcdromCD-ROMtune
yast-cdromcpuCPUtune
yast-hardwarediskDisktune	yast-diskdisplayDisplaytuneyast-x11floppyFloppy Disktuneyast-floppyframebufferFramebuffertuneyast-x11has_apmHas APMtuneyast-power-management
has_pcmcia
Has PCMCIAtune
yast-hardwarehas_smpHas SMPtune
yast-hardwareis_uml
UML Systemtuneyast-vm-managementihw_data
Hardware Datatune
yast-hardwareisdnISDNtune	yast-isdnkeyboardKeyboardtune
yast-keyboardmonitorMonitortuneyast-x11netdevNetwork Devicestuneyast-lannetifNetwork Interfacetuneyast-lanprinterPrintertuneyast-printermodemModemtune
yast-modemsoundSoundtune
yast-soundstorage
Storage Mediatune	yast-disksystemSystemtune
yast-hardwaretvTV Cardtuneyast-tvdvbDVB Cardtuneyast-tvusb_typeUSB Typetune
yast-hardwareversionVersiontune
yast-hardwarememoryMemorytune
yast-hardwarenetcardNetwork Cardtuneyast-lanbiosBIOStune
yast-hardwarefbdevFramebuffer Devicetuneyast-x11ideIDEtune	yast-diskpciPCItune
yast-hardwareusbUSBtune
yast-hardwareisapnpISA PnPtune
yast-hardwareusbctrlUSB Controllertune
yast-hardwarehubUSB Hubtune
yast-hardwareieee1394ctrlIEEE1394 Controllertune
yast-hardwarescsiSCSItune
yast-hardwarescannerScannertuneyast-scannermouseMousetune
yast-mousejoystickJoysticktune
yast-joystickbrailleBraille Displaytune
yast-hardwarechipcardChipcard Readertune
yast-hardwarecameraCameratune
yast-hardwarepppoePPP over Ethernettuneyast-dslbogomips)Bogus Millions of Instructions Per Secondtune
yast-hardwarecacheCachetune
yast-hardwarecoma_bugComa Bugtune
yast-hardwaref00f_bugf00f Bugtune
yast-hardwarecpuid_levelCPU ID Leveltune
yast-hardwaremhz	Frequencytune
yast-hardwarefdiv_bugFloating point division bugtune
yast-hardwareflagsFlagstune
yast-hardwarefpuFloating Point Unittune
yast-hardware
fpu_exceptionFloating Point Unit Exceptiontune
yast-hardwarehlt_bugHalt Bugtune
yast-hardware	processor	Processortune
yast-hardwaresteppingSteppingtune
yast-hardware	vendor_idVendor Identifiertune
yast-hardwarefamilyFamilytune
yast-hardwaremodelModeltune
yast-hardwarewpWPtune
yast-hardwarewlanWireless LANtune	yast-wifitapeTapetune
yast-hardware	bluetooth	Bluetoothtuneyast-bluetoothdslDSLtuneyast-dslEthernet network interfaceEthernet Network Interfacetuneyast-lanNetwork InterfaceNetwork Interfacetuneyast-lanLoopback network interfaceLoopback Network Interfacetuneyast-lan	Partition	Partitiontune	yast-diskFloppy DiskFloppy Disktuneyast-floppyFloppy disk controllerFloppy Disk Controllertuneyast-floppyPnP Unclassified devicePnP Unclassified Devicetune
yast-hardwareUnclassified deviceUnclassified Devicetune
yast-hardwareMain MemoryMain Memorytune
yast-hardwareUHCI Host ControllerUHCI Host Controllertune
yast-hardwareEHCI Host ControllerEHCI Host Controllertune
yast-hardwareOHCI Host ControllerOHCI Host Controllertune
yast-hardwareprobe	
yast-hardware%L
am(Mhaskey	height4N-O		
sformat		
%1x%2	width	height-Q		width%Tval	outlist	,U	
	y2warning	
calling modules with param: %1	$V
				mapliste		+				modprobe 			mergestring			 -Z
%dhw	ret	$f
	(hhaskey	class_id4iiclassidclassid	$j	class_id$k	name&m
			add
class_id(ohaskey	sub_class_id4pisubclassid
subclassid	$q	sub_class_id$r	&s
			add
sub_class_id-w
%
am	trans	$
	-	
sub_class_id$	
sub_devicedevice
model namemodelvendorirqstartnamexkbmodelserversizeunitwidth	cylindersdev_namemodulessub_class_idmodulestype%str	(!haskey		4,	
	y2warning	
Cannot translate string '%1'	-				%str	(!haskey		4,	
	y2warning	
 Cannot find icon for string '%1'	--			%b(	4-	YestuneNotune-		
sformat		
%1	%node(||||||||||							4--%m	out	i$
$
)
size4key_name	$
	(haskey	4(start4&
	tohexstring		(modules4&
Modulestune(width4&

dummy	(sub_class_id4&

dummy	(device4&
		(haskey	dev_name4device	$		dev_name(4	&
		
sformat		
%1 (%2)tune
4&
		
sformat		
%1	.&
+
-
%!node("	4#-$	()&&	size	4*	node_list$+	(-4.tmp$/eval
(4!haskeymodel45&6	(<	4=->item		
sformat		
%1	(B	4Cloutqpos$E	$Fsize	$G,Hforeache	(J4K(L4M&Nadditem		
sformat		
%14Rlab	$S
ArrowRight(T	4Us	$W	(X4Y&Z&]additem&`+-c(e	4fnode_map	ltmp$h		$i	,j		foreachkey	v(n&&modules4o&p	(t||||
	4u&vadditem		
sformat		
%1: %2(x	4y&zadditem		
sformat		
%14}&~additem		
sformat		
%1-sort-	%file	command	(||		4-$
+			/usr/sbin/hwinfo > 	-SCR::Execute.target.bash
%target_file_name	filename	saved$
	*Save hwinfo Output to Filetune$
(&&
	size	
4,LabelSaving hardware information...tune&

,(
4,		
sformat		
&Saving output to the file '%1' failed.tune	-
%device	tmpdir	mpoint	result$
		SCR::Read.target.tmpdir$
+			
/mount,SCR::Execute
.target.mkdir
$
SCR::Execute
.target.mount	
-

%mount_point	-SCR::Execute.target.umount	%in	start	(	size		4-$
			substring			-||
0x
0X%in	(!	4-	-			substring			%in	(||		4-4-!	+			0x		2	NewID.ycp0tune$$	$$$  /etc/sysconfig/hardware/newids%"!(#4$&&	SCR::Read
.probe.pci()4*&+	-/%3"(546&7	(:&&		
4;(<4=&>	&?(A		contains	4B&D			filteri		(G!		contains	4H&I			add	&J%O#
removed_id	$P
	
	&R		remove	&S(V&&&&


!		contains
4W&X			add
(Z		contains
4[&]			filteri	


%b$-c%f%-g	
	%j&'k		&l%o'-p%s((t&&		4ufile	lines	comment	
&v	$y(z	4z&{		SCR::Read.target.string	4|,}	
y2milestone	
File %1 does not exist yet	(4-$			splitstring			
,	
y2debug	
	lines: %1$	,		foreachline	&(		regexpmatch		^#.*4&			add4parts	driver	sysdir	idparts	vendor	device		subvendor		subdevice	class		
class_mask	
driver_data	newid	$			splitstring			,$	$	&			mergestring						splitstring					 $			splitstring			 &			filterpart	&&$	$	$	$	$	$		$
	$
(&&&&&&	4viddidsvidsdid
$$$$(4&	tointeger!+			0x(4&	tointeger!+			0x(4&	tointeger!+			0x(4&	tointeger!+			0x,	
y2debug	
vid: %1,	
y2debug	
did: %1,	
y2debug	
svid: %1,	
y2debug	
sdid: %1,foreachdev!(&&-	vendor_id-	device_id4(&&haskey
sub_vendor_idhaskey
sub_device_id4(&&-
sub_vendor_id-
sub_device_id4'uniq	
unique_key4'uniq	
unique_key(!haskeyuniq4('vendor('device('	subvendor('	subdevice('class(	'
class_mask	(
'driver_data
('driver('sysdir(size'comment,	
y2milestone	
read newid: %1(
4&			add&	,	
y2milestone	
Read settings: %1--%	)newopt	opts	defval	(&&		4-
(	size		4-+			+				size				 	4-	%*newid$
	(haskey
uniq4,!foreachpcidev!("	
unique_key	
uniq4#,$	
y2debug	
Found PCI device: %1(&haskey	device_id4''(
device	tohexstring	-	device_id(*haskey
sub_device_id4+',
	subdevice	tohexstring	-
sub_device_id(.haskey	vendor_id4/'0
vendor	tohexstring	-	vendor_id(2haskey
sub_vendor_id43'4
	subvendor	tohexstring	-
sub_vendor_id-;
%>+newidret	
pci_any_id	
default_class	default_mask	$A
$C
ffffffff$D
0$E
0(Ghaskey	uniq4H&I	*	&L
)		
class_mask

&M
)		class

&N
)			subdevice

&O
)			subvendor

&P
)		device

&Q
)		vendor

-S
%Z,ret$[	(]4^,_foreachnewid
modulename	sysdir	
targetfile	idstring	filesize$`	driver$a	sysdir(d&&4e,fUnknown devicetune(l||4m&n$q		
sformat		
/sys/bus/pci/drivers/%1/new_id$t+$w	SCR::Read.target.size(y4zset$|
SCR::Execute.target.bash		
sformat		
echo '%1' > '%2'(~!
4,	
y2error	
0Setting the new id failed: driver: %1, value: %2&	4,	
y2milestone	
-File %1 - new PCI ID '%2' was succesfully set4,		
sformat		
0File '%1' does not exist. Cannot set new PCI ID.tune&	-	%-newidret	vendor	device	$
(haskey	uniq4&	*	$
		vendor$
		device(&&	size	
	size	
4	subvendor		subdevice	&
		
sformat		

vpid-%1-%2

$			subvendor$			subdevice(&&	size		size	4&
		
sformat		
%1-%2-%3
,	
y2debug	
activation string: %1
-
%.newidretcfgname	driver	$
$
-	$
		driver,	
y2debug	
	newid: %1	,	
y2debug	
cfgname: %1
,	
y2debug	

driver: %1
(&&

4	startmode	module_options	p$auto$$+.sysconfig.hardware.valuetopath
,
SCR::Write+.MODULE
,
SCR::Write+
.STARTMODE,
SCR::Write+.MODULE_OPTIONS,
SCR::Write.sysconfig.hardware-
%/fname	ret$
(&&		4(	SCR::Read.target.size	4res$SCR::Execute.target.bash+			/bin/rm 	(4,	
	y2warning	
(Removing of file %1 has failed, exit: %2	4,	
y2milestone	
Removed file: %1	-
%0ret	sysconfig	settings		
,	
y2milestone	
Writing PCI ID cofiguration...$	$	$	
(size4drvs	$
	SCR::Dir	.modprobe_newid.install(&&
size
4,		foreachd	
,
SCR::Write	add	.modprobe_newid.install(4,foreachnewid
modulename	sysdir	idstring		$	driver$	sysdir$+(
4
targetfile	install_string	current	$
$

		
sformat		
,echo '%1' > '/sys/bus/pci/drivers/%2/new_id'
$
			&
			add

'	
,.(haskeycomment4&	+			+							mergestring			comment	

&	+			+			+				,( 4!&"	+			+				,&&	+				
(,	size		4-&/	&&	
SCR::Write.target.string 	42,4/ (8size	49,:				foreach
modulename	values		install_string	$;		
sformat		
&/sbin/modprobe --ignore-install %1; %2			mergestring			; &=	&&	
SCR::Write	add	.modprobe_newid.install,B
SCR::Write.modprobe_newid(Fsize4G,H		foreachrem	fname	$I-(K4L&N+			/etc/sysconfig/hardware/hwcfg-,O/-U	%X1ret	$Y
,[foreachd!(\	
unique_key	4]&^
	model-c
%j2ret	$k		(msize4n,oforeachnewid
modulename	sysdir	idstring	
targetfile	info	$p	driver$q	sysdir$s+$t$y		
sformat		
Driver: %1, New PCI ID: %2tune({haskeyuniq4|model	$}
1	uniq(&&

4&+					
sformat		
 (%1)
&				add	,	
y2milestone	
NewID proposal: %1	&-	

ACC SHELL 2018