[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: PATCH Fix nash-find to not have double // in its output
- From: Martin Sivak <msivak redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: PATCH Fix nash-find to not have double // in its output
- Date: Thu, 5 Feb 2009 08:57:44 -0500 (EST)
Looks good.
----- "Hans de Goede" <hdegoede redhat com> wrote:
> Fix nash-find to not have double // in its output, and revert the
> workaround
> for this from my previous patch as that may cause trouble with older
> kernels.
> ---
> mkinitrd | 2 +-
> nash/nash.c | 4 ++++
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/mkinitrd b/mkinitrd
> index 6f4847f..a93ae79 100755
> --- a/mkinitrd
> +++ b/mkinitrd
> @@ -283,7 +283,7 @@ access() {
> finddevnoinsys() {
> majmin="$1"
> if [ -n "$majmin" ]; then
> - dev=$(for x in /sys/block/* ; do findall $x -name dev ; done
> | while
> read device ; do \
> + dev=$(for x in /sys/block/* ; do findall $x/ -name dev ; done
> | while
> read device ; do \
> echo "$majmin" | cmp -s $device && echo $device ;
> done)
> if [ -n "$dev" ]; then
> dev=${dev%%/dev}
> diff --git a/nash/nash.c b/nash/nash.c
> index 0dac89e..f40f837 100644
> --- a/nash/nash.c
> +++ b/nash/nash.c
> @@ -2276,6 +2276,10 @@ doFind(char * dirName, char * name, mode_t
> mask, dev_t
> *devno)
> return 0;
> }
>
> + /* Avoid getting // in the output */
> + if (dirName[strlen(dirName) - 1] == '/')
> + dirName[strlen(dirName) - 1] = 0;
> +
> errno = 0;
> while ((d = readdir(dir))) {
> errno = 0;
> --
> 1.6.1.2
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]