while dd does not have a conv=sparse option oddly enough cp does
"cp --sparse=always infile outfile" is supposed to remove all blocks of
zeros while copying creating a spare output file
for creating a new disk image "dd if=/dev/zero of=outfile bs=512 seek=$(( C
* H * S )) count=1" will create a nice huge file using only one data sector
on disk and the indirect blocks. This file can be then be "mkfs"ed like a
normal file, completely transparent. These optimization only work on smart
file systems, though, like ext2.

Has anyone figured out freedos's cdrom drivers, As I have been fighting
their search engine with little luck?

I was trying to get my USB cdrw running with plex86 and found that it died
on ioctl(...BLKGETSIZE on the sr.c driver enclosed is a patch that I have
been trying to use. I appears to return the correct value but I am not sure
it is the best place for this function.  It is very similar to the sd.c
version however.


--- linux-2.4.2/drivers/scsi/sr_ioctl.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/scsi/sr_ioctl.c Fri Mar 16 10:46:32 2001
@@ -530,6 +530,10 @@
  target = MINOR(cdi->dev);

  switch (cmd) {
+ case BLKGETSIZE:   /* Return device size */
+  if (!arg)
+   return -EINVAL;
+  return put_user(scsi_CDs[target].capacity, (long *) arg);
  case BLKROSET:
  case BLKROGET:
  case BLKRASET:



Reply via email to