hugelgupf / p9

Idiomatic Go 9P2000.L client and server, extracted from gVisor for general use
Apache License 2.0
91 stars 19 forks source link

add stubs for xattr on windows #70

Closed rminnich closed 1 year ago

rminnich commented 1 year ago

What should the error be? There are no xattrs on windows, so possibly just return an indication they do not exist?

hugelgupf commented 1 year ago

Import the internal/linux package, return linux.ENOSYS

Even on Windows, a 9P2000.L implementation would return Linux errnos. We should probably export that package?

On Tue, Aug 8, 2023, 17:10 ron minnich @.***> wrote:

@rminnich https://github.com/rminnich requested your review on: #70 https://github.com/hugelgupf/p9/pull/70 add stubs for xattr on windows.

— Reply to this email directly, view it on GitHub https://github.com/hugelgupf/p9/pull/70#event-10041126603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPG3EUX64N5P3B5LTBGTOTXULIQDANCNFSM6AAAAAA3JGV33M . You are receiving this because your review was requested.Message ID: @.***>

djdv commented 1 year ago

We should probably export that package?

FWIW I had to do this in a fork so that callers of the Client could compare against them. https://github.com/djdv/p9/commits/fork/errors (There's some other commits in that fork that change the places they're referenced as well.)

Have been using this on Windows, Linux, and macOS machines without any obvious issues.

rminnich commented 1 year ago

try this.

rminnich commented 1 year ago

not sure why goimports chose that package but ... ?

hugelgupf commented 1 year ago

We should probably export that package?

FWIW I had to do this in a fork so that callers of the Client could compare against them. https://github.com/djdv/p9/commits/fork/errors (There's some other commits in that fork that change the places they're referenced as well.)

Have been using this on Windows, Linux, and macOS machines without any obvious issues.

There's a few things in that fork we should bring over here. Do you want to send a PR for the errno thing?

djdv commented 1 year ago

There's a few things in that fork we should bring over here. Do you want to send a PR for the errno thing?

For sure, I'll try to replay and adapt everything on to main and submit one when I can. Can do the same for any other interesting changes too.