[UPDATE] New Boot-Loader Menu -- version 1.3

2011-05-02 Thread Devin Teske
Hey all, Proud to bring you version 1.3 which completes the followup suggestions made by Olivier Smedts (use autoboot_delay instead of loader_menu_timeout and change dc_seconds to loader_delay) and a couple other minor enhancements/fixes. I think that brings everything up to speed with the phen

RE: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-02 Thread Devin Teske
UPDATE: New version 1.2 released right now. Get your update at: http://druidbsd.sourceforge.net/ or http://druidbsd.sourceforge.net/download/loader_menu-1.2.tgz Keep reading for details/discussion below. > -Original Message- > From: Olivier Smedts [mailto:o

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-02 Thread Olivier Smedts
2011/5/2 Devin Teske : > NOTE: Apologies if this comes through multiple times. I'm having problems > getting this e-mail to appear on the list. > > Hi again, fellow hackers, > > First, I'd like to thank all of you for the input and suggestions that you > provided. > > Things are moving fast and n

[UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-02 Thread Devin Teske
NOTE: Apologies if this comes through multiple times. I'm having problems getting this e-mail to appear on the list. Hi again, fellow hackers, First, I'd like to thank all of you for the input and suggestions that you provided. Things are moving fast and nimble here. With over 1,000 lines of c

Re: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean

2011-05-02 Thread Brandon Gooch
On Mon, May 2, 2011 at 11:10 AM, Garrett Cooper wrote: >    I wanted to do something different this weekend, and I picked > usr.bin/kdump as a likely 'victim' for converting from WARNS?= 0 to > WARNS?= 6. I'm curious as to whether or not this is on the right > track, but here's the reasoning I use

Re: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean

2011-05-02 Thread Garrett Cooper
On Mon, May 2, 2011 at 9:24 AM, Garrett Cooper wrote: > -- Forwarded message -- > From: Garrett Cooper > Date: Mon, May 2, 2011 at 9:24 AM > Subject: Re: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean > To: Arnaud Lacombe > > > On Mon, May 2, 2011 at 9:21 AM, Arnaud La

Fwd: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean

2011-05-02 Thread Garrett Cooper
-- Forwarded message -- From: Garrett Cooper Date: Mon, May 2, 2011 at 9:24 AM Subject: Re: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean To: Arnaud Lacombe On Mon, May 2, 2011 at 9:21 AM, Arnaud Lacombe wrote: > Hi, > > On Mon, May 2, 2011 at 12:10 PM, Garrett Coop

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Garrett Cooper
On Mon, May 2, 2011 at 8:57 AM, Arnaud Lacombe wrote: > Hi, > > On Mon, May 2, 2011 at 8:13 AM, Martin Möller > wrote: >> Hello, >> >> Thanks for all the replies. >> We have so far discovered the following suggetions for the parsing Problem: >> Using: >>    o a tokenizer/parser is too much overhe

[PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean

2011-05-02 Thread Garrett Cooper
I wanted to do something different this weekend, and I picked usr.bin/kdump as a likely 'victim' for converting from WARNS?= 0 to WARNS?= 6. I'm curious as to whether or not this is on the right track, but here's the reasoning I used: 1. Conditionally include diskmbr.h or diskpc98.h based on w

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Arnaud Lacombe
Hi, On Mon, May 2, 2011 at 8:13 AM, Martin Möller wrote: > Hello, > > Thanks for all the replies. > We have so far discovered the following suggetions for the parsing Problem: > Using: >    o a tokenizer/parser is too much overhead for such a simple task >    o strchr, memchr is too low-level and

Re: [head tinderbox] failure on i386/i386

2011-05-02 Thread Garrett Cooper
On Mon, May 2, 2011 at 12:48 AM, FreeBSD Tinderbox wrote: [...] > cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. > -I/src/sys

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Robert Schulze
Hi, Am 02.05.2011 16:41, schrieb Artem Belevich: if(ptr&& (ptr=strstr(ptr," HTTP/1.1"))) /* find end of res */ Contrary to the comment in the code you're not checking for "HTTP/1.1" at the end but you're checking for it *anywhere* in the string. While it will occur at the end of val

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Rob
For goodness sake, it's not even NP-complete. char *start = strchr(line, ' ') + 1; char *end = strrchr(line, ' '); char *ret; *end = '\0'; ret = strdup(start); *end = ' '; return ret; Obviously there's no error checking, but there you go. I don't see what's inelegant about that. This is C, use

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Artem Belevich
On Mon, May 2, 2011 at 7:15 AM, Robert Schulze wrote: > Hi, > > Am 02.05.2011 16:06, schrieb Artem Belevich: >> >> Second problem -- res on success will always be "" as you've just did >> *ptr=0. > > thats right, the copy should look like: > > res=strdup(str+4); > >> Bzzt! >> >> Try it on "GET bla

Re: Look of boot2, on HDD

2011-05-02 Thread John Baldwin
On Saturday, April 30, 2011 12:48:35 pm Alexander Motin wrote: > Garrett Cooper wrote: > > 2011/4/29 : > >> /boot/boot2STAGE 2 bootstrap file > >> Understands the FreeBSD file system enough, to find files on it, and can > >> provide a simple interface to choose the kernel or loader to run. >

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Robert Schulze
Hi, Am 02.05.2011 16:06, schrieb Artem Belevich: Second problem -- res on success will always be "" as you've just did *ptr=0. thats right, the copy should look like: res=strdup(str+4); > Bzzt! > > Try it on "GET blah_HTTP/1.1.1.1.1.1_whatever HTTP/1.1" will return "blah_HTTP/1.1.1.1.1.1_w

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Artem Belevich
On Mon, May 2, 2011 at 6:00 AM, Robert Schulze wrote: > Hi, > > Am 02.05.2011 14:13, schrieb Martin Möller: >> >> Criteria: >>     o Receive the value of >>     o Check the Environment: Is  really sourrounded by 'GET ' >> and >>       'HTTP/1.1' ?! > > these quite simple criteria might be matched

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Robert Schulze
Hi, Am 02.05.2011 14:13, schrieb Martin Möller: Criteria: o Receive the value of o Check the Environment: Is really sourrounded by 'GET ' and 'HTTP/1.1' ?! these quite simple criteria might be matched by code like this one: char *ptr=NULL; char *res=NULL; if(strstr(str,"GET

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Joerg Sonnenberger
On Mon, May 02, 2011 at 02:13:11PM +0200, Martin Möller wrote: > o strchr, memchr is too low-level and not elegant enough Actually, you are looking for strstr. Joerg ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listi

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Martin Möller
Hello, Thanks for all the replies. We have so far discovered the following suggetions for the parsing Problem: Using: o a tokenizer/parser is too much overhead for such a simple task o strchr, memchr is too low-level and not elegant enough o strtok would not even parse (tokenize) this