Re: double proc entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 21 August 2006 10:49, danny@xxxxxxxxxxx wrote:
> Hi,
>  Recently I noticed that unloading video.ko causes a warning from
> remove_proc_entry because the subdir is not empty. This is related to the
> fact that I have 2 VID entries in /proc/acpi/video, and this messes up
> things a bit. The cause of this is that the VID entry appears both on the
> PCI and on the AGP bus, sysfs handles this nicely:
>  ./firmware/acpi/namespace/ACPI/_SB/PCI0/AGP/VID
>...

Yes,  This is a problem.

>  More information can be found here:
>  http://qa.mandriva.com/show_bug.cgi?id=22249
>
>  proc/acpi/video/ does not know about AGP or PCI. Attached patch fixes the
> problem but is not so beautiful. Maybe it's better to make another subdir
> in video for the parent of the device, but I thought this would be more
> likely to break userland apps. Perhaps someone can do better.
>

The beautiful way is to completely delete /proc/acpi, and turn to sysfs. :-)
But we still have to live with /proc/acpi for some times.
So, I think your patch is right thing.

>+        strcpy(proc_dir_name, acpi_device_bid(device));
>+        strcat(proc_dir_name, "_");
>+        strcat(proc_dir_name, acpi_device_bid(device->parent));
 
but, when you are using acpi_device_bid(device->parent), you 
should have checked  device->parent is NOT NULL.

-- 
Thanks,
Luming
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux