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

Re: [PATCH] fwparam_sysfs: fix pathname manipulation error in fwparam_sysfs_boot_info.



On 02/08/2011 03:05 AM, Ales Kozumplik wrote:
A slash was missing in the pathname producing nonexistent filenames
starting with "/sys/firmwareiscsi_boot5" instead of
"/sys/firmware/iscsi_boot5". Also see fwparam_sysfs_get_targets().
---
  utils/fwparam_ibft/fwparam_sysfs.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/fwparam_ibft/fwparam_sysfs.c b/utils/fwparam_ibft/fwparam_sysfs.c
index b5568c5..3997363 100644
--- a/utils/fwparam_ibft/fwparam_sysfs.c
+++ b/utils/fwparam_ibft/fwparam_sysfs.c
@@ -365,7 +365,7 @@ int fwparam_sysfs_boot_info(struct boot_context *context)
  		if (strncmp(dent->d_name, ISCSI_LLD_SUBSYS_PREFIX, 10))
  			continue;

-		snprintf(lld_root, FILENAMESZ, ISCSI_LLD_ROOT"%s",
+		snprintf(lld_root, FILENAMESZ, ISCSI_LLD_ROOT"%s/",
  			 dent->d_name);
  		if (!get_boot_info(context, lld_root, dent->d_name))
  			goto done;

Ah shoot. Missed that. Nice catch and thanks. Merged.


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