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

Windows #253

Closed
wants to merge 7 commits into from
Closed

Windows #253

wants to merge 7 commits into from

Conversation

rminnich
Copy link
Member

@rminnich rminnich commented Nov 5, 2023

yep, not kidding. This lets me work under windows. It's not all there, consider this a WIP until next week.

@rminnich rminnich requested review from ericvh, floren, Lencerf and a team November 5, 2023 02:07
Copy link

@rjoleary rjoleary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows support is a hug leap!

@@ -0,0 +1,141 @@
// Copyright 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should mention Apache in the top-most LICENSE file -- some people might be surprised that some files are under different licenses.


// GetAttr implements p9.File.GetAttr.
//
// Not fully implemented.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention one thing that's not implemented. Or is it not implemented because of Windows?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

NLink: 3,
Size: uint64(fi.Size()),
BlockSize: uint64(512),
Blocks: uint64(fi.Size() / 512),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should round up: (size + 511) / 512

RDev: true,
Size: true,
Blocks: true,
ATime: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like ATime stands for "Access Time" and we're setting it to ModTime which is "Modified Time" which seems incorrect. Is it possible to just set this AttrMask value to false to indicate we don't know the ATime?

@@ -6,7 +6,7 @@ require (
github.com/gliderlabs/ssh v0.3.5
github.com/hugelgupf/p9 v0.2.1-0.20230814004337-e6037077d6dc
github.com/kevinburke/ssh_config v1.2.0
github.com/u-root/u-root v0.11.1-0.20230913033713-004977728a9d
github.com/u-root/u-root v1.0.1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional? I thought we used Go-style versioning where it's risky to go above v0.x.

@rminnich
Copy link
Member Author

rminnich commented Nov 8, 2023

Thanks so much for that review! I will tidy things up tomorrow. Your suggestions are excellent.

@rminnich
Copy link
Member Author

rminnich commented Nov 9, 2023

actually, I can't move forward on this until the termios windows support on u-root is upstreamed, though I may fix that problem (the review is never happening?) and move to using some other termios package, as gosh seems to do.

Signed-off-by: Ronald G. Minnich <[email protected]>
This is a cpio archive, so we must use path.

Signed-off-by: Ronald G Minnich <[email protected]>
we're currently stuck on termios, on u-root, and if that
does not get reviewed soon I'll move to using something else.

Signed-off-by: Ronald G Minnich <[email protected]>
u-root termios has much more capability than we need, and
does not work on windows yet.

Signed-off-by: Ron Minnich <[email protected]>
you can make things raw, but sometimes, you can't get the
window size.

Signed-off-by: Ronald G Minnich <[email protected]>
@rminnich
Copy link
Member Author

idk about windows any more

@rminnich rminnich closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants