public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "Ram Nalamothu (QUIC)" <quic_vnalamot@quicinc.com>
To: "newlib@sourceware.org" <newlib@sourceware.org>
Cc: "craig.blackmore@embecosm.com" <craig.blackmore@embecosm.com>,
	"kito.cheng@sifive.com" <kito.cheng@sifive.com>
Subject: RE: [PATCH] RISC-V: fix setting up std streams in init_semihosting()
Date: Fri, 5 Jan 2024 11:52:27 +0000	[thread overview]
Message-ID: <BY5PR02MB6387C92DAD80CFF9495A8017F0662@BY5PR02MB6387.namprd02.prod.outlook.com> (raw)
In-Reply-To: <CALLt3ThbCmn=NUER=gRf8aO_0f0xZ1OJ1dZkx-fi0scWdV-inw@mail.gmail.com>

Ping

-----Original Message-----
From: Kito Cheng <kito.cheng@sifive.com> 
Sent: Wednesday, January 3, 2024 1:48 PM
To: Ram Nalamothu (QUIC) <quic_vnalamot@quicinc.com>
Cc: newlib@sourceware.org; craig.blackmore@embecosm.com
Subject: Re: [PATCH] RISC-V: fix setting up std streams in init_semihosting()

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

The change seems weird to me at my first time reading, however it makes sense after reading _open and __add_fdentry.

So LGTM, thanks for fixing this issue :)

(BTW, I don't have commit right either :P)

On Wed, Jan 3, 2024 at 4:03 PM Ram Nalamothu (QUIC) <quic_vnalamot@quicinc.com> wrote:
>
> Without this patch, the following simple test would fail to run as expected.
>
> #include <stdio.h>
> int main() {
>   int n;
>   printf("Enter a number\n");
>   scanf("%d", &n);
>   printf("Entered number: %d\n", n);
>   return 0;
> }
>
> If the patch looks good, could someone please commit it on behalf of me as I don't have commit rights.
>
> -- 8< --
>
> Currently init_semihosting() assumes the return value from _open() 
> call as the file descriptor handle and that is incorrect.
>
> The semihost _open() call returns the fdtable index returned by the
> __add_fdentry() for the file opened.

  reply	other threads:[~2024-01-05 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  8:03 Ram Nalamothu (QUIC)
2024-01-03  8:17 ` Kito Cheng
2024-01-05 11:52   ` Ram Nalamothu (QUIC) [this message]
2024-01-10  7:57     ` Ram Nalamothu (QUIC)
2024-01-10  9:47       ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR02MB6387C92DAD80CFF9495A8017F0662@BY5PR02MB6387.namprd02.prod.outlook.com \
    --to=quic_vnalamot@quicinc.com \
    --cc=craig.blackmore@embecosm.com \
    --cc=kito.cheng@sifive.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).