to., 04.10.2007 kl. 10.02 +1000, skrev Rusty Russell:
> On Wed, 2007-10-03 at 10:37 +0100, Chris Malley wrote:
> > Hi guys
> >
> > Would it not be clearer to #include <asm/bootparam.h> and use
> > the relevant named members of struct setup_header / struct boot_params
> > rather than the hard-coded values 0x202, 0x1F1, 0x214 ?
>
> Yes, but unfortunately bootparam.h wasn't designed to be included from
> userspace.
>
[snip]
This change seems to have broken build of the battstat applet in
gnome-applets or rather the included apmlib in there. Intended?
Any pointers on how to adapt the code in case it was?
> diff -r 6bb527d113a8 include/linux/apm_bios.h
> --- a/include/linux/apm_bios.h Wed Oct 03 13:49:31 2007 +1000
> +++ b/include/linux/apm_bios.h Thu Oct 04 09:37:28 2007 +1000
> @@ -16,28 +16,28 @@
> * General Public License for more details.
> */
>
> +#include <linux/types.h>
> +
> +struct apm_bios_info {
> + __u16 version;
> + __u16 cseg;
> + __u32 offset;
> + __u16 cseg_16;
> + __u16 dseg;
> + __u16 flags;
> + __u16 cseg_len;
> + __u16 cseg_16_len;
> + __u16 dseg_len;
> +};
> +
> +#ifdef __KERNEL__
> +
> typedef unsigned short apm_event_t;
> typedef unsigned short apm_eventinfo_t;
> -
> -#ifdef __KERNEL__
> -
> -#include <linux/types.h>
>
> #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
> #define APM_CS_16 (APM_CS + 8)
> #define APM_DS (APM_CS_16 + 8)
> -
> -struct apm_bios_info {
> - u16 version;
> - u16 cseg;
> - u32 offset;
> - u16 cseg_16;
> - u16 dseg;
> - u16 flags;
> - u16 cseg_len;
> - u16 cseg_16_len;
> - u16 dseg_len;
> -};
>
> /* Results of APM Installation Check */
> #define APM_16_BIT_SUPPORT 0x0001
Cheers
Kjartan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]