Sorry if this is old news, but I've just discovered a problem in burncd.
If I do a 'blank' the operation completes but burncd then hangs. I have
a gdb session that shows the situation quite nicely: when burncd does
CDRIOCGETPROGRESS to get the number for the progress bar, it always
reports 0, and with no error, so burncd gets stuck in an infinite loop.
This really looks like an ioctl() issue more than a burncd one: either
CDRIOCGETPROGRESS shouldn't be allowed on 'blank' or it should return
valid information. Gdb session follows (sorry about the horrible
line-wrapping).
/usr/src/usr.sbin/burncd 10:23PM % sudo cc -O -pipe -g -march=athlon
-Wall -Wno-format-y2k -Wno-uninitialized -o burncd burncd.c
/usr/src/usr.sbin/burncd 10:26PM % sudo gdb burncd
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
(gdb) r -s 4 -f /dev/acd0c blank
Starting program: /usr/src/usr.sbin/burncd/burncd -s 4 -f /dev/acd0c blank
^Zanking CD, please wait..
Program received signal SIGTSTP, Stopped (user).
0x280b0823 in nanosleep () from /usr/lib/libc.so.5
(gdb) bt
#0 0x280b0823 in nanosleep () from /usr/lib/libc.so.5
#1 0x280a594f in sleep () from /usr/lib/libc.so.5
#2 0x08049069 in main (argc=1, argv=0x2812247c) at burncd.c:194
#3 0x08048a80 in _start ()
(gdb) up 2
#2 0x08049069 in main (argc=1, argv=0x2812247c) at burncd.c:194
194 sleep(1);
(gdb) l
189 blank == CDR_B_ALL ?
"eras" : "blank");
190
191 if (ioctl(fd, CDRIOCBLANK, &blank) < 0)
192 err(EX_IOERR, "ioctl(CDRIOCBLANK)");
193 while (1) {
194 sleep(1);
195 error = ioctl(fd,
CDRIOCGETPROGRESS, &percent);
196 if (percent > 0 && !quiet)
197 fprintf(stderr,
198 "%sing CD - %d
%% done \r",
(gdb)
199 blank ==
CDR_B_ALL ?
200 "eras" :
"blank", percent);
201 if (error || percent == 100 ||
202 (percent == 0 && last ==
99))
203 break;
204 last = percent;
205 }
206 if (!quiet)
207 printf("\n");
208 continue;
(gdb) p error
$1 = 0
(gdb) p percent
$2 = 0
(gdb) p last
$3 = 0
(gdb) set last=99
(gdb) p last
$4 = 99
(gdb) c
Continuing.
Program exited normally.
(gdb) q
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message