Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 99420
Collapse All | Expand All

(-)src.orig/hardware_info.h (-11 / +38 lines)
Lines 39-46 Link Here
39
Glib::ustring ethc2 = "";
39
Glib::ustring ethc2 = "";
40
40
41
bool sbinpath = true;
41
bool sbinpath = true;
42
bool usrsbin = false;
42
Glib::ustring lspci_path1 = "/sbin/lspci";
43
Glib::ustring lspci_path1 = "/sbin/lspci";
43
Glib::ustring lspci_path2 = "lspci";
44
Glib::ustring lspci_path2 = "lspci";
45
Glib::ustring lspci_path3 = "/usr/sbin/lspci";
44
46
45
//lspci path check
47
//lspci path check
46
void Lspci() {
48
void Lspci() {
Lines 57-62 Link Here
57
    sbinpath = false;
59
    sbinpath = false;
58
  }
60
  }
59
  fin.close();
61
  fin.close();
62
  fin.open("/usr/sbin/lspci",std::ios::in);
63
  if(fin.is_open()) {
64
    sbinpath = false;
65
    usrsbin = true;
66
  }
67
  fin.close();
60
}
68
}
61
69
62
//motherboard chipset
70
//motherboard chipset
Lines 67-75 Link Here
67
	Glib::ustring grep_bridge = " | grep bridge";
75
	Glib::ustring grep_bridge = " | grep bridge";
68
	if (sbinpath == true)
76
	if (sbinpath == true)
69
		path = lspci_path1 + grep_bridge;
77
		path = lspci_path1 + grep_bridge;
70
	else
78
	else {
71
		path = lspci_path2 + grep_bridge;
79
		if (usrsbin == true)
72
	
80
			path = lspci_path3 + grep_bridge;
81
		else
82
			path = lspci_path2 + grep_bridge;
83
	}
73
	FILE *file;
84
	FILE *file;
74
85
75
	char mot1[150];
86
	char mot1[150];
Lines 109-116 Link Here
109
	Glib::ustring grep_ide = " | grep IDE";
120
	Glib::ustring grep_ide = " | grep IDE";
110
	if (sbinpath == true)
121
	if (sbinpath == true)
111
		path = lspci_path1 + grep_ide;
122
		path = lspci_path1 + grep_ide;
112
	else
123
	else {
113
		path = lspci_path2 + grep_ide;
124
		if (usrsbin == true)
125
			path = lspci_path3 + grep_ide;
126
		else
127
			path = lspci_path2 + grep_ide;
128
	}
114
	
129
	
115
	FILE *file;
130
	FILE *file;
116
	
131
	
Lines 135-142 Link Here
135
	Glib::ustring grep_vga = " | grep VGA";
150
	Glib::ustring grep_vga = " | grep VGA";
136
	if (sbinpath == true)
151
	if (sbinpath == true)
137
		path = lspci_path1 + grep_vga;
152
		path = lspci_path1 + grep_vga;
138
	else
153
	else {
139
		path = lspci_path2 + grep_vga;
154
		if (usrsbin == true)
155
			path = lspci_path3 + grep_vga;
156
		else
157
			path = lspci_path2 + grep_vga;
158
	}
140
	
159
	
141
	FILE *file;
160
	FILE *file;
142
	
161
	
Lines 161-168 Link Here
161
	Glib::ustring grep_audio = " | grep audio";
180
	Glib::ustring grep_audio = " | grep audio";
162
	if (sbinpath == true)
181
	if (sbinpath == true)
163
		path = lspci_path1 + grep_audio;
182
		path = lspci_path1 + grep_audio;
164
	else
183
	else {
165
		path = lspci_path2 + grep_audio;
184
		if (usrsbin == true)
185
			path = lspci_path3 + grep_audio;
186
		else
187
			path = lspci_path2 + grep_audio;
188
	}
166
	
189
	
167
	FILE *file;
190
	FILE *file;
168
	
191
	
Lines 195-202 Link Here
195
	Glib::ustring grep_eth = " | grep Ethernet";
218
	Glib::ustring grep_eth = " | grep Ethernet";
196
	if (sbinpath == true)
219
	if (sbinpath == true)
197
		path = lspci_path1 + grep_eth;
220
		path = lspci_path1 + grep_eth;
198
	else
221
	else {
199
		path = lspci_path2 + grep_eth;
222
		if (usrsbin == true)
223
			path = lspci_path3 + grep_eth;
224
		else
225
			path = lspci_path2 + grep_eth;
226
	}
200
	
227
	
201
	FILE *file;
228
	FILE *file;
202
	
229
	
(-)src.orig/usb_info.h (-2 / +6 lines)
Lines 44-51 Link Here
44
	Glib::ustring grep_usb = " | grep USB";
44
	Glib::ustring grep_usb = " | grep USB";
45
	if (sbinpath == true)
45
	if (sbinpath == true)
46
		path = lspci_path1 + grep_usb;
46
		path = lspci_path1 + grep_usb;
47
	else
47
	else {
48
		path = lspci_path2 + grep_usb;
48
		if (usrsbin == true)
49
			path = lspci_path3 + grep_usb;
50
		else
51
			path = lspci_path2 + grep_usb;
52
	}
49
	
53
	
50
	FILE *file;
54
	FILE *file;
51
55

Return to bug 99420