Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-04 Thread Felix Zielcke
Commited in the hope that Marco isn't angry with me ;) and I noticed I used still past once and there was a reason for len = +1 and if < len not <= len Am Dienstag, den 02.09.2008, 17:59 +0200 schrieb Felix Zielcke: > Am Dienstag, den 02.09.2008, 17:59 +0300 schrieb Vesa Jääskeläinen: > > Felix

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-02 Thread Vesa Jääskeläinen
Felix Zielcke wrote: > Am Dienstag, den 02.09.2008, 17:59 +0300 schrieb Vesa Jääskeläinen: >> Felix Zielcke wrote: >> >> sizeof returns type of size_t so it would be good that char k uses that. >> I am a bit surprised that this didn't generate compiler warning? > > Well somewhere hidden in a mail

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-02 Thread Felix Zielcke
Am Dienstag, den 02.09.2008, 17:59 +0300 schrieb Vesa Jääskeläinen: > Felix Zielcke wrote: > > sizeof returns type of size_t so it would be good that char k uses that. > I am a bit surprised that this didn't generate compiler warning? Well somewhere hidden in a mail from me, I think I already wr

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-02 Thread Vesa Jääskeläinen
Felix Zielcke wrote: > Am Dienstag, den 02.09.2008, 00:46 +0200 schrieb Felix Zielcke: > >> I'm too lazy now to make a new patch and go sleeping now. >> [...] >> >> I hope that Marco could have a quick look over it especially the >> changelog part :) > > Final patch attached. > In changelog I had

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-02 Thread Robert Millan
On Tue, Sep 02, 2008 at 12:46:11AM +0200, Felix Zielcke wrote: > > I'm now not that sure if that #define k would be okay, seems like Vesa > isn't liking macros. If you use macros, please give them meaningful names. But a macro just for sizeof("foo") isn't much of an improvemtn, since the resulti

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-02 Thread Felix Zielcke
Am Dienstag, den 02.09.2008, 00:46 +0200 schrieb Felix Zielcke: > I'm too lazy now to make a new patch and go sleeping now. > [...] > > I hope that Marco could have a quick look over it especially the > changelog part :) Final patch attached. In changelog I had again past and present mixed and I

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-01 Thread Felix Zielcke
Am Dienstag, den 02.09.2008, 00:14 +0200 schrieb Robert Millan: > On Mon, Aug 18, 2008 at 05:05:26PM +0200, Felix Zielcke wrote: > > + unsigned char i, j, k, l; > > I think using unsigned chars to store "integers" is counter-intuitive, and in > some cases possibly dangerous (overflow). I should

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-01 Thread Robert Millan
On Mon, Aug 18, 2008 at 05:05:26PM +0200, Felix Zielcke wrote: > + unsigned char i, j, k, l; I think using unsigned chars to store "integers" is counter-intuitive, and in some cases possibly dangerous (overflow). > + grub_dev = xmalloc (strlen (os_dev) - strlen ("/dev/mapper/") + 1); > +

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-09-01 Thread Felix Zielcke
Am Montag, den 18.08.2008, 17:16 +0200 schrieb Felix Zielcke: > Well attached is now the right one. I want to bring the topic up again, so that this hopefully, so that this hopefully won't get forgotten for a while again. I have just noticed that we have a regression in our new debian experiment

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-18 Thread Felix Zielcke
Am Montag, den 18.08.2008, 17:05 +0200 schrieb Felix Zielcke: > Am Donnerstag, den 14.08.2008, 23:15 +0200 schrieb Felix Zielcke: > > So I made now the getroot.diff new without indenting the whole switch > > block by 2 spaces. > > Thanks to Marco and Emacs, I know now that the `case' on `switch' i

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-18 Thread Felix Zielcke
Am Donnerstag, den 14.08.2008, 23:15 +0200 schrieb Felix Zielcke: > So I made now the getroot.diff new without indenting the whole switch > block by 2 spaces. Thanks to Marco and Emacs, I know now that the `case' on `switch' is a special case :) GCS isn't talking about this and I just assumed on s

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-14 Thread Felix Zielcke
Am Donnerstag, den 14.08.2008, 22:38 +0200 schrieb Robert Millan: > Okay, but please send the patch without indentation first, so your changes can > be reviewed. svn diff --diff-cmd diff -x -upw That way it works, the attached getroot_w.diff is made with it. But I think it doestn't look that go

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-14 Thread Robert Millan
On Thu, Aug 14, 2008 at 09:32:04PM +0200, Felix Zielcke wrote: > > Try to ommit big indentation changes from the patch. If you change > > something > > that requires a big chunk of code to be reindented, I think it's better if > > you > > leave that out for readability (and mention so if you lik

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-14 Thread Felix Zielcke
Am Donnerstag, den 14.08.2008, 20:03 +0200 schrieb Robert Millan: > > Please explain the actual changes (or what they're for). As I wrote that, I just saw before that Marco did just Rewritten. in a commit, but with searching for Rewritten in the ChangeLog reveals much more verbose entrys So: 200

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-14 Thread Robert Millan
On Thu, Aug 14, 2008 at 07:34:05PM +0200, Felix Zielcke wrote: > 2008-08-14 Felix Zielcke <[EMAIL PROTECTED]> > > * util/getroot.c: Include . > (grub_util_get_grub_dev): Rewritten. Please explain the actual changes (or what they're for). >switch (grub_util_get_dev_abstracti

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-14 Thread Felix Zielcke
Am Montag, den 11.08.2008, 18:18 +0200 schrieb Felix Zielcke: > > Please comment this, please give me hints how to make it better. > I don't like the code myself but it seems like we should handle this > double dash problem :( > Now that a bit time has passed, I think it isn't that ugly. But I s

Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-11 Thread Sander Marechal
Felix Zielcke wrote: > Well attached is now my cute little asprintf patch with a very ugly LVM > part. > > It works for > > volumegroup: linuxvg > logicalvolume: lvol0 > /dev/mapper/linuxvg-lvol0 > > volume group: m-y--vg > logical volume: l-vol--0 > /dev/mapper/m--yvg-l--vol0 > > > Pl

[PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

2008-08-11 Thread Felix Zielcke
I still can't see any use in this `escape a dash with a dash because we use a dash to seperate the vg part from the lv one' from LVM. As I already wrote, grub-probe works fine if you remove that double escaping from the file name and remount it. LVM (lv* vg* commands) shouldn't use the filename to