2 Nov 2003 21:43
problem to access /proc/acpi/battery/BAT1/* files
Paolo Dovera <pdovera <at> bmind.it>
2003-11-02 20:43:11 GMT
2003-11-02 20:43:11 GMT
Hi all, on my RH9 2.6.0-test6 I noticed a strange log in /var/log/messages: Oct 17 18:15:16 localhost kernel: dswload-0269: *** Error: Looking up [PBST] in namespace, AE_ALREADY_EXISTS Oct 17 18:15:16 localhost kernel: psparse-0589 [293932] ps_parse_loop : During name lookup/catalog, AE_ALREADY_EXISTS Oct 17 18:15:16 localhost kernel: psparse-1121: *** Error: Method execution failed [\_SB_.PCI0.LPC0.BAT1._BST](Nodec12ab328), AE_ALREADY_EXISTS Oct 17 18:15:25 localhost kernel: dswload-0269: *** Error: Looking up [PBST] in namespace, AE_ALREADY_EXISTS Oct 17 18:15:25 localhost kernel: psparse-0589 [294043] ps_parse_loop : During name lookup/catalog, AE_ALREADY_EXISTS Oct 17 18:15:25 localhost kernel: psparse-1121: *** Error: Method execution failed [\_SB_.PCI0.LPC0.BAT1._BST] (Node c12ab328), AE_ALREADY_EXISTS the problem arises when on my system two programs access concurrently the files into /proc/acpi/battery/BAT1/* for example I run the cpufrequency, a daemon to switch CPU frequency on my P4 laptop http://sourceforge.net/projects/cpufrequency/ (this program checks every some seconds the status of battery) and I use watch -n 8 "cat /proc/acpi/battery/BAT1/*" to see the battery state in another xterm. Is there any kind of lock to access the status of battery?(Continue reading)
What is the correct way of changing the int value to a
char value so that I can append it to the return string ?
char *get_rand_str(int max) {
int i = 0;
char value;
char *retval = NULL;
for(; i < max; i++) {
value = get_ascii_code(97, 122);
retval = (char *)realloc(retval, sizeof(char));
strcat(retval, &value);
RSS Feed