diff -U 1 -Nrup bestfit-0.2.0/src/bestfit.c bestfit-0.2.0.edited/src/bestfit.c --- bestfit-0.2.0/src/bestfit.c 2001-10-01 18:26:10.000000000 +0200 +++ bestfit-0.2.0.edited/src/bestfit.c 2007-12-22 03:23:32.000000000 +0100 @@ -64,6 +64,8 @@ or if --execute specified, execute a com \n\ -8, --80min space is that of an empty 80 min CD (default)\n\ -7, --74min space is that of an empty 74 min CD\n\ + -5, --sldvd space is that of an empty 4,7 GB DVD \n\ + -9, --dldvd space is that of an empty 8,5 GB DVD \n\ -d, --dirs-only ignore non-directory arguments\n\ -s, --space=BLOCKS maximum amount of space allowed to use\n\ -r, --reserve=BLOCKS blocks to reserve (%d by default)\n\ @@ -89,6 +91,8 @@ static void execute_command(char *file, static struct option long_options[] = { { "80min", no_argument, NULL, '8' }, { "74min", no_argument, NULL, '7' }, + { "sldvd", no_argument, NULL, '5' }, + { "dldvd", no_argument, NULL, '9' }, { "dirs-only", no_argument, NULL, 'd' }, { "space", required_argument, NULL, 's' }, { "reserve", required_argument, NULL, 'r' }, @@ -202,7 +206,7 @@ main (int argc, char **argv) while (TRUE) { int option_index = 0; - i = getopt_long(argc, argv, "-87dqver:s:", long_options, &option_index); + i = getopt_long(argc, argv, "-8759dqver:s:", long_options, &option_index); if (i == EOF) break; @@ -218,11 +222,19 @@ main (int argc, char **argv) switch (i) { case '8': /* --80min */ space = ISO_BLOCKS_80_MIN_CD; - break; + break; case '7': /* --74min */ space = ISO_BLOCKS_74_MIN_CD; - break; + break; + + case '5': /* --4,7 GB DVD */ + space = ISO_BLOCKS_DVD_SL; + break; + + case '9': /* --8,5 GB DVD */ + space = ISO_BLOCKS_DVD_DL; + break; case 'd': /* --dirs-only */ directories_only = TRUE; diff -U 1 -Nrup bestfit-0.2.0/src/bestfit.h bestfit-0.2.0.edited/src/bestfit.h --- bestfit-0.2.0/src/bestfit.h 2001-04-23 00:43:08.000000000 +0200 +++ bestfit-0.2.0.edited/src/bestfit.h 2007-12-22 03:16:52.000000000 +0100 @@ -23,6 +23,10 @@ #define ISO_BLOCKS_74_MIN_CD 333000 /* Number of 2048 byte block on a 80-min CD */ #define ISO_BLOCKS_80_MIN_CD 360000 +/* Number of 2048 byte block on a 4,7 GB Single Layer DVD */ +#define ISO_BLOCKS_DVD_SL 2295104 +/* Number of 2048 byte block on a 8,5 GB Double Layer DVD */ +#define ISO_BLOCKS_DVD_DL 4171712 /* Default number of blocks to reserve on CDs */ #define DEFAULT_RESERVED_BLOCKS 200 /* The default (and unmodifyable) block size */