Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACPI call output string terminates with the suffix 'lled' that comes from the string 'not called' #43

Open
FabriceSalvaire opened this issue Dec 6, 2013 · 1 comment

Comments

@FabriceSalvaire
Copy link

How to reproduce:

First add debug in acpi_proc_read:

static ssize_t acpi_proc_read( struct file *filp, char __user *buff,
            size_t count, loff_t *off )
{
    ssize_t ret;
    int len = strlen(result_buffer);

#ifdef DEBUG
    printk(KERN_INFO "acpi_call_read: length %u, '%s'\n", len, result_buffer);
#endif
...

Run:

echo '_SB.PCI0.LPC.EC.HKEY.BCTG 0x1' > /proc/acpi/call ; cat /proc/acpi/call
0x327lled

should return 0x327

dmsg return:
[86483.844220] acpi_call: Calling _SB.PCI0.LPC.EC.HKEY.BCTG
[86483.844768] acpi_call: Call successful: 0x327
[86483.848402] acpi_call_read: length 5, '0x327'
[86483.848439] acpi_call_read: length 10, 'not called'
[86483.848455] acpi_call_read: length 10, 'not called'

It shows acpi_proc_read is called 3 times.

How to fix:
comment line in acpi_proc_read: strcpy(result_buffer, "not called");

I don't understand what happen.

@nuklea
Copy link

nuklea commented Dec 7, 2013

Approve. Hame same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants