lkml.org 
[lkml]   [2009]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories.
    Kay Sievers <kay.sievers@vrfy.org> writes:

    >> Let's make the plan to investigate these, and see how hard it would be
    >> to actually remove these with the current device/sysfs infrastructure.
    >>
    >> Fixing the users and adding back auto-deletion are the only two real options.
    >
    > Seems, we should remove non-directory files, which in most cases belong
    > to the kobject itself, but the user's cleanup logic does not cover the
    > removal of the created files.
    >
    > But I think, we should still warn, if we find a sub-directory inside a
    > directory we are going to remove.

    So far complaining about deleting non-empty directories is finding
    real bugs. It does not appear that too many users that delete
    non-empty directories.

    My plan moving forward is to see what has goofed and how hard it is to
    change the callers to clean up after themselves. If it is not a pain
    to fix the callers who forget to delete their attributes that looks
    like the right way forward.

    It is certainly the principle of least surprise.

    Eric


    \
     
     \ /
      Last update: 2009-05-25 09:55    [W:3.416 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site