[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH] setup: Leeren Treibernamen abfangen
! setup: Leeren Netzwerktreibernamen abfangen. Bei AnsiStrings wird der
als nil dargestellt, womit C-Funktionen nicht so gut umgehen koennen.
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
src/modules/pas/setup/setup_network.pas | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/modules/pas/setup/setup_network.pas b/src/modules/pas/setup/setup_network.pas
index 941f2f3..f591de7 100644
--- a/src/modules/pas/setup/setup_network.pas
+++ b/src/modules/pas/setup/setup_network.pas
@@ -27,18 +27,20 @@ var
path: String;
f: text;
begin
- // Treiber laden
- c_servmgr_need(@driver[1]);
-
- // IP/Gateway setzen
- path := 'tcpip:/' + driver + '/0/ip';
- Assign(f, path);
-{$i-}
- Rewrite(f);
-{$i+}
- if IOResult = 0 then begin
- WriteLn(f, ip);
- Close(f);
+ if driver <> '' then begin
+ // Treiber laden
+ c_servmgr_need(@driver[1]);
+
+ // IP/Gateway setzen
+ path := 'tcpip:/' + driver + '/0/ip';
+ Assign(f, path);
+ {$i-}
+ Rewrite(f);
+ {$i+}
+ if IOResult = 0 then begin
+ WriteLn(f, ip);
+ Close(f);
+ end;
end;
path := 'tcpip:/route';
--
1.6.0.2