On Fri, 4 Aug 2006 15:58:58 -0700 "Paul Menage" <[EMAIL PROTECTED]> wrote:
> On 8/4/06, Matt Helsley <[EMAIL PROTECTED]> wrote: > > > > Yes. Can userspace do a mkdir in sysfs? rmdir? My understanding is it > > cannot because sysfs directories represent groups of attributes the > > represent pre-existing kernel objects. In order to create a directory > > we'd likely have to invent some roundabout method for creating these > > objects -- perhaps by echo'ing to a file: > > > > echo 'classes/foo/bar/baz' > /sys/ckrm/mkdir > > Why is this worse than doing a mkdir() syscall? Because directories are created by mkdir(), not by open()+write(). The `echo' trick might cause problems in the presence of bind mounts and other namespace tricks, too. Dunno. And then there's the matter of implementing permission checking on the various directories which we're implicitly reading/lookupping/modifying. And return values. mkdir() can return EPERM/EEXIST/ENOMEM/etc. write() can just return 0. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech