whole_func_string: function getLogicalPartitions(disk, index, offset, extendedPartitionOffset, limit) {
      return __awaiter(this, void 0, void 0, function* () {
          if (extendedPartitionOffset === undefined) {
              extendedPartitionOffset = offset;
          }
          if (limit === undefined) {
              limit = Infinity;
          }
          const result = [];
          if (limit <= 0) {
              return result;
          }
          const buf = yield readFromDisk(disk, offset, MBR_SIZE);
          for (const p of getPartitionsFromMBRBuf(buf)) {
              if (!p.extended) {
                  result.push(mbrPartitionDict(p, offset, index));
              }
              else if (limit > 0) {
                  const logicalPartitions = yield getLogicalPartitions(disk, index + 1, extendedPartitionOffset + p.byteOffset(), extendedPartitionOffset, limit - 1);
                  result.push(...logicalPartitions);
                  return result;
              }
          }
          return result;
      });
  }
func_code_string: function getLogicalPartitions(disk, index, offset, extendedPartitionOffset, limit) {
      return __awaiter(this, void 0, void 0, function* () {
          if (extendedPartitionOffset === undefined) {
              extendedPartitionOffset = offset;
          }
          if (limit === undefined) {
              limit = Infinity;
          }
          const result = [];
          if (limit <= 0) {
              return result;
          }
          const buf = yield readFromDisk(disk, offset, MBR_SIZE);
          for (const p of getPartitionsFromMBRBuf(buf)) {
              if (!p.extended) {
                  result.push(mbrPartitionDict(p, offset, index));
              }
              else if (limit > 0) {
                  const logicalPartitions = yield getLogicalPartitions(disk, index + 1, extendedPartitionOffset + p.byteOffset(), extendedPartitionOffset, limit - 1);
                  result.push(...logicalPartitions);
                  return result;
              }
          }
          return result;
      });
  }
func_documentation_string: Only for MBR