[PATCH] indent comments in /etc/network/interfaces

2008-07-07 Thread Natanael Copa
Hi, Angry user reported that after upgrade (of my busybox/uclibc based distro Alpine) the ifup and ifdown utilites choked on his /etc/network/interfaces whenever comments where not on first comlumn. The comment in the code says: /* Let's try to be compatible. * * man 5

Ответ: [PATCH] indent commen ts in /etc/network/interfaces

2008-07-07 Thread Vladimir Dronnikov
I think we should at last invent a libbb function for dealing with parsing of config files. The zillions of config files are based on #-commented and \-continued lines. Almost all of them require then line-by-line processing of whitespaces delimited tokens. We already have got some examples

LIBBB: parse_config()

2008-07-07 Thread dronnikov
A helper function for parsing vanilla config files is added. I see mdev, crond and others can use it to uniformly process their configs. Typical usage: - CUT - void *data; char **token = parse_config(filename, 128, data); // 128 tokens at most while (*token) {

Re: LIBBB: parse_config()

2008-07-07 Thread Bernhard Fischer
On Mon, Jul 07, 2008 at 12:31:29PM -0700, [EMAIL PROTECTED] wrote: A helper function for parsing vanilla config files is added. I see mdev, crond and others can use it to uniformly process their configs. It would be better if you would convert a few users to this new parse_config() and show the

Ответ: LIBBB: parse_config()

2008-07-07 Thread Vladimir Dronnikov
Sure :) But some help is needed. I am trying to convert inotifyd. mdev is saint animal. Natanael mentioned ifup/down. There is crond that uses plain config. There gotta be savings en gros if we cope this together. -- Vladimir 2008/7/7, Bernhard Fischer [EMAIL PROTECTED]: On Mon, Jul 07, 2008

RE: mdev scan

2008-07-07 Thread Holland, John
I'm having problems scanning usb_endpoint '/dev's on older kernels, 2.6.13 in particular. The usb_endpoints are beyond the constant MAX_SYSFS_DEPTH somewhere under /sys. How much is ok on those kernels? 4? 5? 5 would be good, but then I have problems with circular recursion. Is there any

RE: mdev scan

2008-07-07 Thread Holland, John
Because a picture is worth a thousand words... --- util-linux/mdev.c 2008-07-01 17:34:50.0 +0200 +++ util-linux/mdev.c.new 2008-07-08 00:16:36.0 +0200 @@ -21,8 +21,6 @@ #define root_major (G.root_major) #define root_minor (G.root_minor) -#define MAX_SYSFS_DEPTH 3 /*

RE: mdev scan

2008-07-07 Thread Holland, John
oops... + if (NULL == strstr(path[5], /block/)) should be + if (NULL == strstr(path[4], /block/)) John ___ Cellent Finance Solutions AG Firmensitz: Calwer Straße 33, 70173 Stuttgart Registergericht: Amtsgericht Stuttgart, HRB 720743

Re: [PATCH] indent comments in /etc/network/interfaces

2008-07-07 Thread Denys Vlasenko
On Monday 07 July 2008 16:40, Natanael Copa wrote: Hi, Angry user reported that after upgrade (of my busybox/uclibc based distro Alpine) the ifup and ifdown utilites choked on his /etc/network/interfaces whenever comments where not on first comlumn. The comment in the code says:

Re: LIBBB: parse_config()

2008-07-07 Thread Denys Vlasenko
[CC: [EMAIL PROTECTED] On Monday 07 July 2008 21:31, [EMAIL PROTECTED] wrote: Please, comment and consider applying. +static void FAST_FUNC replace(char *s, char what, char with) You do not need FAST_FUNCs on static functions. gcc does it itself. At least I try to believe gcc will pick the

Re: LIBBB: parse_config()

2008-07-07 Thread Denys Vlasenko
On Tuesday 08 July 2008 05:47, Denys Vlasenko wrote: [CC: [EMAIL PROTECTED] On Monday 07 July 2008 21:31, [EMAIL PROTECTED] wrote: Please, comment and consider applying. Another comment: the return value should be NULL if file can't be opened; should contain at least one element (NULL) if

Re: mdev scan

2008-07-07 Thread Denys Vlasenko
Hi, I see that this mdev stuff is not so simple. On Monday 07 July 2008 23:25, Holland, John wrote: I'm having problems scanning usb_endpoint '/dev's on older kernels, 2.6.13 in particular. The usb_endpoints are beyond the constant MAX_SYSFS_DEPTH somewhere under /sys. How much is