- Timestamp:
- 2025-04-14T14:18:50Z (11 months ago)
- Children:
- f444633
- Parents:
- c7c6afd (diff), 5d2bdaa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-14 14:18:50)
- git-committer:
- GitHub <noreply@…> (2025-04-14 14:18:50)
- Location:
- uspace
- Files:
-
- 5 edited
-
app/sysinst/sysinst.c (modified) (1 diff)
-
drv/block/isa-ide/main.c (modified) (2 diffs)
-
drv/block/pci-ide/main.c (modified) (2 diffs)
-
lib/c/test/adt/odict.c (modified) (1 diff)
-
lib/c/test/str.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sysinst/sysinst.c
rc7c6afd rb6061f8c 72 72 */ 73 73 #define DEFAULT_DEV_0 "devices/\\hw\\sys\\00:01.1\\c0d0" 74 #define DEFAULT_DEV_1 "devices/\\hw\\sys\\ 00:01.0\\ide1\\c0d0"74 #define DEFAULT_DEV_1 "devices/\\hw\\sys\\ide1\\c0d0" 75 75 //#define DEFAULT_DEV "devices/\\hw\\pci0\\00:01.2\\uhci_rh\\usb01_a1\\mass-storage0\\l0" 76 76 /** Volume label for the new file system */ -
uspace/drv/block/isa-ide/main.c
rc7c6afd rb6061f8c 169 169 isa_ide_ctrl_t *ctrl; 170 170 isa_ide_hwres_t res; 171 unsigned chans; 171 172 errno_t rc; 172 173 … … 187 188 ctrl->dev = dev; 188 189 190 chans = 0; 191 189 192 rc = isa_ide_channel_init(ctrl, &ctrl->channel[0], 0, &res); 190 if (rc == ENOENT) 193 if (rc == EOK) 194 ++chans; 195 else if (rc != ENOENT) 191 196 goto error; 192 197 193 198 rc = isa_ide_channel_init(ctrl, &ctrl->channel[1], 1, &res); 194 if (rc == ENOENT) 195 goto error; 196 197 if (rc != EOK) { 198 ddf_msg(LVL_ERROR, "Failed initializing ATA controller."); 199 if (rc == EOK) 200 ++chans; 201 else if (rc != ENOENT) 202 goto error; 203 204 if (chans == 0) { 205 ddf_msg(LVL_ERROR, "No ISA IDE devices found."); 199 206 rc = EIO; 200 207 goto error; -
uspace/drv/block/pci-ide/main.c
rc7c6afd rb6061f8c 136 136 pci_ide_hwres_t res; 137 137 async_sess_t *parent_sess; 138 unsigned chans; 138 139 errno_t rc; 139 140 … … 157 158 goto error; 158 159 160 chans = 0; 161 159 162 rc = pci_ide_channel_init(ctrl, &ctrl->channel[0], 0, &res); 160 if (rc == ENOENT) 163 if (rc == EOK) 164 ++chans; 165 else if (rc != ENOENT) 161 166 goto error; 162 167 163 168 rc = pci_ide_channel_init(ctrl, &ctrl->channel[1], 1, &res); 164 if (rc == ENOENT) 165 goto error; 166 167 if (rc != EOK) { 168 ddf_msg(LVL_ERROR, "Failed initializing ATA controller."); 169 if (rc == EOK) 170 ++chans; 171 else if (rc != ENOENT) 172 goto error; 173 174 if (chans == 0) { 175 ddf_msg(LVL_ERROR, "No PCI IDE devices found."); 169 176 rc = EIO; 170 177 goto error; -
uspace/lib/c/test/adt/odict.c
rc7c6afd rb6061f8c 233 233 234 234 e->key = v; 235 odict_insert(&e->odict, &odict, &ep->odict);235 odict_insert(&e->odict, &odict, ep ? &ep->odict : NULL); 236 236 PCUT_ASSERT_ERRNO_VAL(EOK, odict_validate(&odict)); 237 237 v = seq_next(v); -
uspace/lib/c/test/str.c
rc7c6afd rb6061f8c 27 27 */ 28 28 29 #include "pcut/asserts.h" 29 30 #include <stdio.h> 30 31 #include <str.h> … … 115 116 } 116 117 118 PCUT_TEST(str_non_shortest) 119 { 120 /* Overlong zero. */ 121 const char overlong1[] = { 0b11000000, 0b10000000, 0 }; 122 const char overlong2[] = { 0b11100000, 0b10000000, 0 }; 123 const char overlong3[] = { 0b11110000, 0b10000000, 0 }; 124 125 const char overlong4[] = { 0b11000001, 0b10111111, 0 }; 126 const char overlong5[] = { 0b11100000, 0b10011111, 0b10111111, 0 }; 127 const char overlong6[] = { 0b11110000, 0b10001111, 0b10111111, 0b10111111, 0 }; 128 129 size_t offset = 0; 130 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong1, &offset, sizeof(overlong1))); 131 offset = 0; 132 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong2, &offset, sizeof(overlong2))); 133 offset = 0; 134 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong3, &offset, sizeof(overlong3))); 135 offset = 0; 136 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong4, &offset, sizeof(overlong4))); 137 offset = 0; 138 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong5, &offset, sizeof(overlong5))); 139 offset = 0; 140 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, str_decode(overlong6, &offset, sizeof(overlong6))); 141 142 char sanitized[sizeof(overlong6)]; 143 str_cpy(sanitized, STR_NO_LIMIT, overlong1); 144 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 145 str_cpy(sanitized, STR_NO_LIMIT, overlong2); 146 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 147 str_cpy(sanitized, STR_NO_LIMIT, overlong3); 148 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 149 str_cpy(sanitized, STR_NO_LIMIT, overlong4); 150 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 151 str_cpy(sanitized, STR_NO_LIMIT, overlong5); 152 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 153 str_cpy(sanitized, STR_NO_LIMIT, overlong6); 154 PCUT_ASSERT_INT_EQUALS(U_SPECIAL, sanitized[0]); 155 } 156 117 157 PCUT_EXPORT(str);
Note:
See TracChangeset
for help on using the changeset viewer.
