From 6cb11de52f1494cf86728f8804112b8ddfb88c9f Mon Sep 17 00:00:00 2001 From: sos Date: Mon, 17 Jan 2000 01:43:25 +0000 Subject: Change the buffer size to 16 blocks, some crappy drives have trouble with bigger chunks of data at a time. Add filesize to progress printout. Submitted by: green@FreeBSD.org --- usr.sbin/burncd/burncd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr.sbin/burncd') diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c index 6b32301..493e14d 100644 --- a/usr.sbin/burncd/burncd.c +++ b/usr.sbin/burncd/burncd.c @@ -36,10 +36,11 @@ #include #include #include +#include #include #include -#define BLOCKS 32 +#define BLOCKS 16 static int fd, saved_block_size; void cleanup(int); @@ -142,8 +143,13 @@ main(int argc, char **argv) err(EX_IOERR, "ioctl(CDRIOCNEXTWRITEABLEADDR)"); if (!quiet) { + struct stat stat; + + if (fstat(file, &stat) < 0) + err(EX_IOERR, "fstat(%s)", argv[arg]); fprintf(stderr, "next writeable LBA %d\n", addr); - fprintf(stderr, "writing from file %s\n", argv[arg]); + fprintf(stderr, "writing from file %s size %d KB\n", + argv[arg], stat.st_size / 1024); } lseek(fd, 0, SEEK_SET); size = 0; -- cgit v1.1