]> git.pld-linux.org Git - packages/vdo.git/blob - vdo-types.patch
- updated to 6.2.6.14
[packages/vdo.git] / vdo-types.patch
1 --- vdo-6.2.3.91/utils/uds/fileIORegion.c.orig  2020-05-30 04:20:46.000000000 +0200
2 +++ vdo-6.2.3.91/utils/uds/fileIORegion.c       2020-06-01 06:23:23.271248367 +0200
3 @@ -65,7 +65,7 @@
4  
5    if (offset + length > fior->size) {
6      return logErrorWithStringError(UDS_OUT_OF_RANGE,
7 -                                   "range %zd-%zd not in range 0 to %zu",
8 +                                   "range %"PRId64"-%"PRId64" not in range 0 to %zu",
9                                     offset, offset + length, fior->size);
10    }
11  
12 --- vdo-6.2.3.91/utils/uds/indexLayout.c.orig   2020-05-30 04:20:46.000000000 +0200
13 +++ vdo-6.2.3.91/utils/uds/indexLayout.c        2020-06-01 06:25:49.170457963 +0200
14 @@ -955,7 +955,7 @@
15    }
16    if (iter.nextRegion != iter.lastRegion) {
17      return logErrorWithStringError(UDS_UNEXPECTED_RESULT,
18 -                                   "expected %ld additional regions",
19 +                                   "expected %td additional regions",
20                                     iter.lastRegion - iter.nextRegion);
21    }
22    if (iter.nextBlock != isl->indexSave.startBlock + isl->indexSave.numBlocks) {
23 --- vdo-6.2.3.91/utils/uds/threadsLinuxUser.c.orig      2020-05-30 04:20:46.000000000 +0200
24 +++ vdo-6.2.3.91/utils/uds/threadsLinuxUser.c   2020-06-01 06:28:58.816097231 +0200
25 @@ -112,7 +112,7 @@
26  int joinThreads(pthread_t th)
27  {
28    int result = pthread_join(th, NULL);
29 -  return ASSERT_WITH_ERROR_CODE((result == 0), result, "th: %zu", th);
30 +  return ASSERT_WITH_ERROR_CODE((result == 0), result, "th: %lu", th);
31  }
32  
33  /**********************************************************************/
34 --- vdo-6.2.3.91/utils/uds/timeUtils.c.orig     2020-05-30 04:20:46.000000000 +0200
35 +++ vdo-6.2.3.91/utils/uds/timeUtils.c  2020-06-01 06:31:48.701843548 +0200
36 @@ -69,7 +69,7 @@
37    if (!isValidTime(time)) {
38      return time;
39    }
40 -  if ((reltime >= 0) && (reltime < 10 * BILLION)) {
41 +  if ((reltime >= 0) && (reltime < 10LL * BILLION)) {
42      reltime += time.tv_nsec;
43      while (reltime >= BILLION) {
44        reltime -= BILLION;
45 @@ -80,7 +80,7 @@
46    }
47    // may not be accurate for times before the Epoch...
48    // (is the ns time positive or negative for negative time_t?)
49 -  int64_t ns = time.tv_sec * BILLION + time.tv_nsec;
50 +  int64_t ns = (int64_t)time.tv_sec * BILLION + time.tv_nsec;
51    if ((ns < INT64_MIN / 2) ||
52        (ns > INT64_MAX / 2) ||
53        (reltime < INT64_MIN / 2) ||
54 @@ -130,8 +130,8 @@
55  RelTime timeDifference(AbsTime a, AbsTime b)
56  {
57    if (isValidTime(a) && isValidTime(b)) {
58 -    int64_t ans = a.tv_sec * BILLION + a.tv_nsec;
59 -    int64_t bns = b.tv_sec * BILLION + b.tv_nsec;
60 +    int64_t ans = (int64_t)a.tv_sec * BILLION + a.tv_nsec;
61 +    int64_t bns = (int64_t)b.tv_sec * BILLION + b.tv_nsec;
62      return ans - bns;
63    } else if (isValidTime(a)) {
64      return INT64_MAX;
65 --- vdo-6.2.3.91/utils/vdo/user/fileLayer.c.orig        2020-05-30 04:20:46.000000000 +0200
66 +++ vdo-6.2.3.91/utils/vdo/user/fileLayer.c     2020-06-01 07:08:45.456501024 +0200
67 @@ -291,8 +291,8 @@
68      layer->blockCount = deviceBlocks;
69    } else if (layer->blockCount != deviceBlocks) {
70      result = logErrorWithStringError(VDO_PARAMETER_MISMATCH,
71 -                                     "physical size %ld 4k blocks must match"
72 -                                     " physical size %ld 4k blocks of %s",
73 +                                     "physical size %"PRId64" 4k blocks must match"
74 +                                     " physical size %"PRId64" 4k blocks of %s",
75                                       layer->blockCount, deviceBlocks,
76                                       layer->name);
77      tryCloseFile(layer->fd);
78 --- vdo-6.2.3.91/utils/vdo/user/vdodebugmetadata.c.orig 2020-05-30 04:20:46.000000000 +0200
79 +++ vdo-6.2.3.91/utils/vdo/user/vdodebugmetadata.c      2020-06-01 07:11:47.872179460 +0200
80 @@ -320,7 +320,7 @@
81    result = layer->allocateIOBuffer(layer, journalBytes,
82                                     "recovery journal", &rawJournalBytes);
83    if (result != VDO_SUCCESS) {
84 -    errx(1, "Could not allocate %" PRIu64" bytes for the journal",
85 +    errx(1, "Could not allocate %zu bytes for the journal",
86           journalBytes);
87    }
88  
89 @@ -614,14 +614,14 @@
90    char *filename;
91    int result = ALLOCATE(MAX_PBNS, PhysicalBlockNumber, __func__, &pbns);
92    if (result != VDO_SUCCESS) {
93 -    errx(1, "Could not allocate %" PRIu64 " bytes",
94 +    errx(1, "Could not allocate %zu bytes",
95           sizeof(PhysicalBlockNumber) * MAX_PBNS);
96    }
97  
98    result = ALLOCATE(MAX_SEARCH_LBNS, LogicalBlockNumber, __func__,
99                      &searchLBNs);
100    if (result != VDO_SUCCESS) {
101 -    errx(1, "Could not allocate %" PRIu64 " bytes",
102 +    errx(1, "Could not allocate %zu bytes",
103           sizeof(LogicalBlockNumber) * MAX_SEARCH_LBNS);
104    }
105  
106 --- vdo-6.2.3.91/utils/vdo/user/vdodumpmetadata.c.orig  2020-05-30 04:20:46.000000000 +0200
107 +++ vdo-6.2.3.91/utils/vdo/user/vdodumpmetadata.c       2020-06-01 07:12:18.685345864 +0200
108 @@ -350,7 +350,7 @@
109  {
110    int result = ALLOCATE(MAX_LBNS, PhysicalBlockNumber, __func__, &lbns);
111    if (result != VDO_SUCCESS) {
112 -    errx(1, "Could not allocate %" PRIu64 " bytes",
113 +    errx(1, "Could not allocate %zu bytes",
114           sizeof(PhysicalBlockNumber) * MAX_LBNS);
115    }
116  
117 --- vdo-6.2.3.91/utils/vdo/user/vdolistmetadata.c.orig  2020-05-30 04:20:46.000000000 +0200
118 +++ vdo-6.2.3.91/utils/vdo/user/vdolistmetadata.c       2020-06-01 07:12:54.471818659 +0200
119 @@ -115,7 +115,7 @@
120                         PhysicalBlockNumber  startBlock,
121                         BlockCount           count)
122  {
123 -  printf("%ld .. %ld: %s\n", startBlock, startBlock + count - 1, label);
124 +  printf("%"PRId64" .. %"PRId64": %s\n", startBlock, startBlock + count - 1, label);
125  }
126  
127  /**********************************************************************/
128 --- vdo-6.2.3.91/utils/vdo/user/vdoregenerategeometry.c.orig    2020-05-30 04:20:46.000000000 +0200
129 +++ vdo-6.2.3.91/utils/vdo/user/vdoregenerategeometry.c 2020-06-01 07:14:56.551157299 +0200
130 @@ -89,7 +89,7 @@
131  static int            candidateCount = 0;
132  
133  static char   *fileName = NULL;
134 -static size_t  offset   = 0;
135 +static uint64_t  offset = 0;
136  
137  /**
138   * Explain how this command-line tool is used.
139 --- vdo-6.2.6.14/utils/vdo/user/vdoprepareforlvm.c.orig 2022-02-11 01:31:42.000000000 +0100
140 +++ vdo-6.2.6.14/utils/vdo/user/vdoprepareforlvm.c      2022-05-09 21:50:35.553180915 +0200
141 @@ -22,6 +22,7 @@
142  #include <err.h>
143  #include <fcntl.h>
144  #include <getopt.h>
145 +#include <inttypes.h>
146  #include <stdio.h>
147  #include <stdlib.h>
148  #include <unistd.h>
149 @@ -200,7 +201,7 @@ static int convertUDS(IndexConfig    *in
150    udsConfigurationSetNonce(udsConfig, geometry.nonce);
151  
152    off_t startByte = geometry.regions[INDEX_REGION].startBlock * VDO_BLOCK_SIZE;
153 -  result = asprintf(&indexName, "%s offset=%ld", fileName, startByte);
154 +  result = asprintf(&indexName, "%s offset=%"PRId64, fileName, (uint64_t)startByte);
155    if (result == -1) {
156      udsFreeConfiguration(udsConfig);
157      return ENOMEM;
158 @@ -510,8 +511,8 @@ static int performDeviceConversion(void)
159    cleanup(vdo, layer);
160    close(fd);
161  
162 -  printf("Conversion completed for '%s': VDO is now offset by %ld bytes\n",
163 -         fileName, vdoByteOffset);
164 +  printf("Conversion completed for '%s': VDO is now offset by %"PRId64" bytes\n",
165 +         fileName, (uint64_t)vdoByteOffset);
166  
167    return result;
168  }
This page took 0.162579 seconds and 3 git commands to generate.