[Ocfs2-tools-devel] [Fwd: [PATCH] support /sys/block symlinks]
Sunil Mushran
sunil.mushran at gmail.com
Thu Jan 24 23:39:59 PST 2013
Acked-by: sunil.mushran at gmail.com
On Tue, Jan 22, 2013 at 9:11 AM, Srinivas Eeda <srinivas.eeda at oracle.com>wrote:
>
>
>
> When running a kernel without SYSFS_DEPRECATED, /sys/block contains
> symlinks
> This patch will follow symlinks, otherwise these devices get filtered out.
> ---
> libtools-internal/scandisk.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/libtools-internal/scandisk.c b/libtools-internal/scandisk.c
> index b95f7bb..f531be8 100644
> --- a/libtools-internal/scandisk.c
> +++ b/libtools-internal/scandisk.c
> @@ -677,7 +677,11 @@ static int scansysfs(struct devlisthead *devlisthead,
> const char *path, int leve
>
> if (!lstat(newpath, &sb) && level)
> if (S_ISLNK(sb.st_mode))
> - continue;
> + /* newer version of sysfs has symlinks -
> + * follow them */
> + if (!stat(newpath, &sb))
> + if (S_ISBLK(sb.st_mode))
> + continue;
>
> has_holder = parent_holder;
>
> --
> 1.5.6.5
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20130124/46a66f6f/attachment.html
More information about the Ocfs2-tools-devel
mailing list