From b3f6b8d374574602c3eecb3312cf39ccbafd7572 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 28 Oct 2014 14:08:31 +0000 Subject: [PATCH] Interpreting number suffix "d" (disk block) as factor of 512 --- xorriso/misc_funct.c | 4 +++- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xorriso/misc_funct.c b/xorriso/misc_funct.c index 85302f6b..5d7ec7c4 100644 --- a/xorriso/misc_funct.c +++ b/xorriso/misc_funct.c @@ -172,7 +172,8 @@ ex:; /** Convert a text into a number of type double and multiply it by unit code - [kmgtpe] (2^10 to 2^60) or [s] (2048). (Also accepts capital letters.) + [kmgtpe] (2^10 to 2^60) or [s] (2048) or [d] (512). + (Also accepts capital letters.) @param text Input like "42", "2k", "3.14m" or "-1g" @param flag Bitfield for control purposes: bit0= return -1 rathern than 0 on failure @@ -199,6 +200,7 @@ double Scanf_io_size(char *text, int flag) if(c=='p' || c=='P') ret*= 1024.0*1024.0*1024.0*1024.0*1024.0; if(c=='e' || c=='E') ret*= 1024.0*1024.0*1024.0*1024.0*1024.0*1024.0; if(c=='s' || c=='S') ret*= 2048.0; + if(c=='d' || c=='D') ret*= 512.0; return(ret); } diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index bc8139f9..02d0079c 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2014.10.28.140609" +#define Xorriso_timestamP "2014.10.28.140709"