Hi. I'm using genimage 16 (Debian) and have run into a spot of trouble with large numbers, eg
ERROR: Invalid size suffix '.0G' in '2.0G'
I start with a static genimage template containing some tags. After calculating on-disk sizes I run the template through sed to populate the tags with real numbers which are formatted using numfmt --to=si. For example:
Looking at the code, genimage assumes the numerical portion of size will be a single unsigned long long and cannot cope with a decimal point. I imagine this will only be a problem above 1G where the granularity can only be expressed with a decimal point, which is the case when using numfmt with si (or iec or iec-i) output unit specifiers.
I initially thought it was a problem with a 'point zero' rather than a 'point one', but this not the case:
ERROR: Invalid size suffix '.1G' in '2.1G'
Is there scope to handle numbers formatted with a decimal point, or should numbers over 1G be specified in M (or K)?
Hi. I'm using genimage 16 (Debian) and have run into a spot of trouble with large numbers, eg
ERROR: Invalid size suffix '.0G' in '2.0G'
I start with a static genimage template containing some tags. After calculating on-disk sizes I run the template through sed to populate the tags with real numbers which are formatted usingnumfmt --to=si
. For example:..becomes
Looking at the code, genimage assumes the numerical portion of size will be a single unsigned long long and cannot cope with a decimal point. I imagine this will only be a problem above 1G where the granularity can only be expressed with a decimal point, which is the case when using numfmt with si (or iec or iec-i) output unit specifiers.
I initially thought it was a problem with a 'point zero' rather than a 'point one', but this not the case:
ERROR: Invalid size suffix '.1G' in '2.1G'
Is there scope to handle numbers formatted with a decimal point, or should numbers over 1G be specified in M (or K)?
Cheers, -- Matt