{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2/issues/1931","labels_url":"https://api.github.com/repos/radare/radare2/issues/1931/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2/issues/1931/comments","events_url":"https://api.github.com/repos/radare/radare2/issues/1931/events","html_url":"https://github.com/radare/radare2/pull/1931","id":53254831,"number":1931,"title":"Return codes for pd[bf] commands.","user":{"login":"shaded-enmity","id":572844,"avatar_url":"https://avatars.githubusercontent.com/u/572844?v=3","gravatar_id":"","url":"https://api.github.com/users/shaded-enmity","html_url":"https://github.com/shaded-enmity","followers_url":"https://api.github.com/users/shaded-enmity/followers","following_url":"https://api.github.com/users/shaded-enmity/following{/other_user}","gists_url":"https://api.github.com/users/shaded-enmity/gists{/gist_id}","starred_url":"https://api.github.com/users/shaded-enmity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaded-enmity/subscriptions","organizations_url":"https://api.github.com/users/shaded-enmity/orgs","repos_url":"https://api.github.com/users/shaded-enmity/repos","events_url":"https://api.github.com/users/shaded-enmity/events{/privacy}","received_events_url":"https://api.github.com/users/shaded-enmity/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-02T14:22:47Z","updated_at":"2015-01-03T02:23:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/1931","html_url":"https://github.com/radare/radare2/pull/1931","diff_url":"https://github.com/radare/radare2/pull/1931.diff","patch_url":"https://github.com/radare/radare2/pull/1931.patch"},"body":"The `pd[bf]` commands do not set a return code in case there\r\nis no function at the address. This patch makes it also return `2`\r\nalong with printing an error to stderr. The error code can be checked\r\nfor with the `??` command.\r\n\r\nThere's something funny going on though, if the analyze step err's with\r\nfor example 'Function too big ...' the address still will be flagged\r\nwith the func flag (as reported by `ai`) but both `pd[bf]` will\r\nhit the wall.\r\n\r\nSigned-off-by: Pavel Odvody <podvody@redhat.com>"},"comment":{"url":"https://api.github.com/repos/radare/radare2/issues/comments/68580056","html_url":"https://github.com/radare/radare2/pull/1931#issuecomment-68580056","issue_url":"https://api.github.com/repos/radare/radare2/issues/1931","id":68580056,"user":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T02:23:31Z","updated_at":"2015-01-03T02:23:31Z","body":"The ~? should make $?=<number of results>. I have verified this, and it looks like a regression. iirc this was working before. Can you fix this and submit a test case (see radare2-regressions repository).\r\n\r\ni dont get the second thought. do you want the output without those function names in there? you can also use `afi` to get function information (or check if there's any in there). \r\n\r\nThe patch should also fix the return value ($? or core->num->value) for `afi`. feel free to fix that issue for other commands.\r\n\r\nthanks!"}}