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

fix zdb -R for raw flag #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

datacore-skumar
Copy link

Write was returing wrong size due to some non printable characters
in buffer So, I replaced Write with putchar.

@lundman
Copy link
Collaborator

lundman commented Jan 19, 2021

Is this the sort of place that O_BINARY would affect the outcome?

Write was returing wrong size due to incorrect handle.
@datacore-skumar
Copy link
Author

The issue was with wrong file handle to WriteFile(). It's working fine after fixing the file handle.

@lundman
Copy link
Collaborator

lundman commented Jan 20, 2021

Ah yep, the sort of thing "wosix.h" is supposed to hide, but it probably isn't used for zdb. This will do fine in ZFSin, but let's take the wosix approach in the new port..

@lundman
Copy link
Collaborator

lundman commented Feb 17, 2021

What is the status here?

@imtiazdc
Copy link
Contributor

What is the status here?

@lundman This could be merged in ZFSin. We tested this internally and found it working.

@lundman
Copy link
Collaborator

lundman commented Feb 18, 2021

Ok, posix.c and wosix.h is supposed to wrap the write(_fileno(stdout), parts, with fileno going to HANDLE, and write using WriteFile(HANDLE, ... (although, its supposed to be fileno, not _fileno, since that will call Windows fileno and return a filedes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants