summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NNI.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usb_NNI.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usb_NNI.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp
index e90204c..50c6e8d 100644
--- a/noncore/settings/networksettings2/usb/usb_NNI.cpp
+++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp
@@ -32,21 +32,30 @@ void AUSB::commit( void ) {
}
}
-bool AUSB::hasDataFor( const QString & S ) {
- return (S== "interfaces");
-}
+short AUSB::generateFileEmbedded( const QString & ID,
+ const QString & Path,
+ QTextStream & TS,
+ long DevNr ) {
-bool AUSB::generateDataForCommonFile( SystemFile & S, long DevNr ) {
QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr );
+ short rvl, rvd;
+
+ rvl = 1;
- if( S.name() == "interfaces" ) {
+ if( ID == "interfaces" ) {
+ Log(("Generate USB for %s\n", ID.latin1() ));
// generate mapping stanza for this interface
- S << " pre-up "
+ TS << " pre-up "
<< QPEApplication::qpeDir()
<< "bin/setmacaddress.sh "
<< NIC
<< " || true"
<< endl;
+ rvl = 0;
}
- return 0;
+ rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr );
+
+ return (rvd == 2 || rvl == 2 ) ? 2 :
+ (rvd == 0 || rvl == 0 ) ? 0 : 1;
+
}