Access c_ispeed and c_ospeed via APIs
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Access c_ispeed and c_ospeed via APIs
FYI
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Access c_ispeed and c_ospeed via APIs
To: Khem Raj <[email protected]>
Thank you, I will check this patch!
- Gerhard
Am 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 30 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-4@@ -65,10 +65,10 @@ int xioinitialize(void) {#if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET !=-1 ) && (OSPEED_OFFSET !=-1 )#if defined(ISPEED_OFFSET ) && (ISPEED_OFFSET !=-1 )#if defined(OSPEED_OFFSET ) && (OSPEED_OFFSET !=-1 ) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); +cfsetispeed (&tdata.termarg,0x56789abc ); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Quoted 1 line · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 43 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 30 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-4@@ -65,10 +65,10 @@ int xioinitialize(void) {#if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET !=-1 ) && (OSPEED_OFFSET !=-1 )#if defined(ISPEED_OFFSET ) && (ISPEED_OFFSET !=-1 )#if defined(OSPEED_OFFSET ) && (OSPEED_OFFSET !=-1 ) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); +cfsetispeed (&tdata.termarg,0x56789abc ); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Since you have it reproduced. Can you check which of the api call is failing?
Quoted 59 lines · Bruce Ashfield
Quoted 2 lines · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 47 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 34 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-5@@ -65,10 +65,10 @@ int xioinitialize(void) { #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1 ) #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); + cfsetispeed(&tdata.termarg, 0x56789abc); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
A message that is not in the archive (sent off-list or not yet received): CAMKF1srQ5ayOr3ha=YTTGBS-ovX8Ht41ODoNaSEHBGW9EfjFGA@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAMKF1sqBwbkHWQBBzX8jbK0SoZtcMr6MO2ZSZ9dcMJJns6x+eQ@mail.gmail.com
I think I see the problem now. The constant should be converted to use Bnn values. When calling the baudrate apis. I will send a patch for you to test once I am close to computer
On Apr 12, 2016 6:20 PM, "Khem Raj" <[email protected]> wrote:
Since you have it reproduced. Can you check which of the api call is failing?
Quoted 59 lines · Bruce Ashfield
Quoted 2 lines · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 47 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 34 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-5@@ -65,10 +65,10 @@ int xioinitialize(void) { #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1 ) #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); + cfsetispeed(&tdata.termarg, 0x56789abc); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Quoted 3 lines · Khem Raj
I think I see the problem now. The constant should be converted to use Bnn values. When calling the baudrate apis. I will send a patch for you to test once I am close to computer
I have sent a potential patch.
http://lists.openembedded.org/pipermail/openembedded-core/2016-April/120229.html
It worked on musl env that I had ready here. Can you test it
with your env and make sure it works for you ?
Quoted 68 lines · Khem Raj
Since you have it reproduced. Can you check which of the api call is failing?
Quoted 59 lines · Bruce Ashfield
Quoted 2 lines · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 47 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 34 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-5@@ -65,10 +65,10 @@ int xioinitialize(void) { #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1 ) #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); + cfsetispeed(&tdata.termarg, 0x56789abc); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Quoted 11 lines · Khem Raj
Quoted 3 lines · Khem Raj
I think I see the problem now. The constant should be converted to use Bnn values. When calling the baudrate apis. I will send a patch for you to test once I am close to computer
I have sent a potential patch.
http://lists.openembedded.org/pipermail/openembedded-core/2016-April/120229.html
It worked on musl env that I had ready here. Can you test it
with your env and make sure it works for you ?
Will do. Launching builds now. I'll follow up once I know one way or another.
Bruce
Quoted 72 lines
Quoted 72 lines · Khem Raj
Since you have it reproduced. Can you check which of the api call is failing?
Quoted 59 lines · Bruce Ashfield
Quoted 2 lines · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 47 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 34 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-5@@ -65,10 +65,10 @@ int xioinitialize(void) { #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1 ) #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); + cfsetispeed(&tdata.termarg, 0x56789abc); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Quoted 11 lines · Khem Raj
Quoted 3 lines · Khem Raj
I think I see the problem now. The constant should be converted to use Bnn values. When calling the baudrate apis. I will send a patch for you to test once I am close to computer
I have sent a potential patch.
http://lists.openembedded.org/pipermail/openembedded-core/2016-April/120229.html
It worked on musl env that I had ready here. Can you test it
with your env and make sure it works for you ?
confirmed. I reverted my local change, applied this and socat is working without the assert.
Bruce
Quoted 72 lines
Quoted 72 lines · Khem Raj
Since you have it reproduced. Can you check which of the api call is failing?
Quoted 59 lines · Bruce Ashfield
Quoted 2 lines · Khem Raj
FYI
Thanks. I can also confirm that when I dropped the patch, I'm back up and running assertion free.
Bruce
Quoted 47 lines
---------- Forwarded message ----------
From: Gerhard Rieger <[email protected]>
Date: Wed, Mar 16, 2016 at 4:43 AM
Subject: Re: [PATCH] Accessc_ispeedandc_ospeedvia APIs
To: Khem Raj <[email protected]>Thank you, I will check this patch!
- GerhardAm 15.03.2016 um 22:39 schrieb Khem Raj:
Quoted 34 lines
Use
cfsetispeed(),cfsetospeed(), cfgetispeed, andcfgetospeed()instead of operating onc_ispeedandc_ospeedtermios structure members directly because they are not guaranteed to exist on all libc implementationsSigned-off-by Khem Raj <[email protected]>--- xioinitialize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)xioinitialize.c +4
-5@@ -65,10 +65,10 @@ int xioinitialize(void) { #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1 ) #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) - tdata.termarg.c_ispeed =0x56789abc ; - tdata.termarg.c_ospeed =0x6789abcd ; -assert (tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET ]); -assert (tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET ]); + cfsetispeed(&tdata.termarg, 0x56789abc); +cfsetospeed (&tdata.termarg,0x6789abcd ); +assert (cfgetispeed (&tdata.termarg) == tdata.speeds[ISPEED_OFFSET ]); +assert (cfgetospeed (&tdata.termarg) == tdata.speeds[OSPEED_OFFSET ]);#endif #endif #endif
Quoted 14 lines · Bruce Ashfield
Quoted 13 lines · Khem Raj
Quoted 6 lines · Khem Raj
I think I see the problem now. The constant should be converted to use Bnn
values. When calling the baudrate apis. I will send a patch for you to test
once I am close to computerI have sent a potential patch.
Quoted 8 lines
Quoted 4 lines
http://lists.openembedded.org/pipermail/openembedded-core/2016-April/120229.html
It worked on musl env that I had ready here. Can you test it
with your env and make sure it works for you ?confirmed. I reverted my local change, applied this and socat is working without the assert.
Thanks