Eric Martin | 1 Jul 02:10 2012
Picon
Picon

[PATCH] acpid: add missing lid switch definition

This patch adds a missing LID0 switch definition.
Without it, closing the notebook lid is not detected by acpid.

diff busybox.orig/util-linux/acpid.c busybox/util-linux/acpid.c
--- busybox.orig/util-linux/acpid.c
+++ busybox/util-linux/acpid.c
 <at>  <at>  -75,6 +75,7  <at>  <at> 
  static const struct acpi_event f_evt_tab[] = {
         { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRF 
00000080" },
         { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRB 
00000080" },
+       { "EV_SW", 0x05, "SW_LID", 0x00, 1, "button/lid LID0 00000080" },
  };

  struct acpi_action {
Jason Aeschilman | 1 Jul 14:00 2012

Out of the office

I am currently out of the office.  I will not be able to respond to your email until I get back on Tuesday, July 10th.

Jason Aeschilman
Linus Walleij | 1 Jul 22:34 2012
Picon
Picon
Picon

[PATCH 1/2] fbset: respect rgba configuration lines in fb.modes

The fbset utility would not respect "rgba" config entries in
the fb.modes file such as this (for the ARM Integrator/CP):

mode "640x480-60-clcd"
    # D: 25.175 MHz, H: 31.469 kHz, V: 59.94 Hz
    geometry 640 480 640 480 16
    timings 39722 48 16 33 10 96 2
    rgba 5/10,5/5,5/0,1/15
endmode

This is important especially for this ARGB5551 device which
is hopeless to configure otherwise. I noticed this lacking
feature after the TI "fbtest" program managed to set up the
the colormode correctly.

Signed-off-by: Linus Walleij <triad <at> df.lth.se>
---
 util-linux/fbset.c |   26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 196c2aa..0ff02d7 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
 <at>  <at>  -271,7 +271,7  <at>  <at>  static int read_mode_db(struct fb_var_screeninfo *base, const char *fn,
 		}
 		p = token[1];
 		i = index_in_strings(
-			"geometry\0timings\0interlaced\0double\0vsync\0hsync\0csync\0extsync\0",
+			"geometry\0timings\0interlaced\0double\0vsync\0hsync\0csync\0extsync\0rgba\0",
(Continue reading)

Linus Walleij | 1 Jul 22:34 2012
Picon
Picon
Picon

[PATCH 2/2] fbsplash: don't assume 16bpp means RGB565

The current handling of the 16bpp mode hardcodes the bit
arrangement for 16bpp mode to be of the RGB565 type, but my
system (ARM PL110 on the Integrator/CP) has RGBA5551
arrangement and will give wrong colors. This patch makes the
code actually respect the bit sizes and offset arrangement
from the screen configuration (in turn read from the modes
configuration file and set by fbset).

Signed-off-by: Linus Walleij <triad <at> df.lth.se>
---
 miscutils/fbsplash.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 988439b..a9581a8 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
 <at>  <at>  -166,10 +166,17  <at>  <at>  static unsigned fb_pixel_value(unsigned r, unsigned g, unsigned b)
 		return r + g + b;
 	}
 	if (G.bytes_per_pixel == 2) {
-		r = (r & 0xf8) << 8; // 5-bit red
-		g = (g & 0xfc) << 3; // 6-bit green
-		b =  b >> 3;         // 5-bit blue
-		return r + g + b;
+		/* First shift out unused bits */
+		r &= 0xff;
+		g &= 0xff;
+		b &= 0xff;
+		r >>= (8 - G.scr_var.red.length);
(Continue reading)

Michael D. Setzer II | 3 Jul 01:18 2012
Picon

new busybox 1.20.2 test

Saw the new busybox version, so built it using the same config 
and note two cosmetic things.

Copyright shows up to 2011, but halfway thru 2012?
Still seeing the message twice after unmount a partition.

umount: sending ioctl 4c01 to a partition!

Unmounts fine, so not sure why the message appears, and why it 
shows up twice.

+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes <at> kuentos.guam.net                            
  mailto:msetzerii <at> gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC <at> HOME CREDITS
SETI        12470054.244754   |   EINSTEIN     8117499.249852
ROSETTA      4696158.955922   |   ABC         13946677.810631
(Continue reading)

Eial Czerwacki | 3 Jul 09:57 2012

[PATCH] new applet gethostbyname

Hello All,

I'd like to propose a new applet, gethostbyname.
all this applet does is to get a host name and return the first ip address.

the reason for this applet is that I have a embedded boot image build
with busybox what queries me on boot for a hostname and runs a bin which
tries to connect to it for data.
as the image is build based on uclibc and the bin is statically compiled
glibc, there are some functions which doesn't work, gethostbyname is one
of them.

previously I've used nslookup and parsed the output but I encountered
two networks the other day that have different output which probably
depends on the dhcp server config.

my only way to get around it with minimal effort is to create small
applet for busybox that does that for me.

I'm using busybox 1.19.2 so this is a bit old but if this package will
be accepted, I'll modify it to latest version.

Thanks.
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
(Continue reading)

Richard Maw | 3 Jul 11:00 2012
Picon

mount -o remount systemd incompatibility

mount's source code mentions that remount behaviour may not be
compatible with util-linux.

I can confirm that this is the case and it doesn't work with Systemd.

Systemd has a helper program to remount everything in fstab, since it
may have mounted it with the incorrect options. It is implemented by
reading /etc/fstab and shelling out to `/bin/mount -o remount $device`.

This is a no-op in busybox because remounting reads the mount options
from /etc/mtab.
Baruch Siach | 3 Jul 11:11 2012
Picon

Re: [PATCH] new applet gethostbyname

Hi Eial,

On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote:
> I'd like to propose a new applet, gethostbyname.
> all this applet does is to get a host name and return the first ip address.

IMHO, this applet should be called 'host', just like the similarly named BIND 
utility.

[snip]

> +int gethostbyname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
> +int gethostbyname_main(int argc, char **argv) {
> +    struct hostent *tmp = 0;
> +
> +    if (argc < 2) {
> +        bb_show_usage();
> +    }
> +
> +    tmp = gethostbyname(argv[1]);

gethostbyname() is obsolete. Please use either current POSIX standard 
getaddrinfo() or INET_resolve() from libbb.

baruch

--

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch <at> tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
(Continue reading)

Eial Czerwacki | 3 Jul 11:17 2012

Re: [PATCH] new applet gethostbyname

Hello Baruch,

On 07/03/2012 12:11 PM, Baruch Siach wrote:

> Hi Eial,
> 
> On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote:
>> I'd like to propose a new applet, gethostbyname.
>> all this applet does is to get a host name and return the first ip address.
> 
> IMHO, this applet should be called 'host', just like the similarly named BIND 
> utility.
> 

ok, will change the name

> [snip]
> 
>> +int gethostbyname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
>> +int gethostbyname_main(int argc, char **argv) {
>> +    struct hostent *tmp = 0;
>> +
>> +    if (argc < 2) {
>> +        bb_show_usage();
>> +    }
>> +
>> +    tmp = gethostbyname(argv[1]);
> 
> gethostbyname() is obsolete. Please use either current POSIX standard 
> getaddrinfo() or INET_resolve() from libbb.
(Continue reading)

Eial Czerwacki | 3 Jul 16:48 2012

Re: [PATCH] new applet gethostbyname

On 07/03/2012 05:39 PM, Joshua Judson Rosen wrote:

> On 2012-07-03 05:11, Baruch Siach wrote:
>> Hi Eial,
>>
>> On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote:
>>> I'd like to propose a new applet, gethostbyname.
>>> all this applet does is to get a host name and return the first ip
>>> address.
>>
>> IMHO, this applet should be called 'host', just like the similarly
>> named BIND
>> utility.
> 
> No, they're different things: BIND's `host' utility specifically queries
> DNS--and only DNS:
> it doesn't resolve names via /etc/hosts, NIS, mDNS, etc.
> 
> gethostbyname() uses whatever resolver backends are available in libc
> (i.e.: nsswitch).
> 
> So it might be a good idea for Eial to model this new applet on glibc's
> "getent" command
> (both in name and behaviour).
> 

Joshua,

I cannot find any reference to glibc's "getent" command, can you point
me to such reference?
(Continue reading)


Gmane