Re: Eliminating nested functions

2009-04-18 Thread Colin D Bennett
David Miller wrote on Friday 17 April 2009: > From: Pavel Roskin > Date: Fri, 17 Apr 2009 11:54:57 -0400 > > > I suggest that we eliminate all nested functions. > > I support this completely. Me too. While I like the idea of nested functions, since they are like closures and make a lot of commo

[PATCH] bless command

2009-04-18 Thread Vladimir Serbinenko
Hello, due to request by ams I wrote this. It's an analog of "bless" command available under OSX rewritten using grub2 fs functions and according to apple specification of hfs+ on-disk format. This command only update the blessed folder on a partition it doesn't change which drive is used for booti

Re: [PATCH] bless command

2009-04-18 Thread Vladimir Serbinenko
Sorry, forgot to attach the file On Sat, Apr 18, 2009 at 8:59 PM, Vladimir Serbinenko wrote: > Hello, due to request by ams I wrote this. It's an analog of "bless" > command available under OSX rewritten using grub2 fs functions and according > to apple specification of hfs+ on-disk format. This

Re: [PATCH] bless command

2009-04-18 Thread Isaac Dupree
Vladimir Serbinenko wrote: > Syntax: > hfspbless > It works only on HFS+ volumes. Could it be named 'hfsplusbless' (or possibly 'hfs+bless') (I guess our current naming style involves no underscores or other word-separation)? For example, Linux `mount` calls the filesystem `hfsplus`, and I lik

Re: Eliminating nested functions

2009-04-18 Thread David Miller
From: Colin D Bennett Date: Sat, 18 Apr 2009 08:57:33 -0700 > Probably passing a pointer to a local structure is the easiest way > to do it in most cases if the iteration function needs to access > some state, right? Right. The biggest surprise for me, easily, when reading the grub2 sources for

Re: [PATCH] bless command

2009-04-18 Thread Peter Cros
Hi, Tested and works on Apple imac81 with Mac OSX 10.5, patch applied to r 2074 grub> hfspbless (hd0,3)/efi Last login: Sun Apr 19 14:30:23 on console im81:~ pxw$ bless --info /Volumes/hfsp finderinfo[0]: 52 => Blessed System Folder is /Volumes/hfsp/efi finderinfo[1]: 0 => No Blessed Sy

Re: Eliminating nested functions

2009-04-18 Thread Bean
Hi, Yeah, I agree with you. The conversion will take some effort, but it could payoff in the long run. Perhaps we can achieve this in two steps: 1, Change nested function definition to accept only one parameter. For function with multiple parameters, place them in a structure and pass the pointer