lkml.org 
[lkml]   [2006]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.6.16.6


On Tue, 18 Apr 2006, Michael Buesch wrote:

> On Monday 17 April 2006 23:12, you 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 = strchr(name, '/');
> > + if (s)
> > + *s = '!';
> > return name;
> > }
>
> Is only one / possible, or better something like this?
>
> /* ewww... some of these buggers have / in name... */
> s = name;
> while ((s = strchr(s, '/')) != NULL)
> *s = '!';

I wonder why people like '!' as a replacement for '/'. It's nasty for
shell expansion, and it looks visually strange too (at least to me).
Wouldn't it be a lot nicer to just use something like '.' or ':' instead,
which is not as visually! distracting! and! screaming!

As to whether it's simpler to just use a character-at-a-time comparison
over strchr, I dunno. Maybe.

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:1.395 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site