[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 2/2] If network --device=MAC is given, translate to device name (#185522).



Looks good,

Regards,

Hans


On 05/21/2009 10:16 PM, Chris Lumens wrote:
---
  loader/net.c |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index bebabcd..5531923 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1568,7 +1568,12 @@ void setKickstartNetwork(struct loaderData_s * loaderData, int argc,

      if (!noksdev) {
          if (device) {
-            loaderData->netDev = strdup(device);
+            /* If --device=MAC was given, translate into a device name now. */
+            if (index(device, ':') != NULL)
+                loaderData->netDev = iface_mac2device(device);
+            else
+                loaderData->netDev = strdup(device);
+
              loaderData->netDev_set = 1;
          }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]