summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NNI.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usb_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usb_NNI.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp
index 50c6e8d..600b771 100644
--- a/noncore/settings/networksettings2/usb/usb_NNI.cpp
+++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp
@@ -23,39 +23,37 @@ QWidget * AUSB::edit( QWidget * parent ) {
23} 23}
24 24
25QString AUSB::acceptable( void ) { 25QString AUSB::acceptable( void ) {
26 return ( GUI ) ? GUI->acceptable( ) : QString(); 26 return ( GUI ) ? GUI->acceptable( ) : QString();
27} 27}
28 28
29void AUSB::commit( void ) { 29void AUSB::commit( void ) {
30 if( GUI && GUI->commit( Data ) ) { 30 if( GUI && GUI->commit( Data ) ) {
31 setModified( 1 ); 31 setModified( 1 );
32 } 32 }
33} 33}
34 34
35short AUSB::generateFileEmbedded( const QString & ID, 35short AUSB::generateFileEmbedded( SystemFile & SF,
36 const QString & Path,
37 QTextStream & TS,
38 long DevNr ) { 36 long DevNr ) {
39 37
40 QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); 38 QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr );
41 short rvl, rvd; 39 short rvl, rvd;
42 40
43 rvl = 1; 41 rvl = 1;
44 42
45 if( ID == "interfaces" ) { 43 if( SF.name() == "interfaces" ) {
46 Log(("Generate USB for %s\n", ID.latin1() )); 44 Log(("Generate USB for %s\n", SF.name().latin1() ));
47 // generate mapping stanza for this interface 45 // generate mapping stanza for this interface
48 TS << " pre-up " 46 SF << " pre-up "
49 << QPEApplication::qpeDir() 47 << QPEApplication::qpeDir()
50 << "bin/setmacaddress.sh " 48 << "bin/setmacaddress.sh "
51 << NIC 49 << NIC
52 << " || true" 50 << " || true"
53 << endl; 51 << endl;
54 rvl = 0; 52 rvl = 0;
55 } 53 }
56 rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr ); 54 rvd = ANetNodeInstance::generateFileEmbedded(SF, DevNr );
57 55
58 return (rvd == 2 || rvl == 2 ) ? 2 : 56 return (rvd == 2 || rvl == 2 ) ? 2 :
59 (rvd == 0 || rvl == 0 ) ? 0 : 1; 57 (rvd == 0 || rvl == 0 ) ? 0 : 1;
60 58
61} 59}