On Fri, Dec 15, 2006 at 12:31:03PM -0800, Andrew Morton wrote: > On Sat, 16 Dec 2006 07:16:13 +1100 > Benjamin Herrenschmidt <[email protected]> wrote: > > > > Beware that sysfs_remove_bin_file() will complain loudly if you later > > > attempt to delete that file that was never created. > > > > That's another problem... what is a driver that creates 15 files > > supposed to do ? Have 15 booleans to remember which files where > > successfully created and then test all of them on cleanup ? That sounds > > like even more bloat to me... > > That's the sort of thing which should be done inside sysfs_create_group() > and sysfs_remove_group(). sysfs_create_group() and remove_group() handles this just fine right now. Or it should, if not, please let me know and I'll fix it. As for the bin_file stuff, those are very rare. And I'll gladly take patches that keep bad things from happening if you try to remove a file that isn't there. thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: sysfs file creation result nightmare
- From: Benjamin Herrenschmidt <[email protected]>
- Re: sysfs file creation result nightmare
- References:
- sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Benjamin Herrenschmidt <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Olivier Galibert <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Olivier Galibert <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Benjamin Herrenschmidt <[email protected]>
- Re: sysfs file creation result nightmare
- From: Jean Delvare <[email protected]>
- Re: sysfs file creation result nightmare
- From: Benjamin Herrenschmidt <[email protected]>
- Re: sysfs file creation result nightmare
- From: Andrew Morton <[email protected]>
- sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- Prev by Date: Re: Changes to PM layer break userspace
- Next by Date: Re: [PATCH 3/4] Add driver for OHCI firewire host controllers.
- Previous by thread: Re: sysfs file creation result nightmare
- Next by thread: Re: sysfs file creation result nightmare
- Index(es):