-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 #16210 - Show error message and update help for we
##io
#16427
Conversation
libr/core/cmd.c
Outdated
@@ -2884,7 +2884,7 @@ static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon, bool *tmpseek | |||
line = strdup (cmd); | |||
line = r_str_replace (line, "\\\"", "\"", true); | |||
if (p && *p && p[1] == '|') { | |||
str = r_str_trim_head_ro (p + 2); | |||
str = (char *)r_str_trim_head_ro (p + 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm i think you already did this change in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep i think so too. but its not, otherwise i would get a conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try the reproduce in the issue? It does not seem to work, I think. That makes sense, though, as your PR does not really change anything apart from reporting an error when r_core_extend_at
returns false.
I would add a test for this as well. It does not work. |
the wen command works fine:
|
only works when io.va=false |
I can improve the help on that to specify that this only makes sense when the underlying io plugin can be resized and it's in PA mode |
That is ok, but please remove the issue #16210 from the title/commits/description, because this is not a fix for that issue. Then, if you think #16210 is notabug, close it by explaining your point of view. If for now |
now works better, i need to add more tests probably |
This pull request fixes 1 alert when merging c283836 into 3a95531 - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If now it gives a proper error, that's much better!
libr/core/cmd_write.c
Outdated
r_core_block_read (core); | ||
if (cmd_suc) { | ||
core->offset = cur_off; | ||
eprintf ("works\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XX
libr/core/cio.c
Outdated
} | ||
r_config_set_i (core->config, "io.va", io_va); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you set io_va
, considering it was never changed since you get it?
i need to add a test where i modify a binary in VA mode, @thestr4ng3r how do you recommend to do taht after the last changes in r2r.c ? do i copy the file into tmp inside r2 and then reopen, and rm when done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please remember to leave a comment in the original issue saying that it is not supported (at least for now) to use wen
when io.va=false
wat? @ret2libc wen works on io.va=true and false now. it just requires a writable and resizable underlying fd |
🤦♂️ right, sorry :D |
added another test |
ill squash+merge when ci ends |
This pull request fixes 1 alert when merging 45894c1 into f9864ef - view on LGTM.com fixed alerts:
|
radareorg#16427) * Fix wen command for io.va=true, add two tests
Your checklist for this pull request
Detailed description
just read the
Test plan
modifying in disk files is a bit tricky and boring, not going to add tests now for this we have more unit tests to add before this imho
Closing issues
the #16210 one