* [PATCH] OMAP4 USB BOOT: remove double line endings [not found] <[PATCH] fix compiler warnings: use puts() instead of printf()> @ 2013-02-24 18:15 ` Vicente Bergas 2013-02-25 8:18 ` Sascha Hauer 0 siblings, 1 reply; 3+ messages in thread From: Vicente Bergas @ 2013-02-24 18:15 UTC (permalink / raw) To: barebox; +Cc: Vicente Bergas From previous patch that replaced printf with puts: puts adds it's own line ending, so do not append it manually Signed-off-by: Vicente Bergas <vicencb@gmail.com> --- scripts/omap4_usbboot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c index 34e53c0..e521086 100644 --- a/scripts/omap4_usbboot.c +++ b/scripts/omap4_usbboot.c @@ -78,7 +78,7 @@ int read_asic_id(struct usb_handle *usb) const uint32_t msg_getid = 0xF0030003; int i, j, k, ret; uint8_t id[81]; - char line[LINEWIDTH*3+8]; + char line[LINEWIDTH*3+5]; printf("reading ASIC ID\n"); memset(id , 0xee, sizeof(id)); @@ -96,8 +96,7 @@ int read_asic_id(struct usb_handle *usb) sprintf(line, "%02X: ", i); for (j = 0; j < LINEWIDTH && j < sizeof(id)-i; j++) sprintf(line+4+j*3, "%02X ", id[i+j]); - line[4+j*3+0] = '\n'; - line[4+j*3+1] = 0; + line[4+j*3] = 0; puts(line); } ret = 0; -- 1.8.1.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAP4 USB BOOT: remove double line endings 2013-02-24 18:15 ` [PATCH] OMAP4 USB BOOT: remove double line endings Vicente Bergas @ 2013-02-25 8:18 ` Sascha Hauer 2013-02-25 11:05 ` Fabio Porcedda 0 siblings, 1 reply; 3+ messages in thread From: Sascha Hauer @ 2013-02-25 8:18 UTC (permalink / raw) To: Vicente Bergas; +Cc: barebox On Sun, Feb 24, 2013 at 07:15:14PM +0100, Vicente Bergas wrote: > From previous patch that replaced printf with puts: > puts adds it's own line ending, so do not append it manually > > Signed-off-by: Vicente Bergas <vicencb@gmail.com> Applied, thanks Sascha > --- > scripts/omap4_usbboot.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c > index 34e53c0..e521086 100644 > --- a/scripts/omap4_usbboot.c > +++ b/scripts/omap4_usbboot.c > @@ -78,7 +78,7 @@ int read_asic_id(struct usb_handle *usb) > const uint32_t msg_getid = 0xF0030003; > int i, j, k, ret; > uint8_t id[81]; > - char line[LINEWIDTH*3+8]; > + char line[LINEWIDTH*3+5]; > > printf("reading ASIC ID\n"); > memset(id , 0xee, sizeof(id)); > @@ -96,8 +96,7 @@ int read_asic_id(struct usb_handle *usb) > sprintf(line, "%02X: ", i); > for (j = 0; j < LINEWIDTH && j < sizeof(id)-i; j++) > sprintf(line+4+j*3, "%02X ", id[i+j]); > - line[4+j*3+0] = '\n'; > - line[4+j*3+1] = 0; > + line[4+j*3] = 0; > puts(line); > } > ret = 0; > -- > 1.8.1.4 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAP4 USB BOOT: remove double line endings 2013-02-25 8:18 ` Sascha Hauer @ 2013-02-25 11:05 ` Fabio Porcedda 0 siblings, 0 replies; 3+ messages in thread From: Fabio Porcedda @ 2013-02-25 11:05 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, Vicente Bergas On Mon, Feb 25, 2013 at 9:18 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > On Sun, Feb 24, 2013 at 07:15:14PM +0100, Vicente Bergas wrote: >> From previous patch that replaced printf with puts: >> puts adds it's own line ending, so do not append it manually Thanks for fixing, I did not remember of the additional newline. I need to fix the other puts, i will push a patch to change puts (str)-> fprinf('%s", str) for the menu.c. >> >> Signed-off-by: Vicente Bergas <vicencb@gmail.com> > > > Applied, thanks > > Sascha > > >> --- >> scripts/omap4_usbboot.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c >> index 34e53c0..e521086 100644 >> --- a/scripts/omap4_usbboot.c >> +++ b/scripts/omap4_usbboot.c >> @@ -78,7 +78,7 @@ int read_asic_id(struct usb_handle *usb) >> const uint32_t msg_getid = 0xF0030003; >> int i, j, k, ret; >> uint8_t id[81]; >> - char line[LINEWIDTH*3+8]; >> + char line[LINEWIDTH*3+5]; >> >> printf("reading ASIC ID\n"); >> memset(id , 0xee, sizeof(id)); >> @@ -96,8 +96,7 @@ int read_asic_id(struct usb_handle *usb) >> sprintf(line, "%02X: ", i); >> for (j = 0; j < LINEWIDTH && j < sizeof(id)-i; j++) >> sprintf(line+4+j*3, "%02X ", id[i+j]); >> - line[4+j*3+0] = '\n'; >> - line[4+j*3+1] = 0; >> + line[4+j*3] = 0; >> puts(line); >> } >> ret = 0; >> -- >> 1.8.1.4 >> >> >> _______________________________________________ >> barebox mailing list >> barebox@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/barebox >> > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox -- Fabio Porcedda _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-25 11:06 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <[PATCH] fix compiler warnings: use puts() instead of printf()> 2013-02-24 18:15 ` [PATCH] OMAP4 USB BOOT: remove double line endings Vicente Bergas 2013-02-25 8:18 ` Sascha Hauer 2013-02-25 11:05 ` Fabio Porcedda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox