NetBSD Problem Report #47324

From www@NetBSD.org  Fri Dec 14 08:26:59 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 5963B63E992
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Dec 2012 08:26:59 +0000 (UTC)
Message-Id: <20121214082658.B12E563E992@www.NetBSD.org>
Date: Fri, 14 Dec 2012 08:26:58 +0000 (UTC)
From: marc@msys.ch
Reply-To: marc@msys.ch
To: gnats-bugs@NetBSD.org
Subject: ulpt(4) and ulpn(4) loose data
X-Send-Pr-Version: www-1.0

>Number:         47324
>Category:       kern
>Synopsis:       ulpt(4) and ulpn(4) loose data
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 14 08:30:00 +0000 2012
>Last-Modified:  Fri Dec 14 09:05:01 +0000 2012
>Originator:     Marc Balmer
>Release:        5.1.0 and 5.1.2
>Organization:
micro systems
>Environment:
NetBSD xxx 5.1.2_PATCH NetBSD 5.1.2_PATCH (GENERIC) #18: Thu Dec  6 17:06:34 CET 2012  root@netbsd-5-1:/usr/obj/sys/arch/i386/compile/GENERIC i386

>Description:
When open()in /dev/ulpt0 or /dev/ulpn0 and then immediately write()ing data, the first byte gets lost in most cases.  Tested on different hardware and with different (receipt) printers.
>How-To-Repeat:
Write a small program that open()s /dev/ulpt0 and send e.g. an escape sequence to open a cash drawer.  The cash drawer will not open in most cases, because the the initial byte gets lost.
>Fix:

>Audit-Trail:
From: Marc Balmer <marc@msys.ch>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/47324: ulpt(4) and ulpn(4) loose data
Date: Fri, 14 Dec 2012 10:01:50 +0100

 Am 14.12.2012 um 09:30 schrieb marc@msys.ch:

 >> Number:         47324
 >> Category:       kern
 >> Synopsis:       ulpt(4) and ulpn(4) loose data
 >> Confidential:   no
 >> Severity:       critical
 >> Priority:       high
 >> Responsible:    kern-bug-people
 >> State:          open
 >> Class:          sw-bug
 >> Submitter-Id:   net
 >> Arrival-Date:   Fri Dec 14 08:30:00 +0000 2012
 >> Originator:     Marc Balmer
 >> Release:        5.1.0 and 5.1.2
 >> Organization:
 > micro systems
 >> Environment:
 > NetBSD xxx 5.1.2_PATCH NetBSD 5.1.2_PATCH (GENERIC) #18: Thu Dec  6 =
 17:06:34 CET 2012  =
 root@netbsd-5-1:/usr/obj/sys/arch/i386/compile/GENERIC i386
 >=20
 >> Description:
 > When open()in /dev/ulpt0 or /dev/ulpn0 and then immediately write()ing =
 data, the first byte gets lost in most cases.  Tested on different =
 hardware and with different (receipt) printers.
 >> How-To-Repeat:
 > Write a small program that open()s /dev/ulpt0 and send e.g. an escape =
 sequence to open a cash drawer.  The cash drawer will not open in most =
 cases, because the the initial byte gets lost.
 >> Fix:
 >=20

 Whe I write a NUL byte right after the open, subsequent writes will =
 succeed.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.