summaryrefslogtreecommitdiffstats
path: root/usr.sbin/burncd
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-01-17 01:43:25 +0000
committersos <sos@FreeBSD.org>2000-01-17 01:43:25 +0000
commit6cb11de52f1494cf86728f8804112b8ddfb88c9f (patch)
treec93d36cfe83bae4b42d7c9b383312733e03ebc08 /usr.sbin/burncd
parente35803196d649bc0da5a067e342980daf8858b89 (diff)
downloadFreeBSD-src-6cb11de52f1494cf86728f8804112b8ddfb88c9f.zip
FreeBSD-src-6cb11de52f1494cf86728f8804112b8ddfb88c9f.tar.gz
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 <Brian Fundakowski Feldman>
Diffstat (limited to 'usr.sbin/burncd')
-rw-r--r--usr.sbin/burncd/burncd.c10
1 files changed, 8 insertions, 2 deletions
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 <sysexits.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <sys/cdio.h>
#include <sys/cdrio.h>
-#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;
OpenPOWER on IntegriCloud