From da67e62ce691ff64e6ec45b9bbea8e21830f1c52 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Tue, 12 Jan 2010 23:34:34 -0600 Subject: iscsi ibft/boot: fix net dev loopup This fixes a regression that was added in http://git.kernel.org/?p=linux/kernel/git/mnc/open-iscsi.git;a=commitdiff;h=222947129ca97998aa69ecafcaefb48cb9328c6a;hp=78da93a3b934759b5cd288cfbf414eaf84ce6ba9 by me when I was fixing up some diff errors. In newer kernels we will have failed with "Could not read ethernet to net link" because we are searching for net: and there is now a dir called net. --- utils/fwparam_ibft/fwparam_ibft_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/fwparam_ibft/fwparam_ibft_sysfs.c b/utils/fwparam_ibft/fwparam_ibft_sysfs.c index 98e29a6..4f88083 100644 --- a/utils/fwparam_ibft/fwparam_ibft_sysfs.c +++ b/utils/fwparam_ibft/fwparam_ibft_sysfs.c @@ -96,7 +96,7 @@ static int get_iface_from_device(char *id, struct boot_context *context) while ((dent = readdir(dirfd))) { if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, "..") || - strncmp(dent->d_name, "net", 3)) + strncmp(dent->d_name, "net:", 4)) continue; if (!strncmp(dent->d_name, "net:", 4)) { @@ -113,7 +113,7 @@ static int get_iface_from_device(char *id, struct boot_context *context) rc = 0; break; } else { - printf("Could not read ethernet to net link\n."); + printf("Could not read ethernet to net link.\n"); rc = EOPNOTSUPP; break; } -- cgit v1.2.1