Re: [PATCH] Fix block device symlink name

From: Stephen Rothwell
Date: Tue Apr 11 2006 - 08:08:35 EST


--Sig_oq1+5K0V6oaikP0Qhpp.mbd
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 11 Apr 2006 13:38:09 +0200 (MEST) Jan Engelhardt <jengelh@xxxxxxxxx=
wdg.de> wrote:
>
> >@@ -352,6 +353,10 @@ static char *make_block_name(struct gend
> > return NULL;
> > strcpy(name, block_str);
> > strcat(name, disk->disk_name);
> >+ /* ewww... some of these buggers have / in name... */
> >+ s =3D strchr(name, '/');
> >+ if (s)
> >+ *s =3D '!';
> > return name;
> > }
> >=20
>=20
> Can they have multiple '/'? If so, we need a while loop.

The other place that fixes this (just 10 or so lines further on in this
file) does not loop. Looking through the block devices, there is no
obvious place that creates a name with more than one '/'.

--=20
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

--Sig_oq1+5K0V6oaikP0Qhpp.mbd
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEO5wuFdBgD/zoJvwRAo2GAJ0SibgC9wbcxZhAnSBnX6JIVCnJzwCeKNVW
efn6wdnXH5z00+MuBwbA3BQ=
=gS6i
-----END PGP SIGNATURE-----

--Sig_oq1+5K0V6oaikP0Qhpp.mbd--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/