bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH libpciaccess] hurd: device_open the pre-existing pci server a


From: Samuel Thibault
Subject: Re: [PATCH libpciaccess] hurd: device_open the pre-existing pci server and use dir_readdir RPC
Date: Tue, 2 Mar 2021 22:04:15 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Hello,

It seems I wasn't clear :)

Damien Zammit, le mar. 02 mars 2021 22:44:01 +1100, a ecrit:
> +    if (pci_port == MACH_PORT_NULL) {
> +        dir = opendir(parent);
> +        if (!dir)
> +            return errno;
> +    } else {
> +        if (lev > LEVEL_FUNC + 1) {
> +         return 0;
> +     }
> +        cwd_port = file_name_lookup_under (pci_port, parent, O_DIRECTORY | 
> O_RDWR | O_EXEC, 0);
> +        if (cwd_port == MACH_PORT_NULL) {
> +         return 0;
> +        }
> +    }

I didn't mean to keep the opendir() codepath, but only use the
file_name_lookup_under, dir_readdir, etc. That codepath should be also
working fine on the booted system, and allows to debug it much more
easily with gdb etc.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]