login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
23
Re: [PATCH 01/15] kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Greg KH
Subject:
Re: [PATCH 01/15] kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.
Date: Friday, August 22, 2008 - 7:14 pm
On Fri, Aug 22, 2008 at 03:41:53PM +0300, Ville Syrjälä wrote:
quoted text
> On Thu, Aug 21, 2008 at 10:32:49AM -0700, Greg Kroah-Hartman wrote: > > From: Ingo Oeser <ioe-lkml@rameria.de> > > > > A recent patch from Kay Sievers <kay.sievers@vrfy.org> > > replaced the first occurrence of '/' with '!' as needed for block devices. > > > > Now do some cheap defensive coding and replace all of them to avoid future > > issues in this area. > > > > Signed-off-by: Ingo Oeser <ioe-lkml@rameria.de> > > Cc: Kay Sievers <kay.sievers@vrfy.org> > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> > > --- > > lib/kobject.c | 3 +-- > > 1 files changed, 1 insertions(+), 2 deletions(-) > > > > diff --git a/lib/kobject.c b/lib/kobject.c > > index bd732ff..fbf0ae2 100644 > > --- a/lib/kobject.c > > +++ b/lib/kobject.c > > @@ -223,8 +223,7 @@ static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, > > return -ENOMEM; > > > > /* ewww... some of these buggers have '/' in the name ... */ > > - s = strchr(kobj->name, '/'); > > - if (s) > > + while ((s = strchr(kobj->name, '/'))) > > s[0] = '!'; > > That's somewhat inefficient. How about this? > > s = kobj->name; > while ((s = strchr(s, '/'))) > *s++ = '!';
Sure, but does it really matter? thanks, greg k-h --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[GIT PATCH] driver core patches against 2.6.26-rc4
, Greg KH
, (Thu Aug 21, 10:30 am)
[PATCH 01/15] kobject: Replace ALL occurrences of '/' with ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 02/15] Japanese translation of Documentation/Submit ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 03/15] Documentation: HOWTO-ja_JP-sync patch
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 04/15] drivers/base/driver.c: remove unused to_dev( ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 05/15] dev_printk(): constify the `dev' argument
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 06/15] driver model: anti-oopsing medicine
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 07/15] PM: don't skip device PM init when CONFIG_PM ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 08/15] driver core: add init_name to struct device
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 09/15] PM: Remove WARN_ON from device_pm_add
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 10/15] block: fix partial read() of /proc/{partitio ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 11/15] block: drop references taken by class_find_d ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:32 am)
[PATCH 12/15] UIO: uio_pdrv: fix memory leak
, Greg Kroah-Hartman
, (Thu Aug 21, 10:33 am)
[PATCH 13/15] UIO: uio_pdrv: fix license specification
, Greg Kroah-Hartman
, (Thu Aug 21, 10:33 am)
[PATCH 14/15] UIO: generic irq handling for some uio platf ...
, Greg Kroah-Hartman
, (Thu Aug 21, 10:33 am)
[PATCH 15/15] pnp: fix "add acpi:* modalias entries"
, Greg Kroah-Hartman
, (Thu Aug 21, 10:33 am)
Re: [PATCH 06/15] driver model: anti-oopsing medicine
, David Brownell
, (Thu Aug 21, 11:24 am)
Re: [PATCH 06/15] driver model: anti-oopsing medicine
, Greg KH
, (Thu Aug 21, 1:04 pm)
Re: [PATCH 01/15] kobject: Replace ALL occurrences of '/' ...
, Ville
, (Fri Aug 22, 5:41 am)
Re: [PATCH 01/15] kobject: Replace ALL occurrences of '/' ...
, Greg KH
, (Fri Aug 22, 7:14 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate