Browse Source

Interpreting number suffix "d" (disk block) as factor of 512

master
Thomas Schmitt 8 years ago
parent
commit
b3f6b8d374
  1. 4
      xorriso/misc_funct.c
  2. 2
      xorriso/xorriso_timestamp.h

4
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);
}

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2014.10.28.140609"
#define Xorriso_timestamP "2014.10.28.140709"

Loading…
Cancel
Save