diff --git a/include/openseachest_util_options.h b/include/openseachest_util_options.h index 7e8fc81..7aa51d4 100644 --- a/include/openseachest_util_options.h +++ b/include/openseachest_util_options.h @@ -2386,7 +2386,7 @@ extern "C" #define RAW_INPUT_FILE_OFFSET_FLAG rawInFileOffset #define RAW_INPUT_OFFSET_ADJUST_BY_BLOCKS_FLAG rawInOffsetBlocks #define RAW_INPUT_FILE_OFFSET_VAR \ - uint64_t RAW_INPUT_FILE_OFFSET_FLAG = 0; \ + int64_t RAW_INPUT_FILE_OFFSET_FLAG = 0; \ getOptBool RAW_INPUT_OFFSET_ADJUST_BY_BLOCKS_FLAG = goFalse; #define RAW_INPUT_FILE_OFFSET_LONG_OPT_STRING "inputOffset" #define RAW_INPUT_FILE_OFFSET_LONG_OPT { RAW_INPUT_FILE_OFFSET_LONG_OPT_STRING, required_argument, M_NULLPTR, 0 } diff --git a/utils/C/openSeaChest/openSeaChest_Raw.c b/utils/C/openSeaChest/openSeaChest_Raw.c index 213b60a..24961f0 100644 --- a/utils/C/openSeaChest/openSeaChest_Raw.c +++ b/utils/C/openSeaChest/openSeaChest_Raw.c @@ -635,9 +635,9 @@ int main(int argc, char *argv[]) //set the offset to read the file at //set the raw data length - but check the units first! char* unit = M_NULLPTR; - if (get_And_Validate_Integer_Input_Uint64(optarg, &unit, ALLOW_UNIT_DATASIZE, &RAW_INPUT_FILE_OFFSET_FLAG)) + if (get_And_Validate_Integer_Input_Int64(optarg, &unit, ALLOW_UNIT_DATASIZE, &RAW_INPUT_FILE_OFFSET_FLAG)) { - uint64_t multiplier = 1; + int64_t multiplier = 1; if (strstr(optarg, "BLOCKS")) { //the user specified the number as a number of logical blocks, so adjust this after we know the device logical block size @@ -672,7 +672,7 @@ int main(int argc, char *argv[]) print_Error_In_Cmd_Line_Args(RAW_INPUT_FILE_OFFSET_LONG_OPT_STRING, optarg); exit(UTIL_EXIT_ERROR_IN_COMMAND_LINE); } - RAW_INPUT_FILE_OFFSET_FLAG = C_CAST(uint64_t, RAW_INPUT_FILE_OFFSET_FLAG) * multiplier; + RAW_INPUT_FILE_OFFSET_FLAG = RAW_INPUT_FILE_OFFSET_FLAG * multiplier; } else { @@ -1304,7 +1304,7 @@ int main(int argc, char *argv[]) } else { - long int fileOffset = RAW_INPUT_FILE_OFFSET_FLAG; + int64_t fileOffset = RAW_INPUT_FILE_OFFSET_FLAG; if (RAW_INPUT_OFFSET_ADJUST_BY_BLOCKS_FLAG) { fileOffset = deviceList[deviceIter].drive_info.deviceBlockSize * RAW_INPUT_FILE_OFFSET_FLAG; @@ -1712,7 +1712,7 @@ int main(int argc, char *argv[]) } else { - long int fileOffset = RAW_INPUT_FILE_OFFSET_FLAG; + int64_t fileOffset = RAW_INPUT_FILE_OFFSET_FLAG; if (RAW_INPUT_OFFSET_ADJUST_BY_BLOCKS_FLAG) { fileOffset = deviceList[deviceIter].drive_info.deviceBlockSize * RAW_INPUT_FILE_OFFSET_FLAG;